
<!doctype html>
<html lang="en">
<!--begin::Head-->
<?php 
if(!isset($_GET["action"]))
    $_GET["action"] = "solar";
if(!isset($_GET["floor"]))
    $_GET["floor"] = "OG";
?>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Smarthome control</title>
    <!--begin::Accessibility Meta Tags-->
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
    <meta name="color-scheme" content="light dark" />
    <meta name="theme-color" content="#007bff" media="(prefers-color-scheme: light)" />
    <meta name="theme-color" content="#1a1a1a" media="(prefers-color-scheme: dark)" />
    <link rel="icon" type="image/png" href="assets/img/favicon.png">
    <!--end::Accessibility Meta Tags-->

    <!--begin::Primary Meta Tags-->
    <meta name="title" content="Smarthome control" />
    <meta name="author" content="ColorlibHQ" />
    <meta name="description" content="Smarthome control panel by m0." />
    <meta name="keywords" content="smarthome dashboard, admin panel" />
    <!--end::Primary Meta Tags-->

    <!--begin::Accessibility Features-->
    <!-- Skip links will be dynamically added by accessibility.js -->
    <meta name="supported-color-schemes" content="light dark" />
    <link rel="preload" href="./css/adminlte.css?v=2" as="style" />
    <link rel="stylesheet" href="./css/solar.css" as="style" />
    <!--end::Accessibility Features-->

    <!--begin::Fonts-->
    <link rel="stylesheet" href="assets/fonts/font_poppins.css" media="print" onload="this.media='all'" />
    <!--end::Fonts-->

    <!--begin::Third Party Plugin(OverlayScrollbars)
    <link rel="stylesheet" href="css/overlayscrollbars.min.css" />-->
    <!--end::Third Party Plugin(OverlayScrollbars)-->

    <!--begin::Third Party Plugin(Bootstrap Icons)-->
    <link rel="stylesheet" href="css/bootstrap-icons.min.css" />
    <!--end::Third Party Plugin(Bootstrap Icons)-->

    <!--begin::Required Plugin(AdminLTE)-->
    <link rel="stylesheet" href="./css/adminlte.css?v=2" />
    <!--end::Required Plugin(AdminLTE)-->


</head>
<!--end::Head-->
<!--begin::Body-->

<body class="layout-fixed sidebar-expand-lg bg-body-tertiary" data-bs-theme="dark">
    <!--begin::App Wrapper-->
    <div class="app-wrapper">
        <!--begin::Header-->
        <nav class="app-header navbar navbar-expand bg-body">
            <!--begin::Container-->
            <div class="container-fluid">
                <!--begin::Start Navbar Links-->
                <ul class="navbar-nav">
                    <li class="nav-item">
                        <a class="nav-link" data-lte-toggle="sidebar" href="#" role="button">
                            <i class="bi bi-list"></i>
                        </a>
                    </li>
                </ul>
                <!--end::Start Navbar Links-->

                <!--begin::End Navbar Links-->
                <ul class="navbar-nav ms-auto">
                    <!--begin::Fullscreen Toggle-->
                    <li class="nav-item">
                        <a class="nav-link" href="#" data-lte-toggle="fullscreen">
                            <i data-lte-icon="maximize" class="bi bi-arrows-fullscreen"></i>
                            <i data-lte-icon="minimize" class="bi bi-fullscreen-exit" style="display: none"></i>
                        </a>
                    </li>
                    <?php 
                    if ($_SESSION["local"] == true)
                        echo "<li class='nav-item'><a class='nav-link' href='addUser.php'><i data-lte-icon='Add user' class='bi bi-person-add'></i></a></li>";
                    ?>
                    <!--end::Fullscreen Toggle-->
                </ul>
                <!--end::End Navbar Links-->
            </div>
            <!--end::Container-->
        </nav>
        <!--end::Header-->
        <!--begin::Sidebar-->
        <aside class="app-sidebar bg-body-secondary shadow">
            <!--begin::Sidebar Brand-->
            <div class="sidebar-brand">
                <!--begin::Brand Link-->
                <a href="./index.php" class="brand-link">
                    <!--begin::Brand Image-->
                    <img src="./assets/img/AdminLTELogo.png" alt="Logo"
                        class="brand-image opacity-75 shadow" />
                    <!--end::Brand Image-->
                    <!--begin::Brand Text-->
                    <span class="brand-text fw-light">Smart controller</span>
                    <!--end::Brand Text-->
                </a>
                <!--end::Brand Link-->
            </div>
            <!--end::Sidebar Brand-->
            <!--begin::Sidebar Wrapper-->
            <div class="sidebar-wrapper">
                <nav class="mt-2">
                    <!--begin::Sidebar Menu-->
                    <ul class="nav sidebar-menu flex-column" data-lte-toggle="treeview" role="navigation"
                        aria-label="Main navigation" data-accordion="false" id="navigation">
                        <li class="nav-item menu-open">
                            <a href="#" class="nav-link active">
                                <i class="nav-icon bi bi-speedometer"></i>
                                <p>
                                    Dashboards
                                    <i class="nav-arrow bi bi-chevron-right"></i>
                                </p>
                            </a>
                            <ul class="nav nav-treeview ps-4">
                                <li class="nav-item">
                                    <a href="?action=solar" class="nav-link<?php if($_GET["action"]=="solar" || $_GET["action"]==""){echo " active";} ?>">
                                        <i class="nav-icon bi bi-brightness-alt-high"></i>
                                        <p>Solar</p>
                                    </a>
                                </li>
                                <li class="nav-item">
                                    <a href="?action=heat" class="nav-link <?php if($_GET["action"]=="heat"){echo " active";} ?>">
                                        <i class="nav-icon bi bi-fire"></i>
                                        <p>Heizung</p>
                                    </a>
                                </li>
                                <li class="nav-item">
                                    <a href="?action=history" class="nav-link <?php if($_GET["action"]=="history"){echo " active";} ?>">
                                        <i class="nav-icon bi bi-graph-up"></i>
                                        <p>Historie</p>
                                    </a>
                                </li>
                                <li class="nav-item">
                                    <a href="?action=weather" class="nav-link <?php if($_GET["action"]=="weather"){echo " active";} ?>">
                                        <i class="nav-icon bi bi-cloud-sun"></i>
                                        <p>Wetter</p>
                                    </a>
                                </li>
                            </ul>
                        </li>
                    <li class="nav-item menu-open">
                            <a href="#" class="nav-link active">
                            <i class="nav-icon bi bi-house"></i>
                                <p>
                                    Home
                                    <i class="nav-arrow bi bi-chevron-right"></i>
                                </p>
                            </a>
                            <ul class="nav nav-treeview ps-4">
                                <li class="nav-item">
                                    <a href="?action=home&floor=OG" class="nav-link <?php if($_GET["action"]=="home" && $_GET["floor"] == "OG"){echo " active";} ?>">
                                        <p> OG</p>
                                    </a>
                                </li>
                                <li class="nav-item">
                                    <a href="?action=home&floor=EG" class="nav-link <?php if($_GET["action"]=="home" && $_GET["floor"] == "EG"){echo " active";} ?>">
                                        <p> EG</p>
                                    </a>
                                </li>
                                <li class="nav-item">
                                    <a href="?action=home&floor=UG" class="nav-link <?php if($_GET["action"]=="home" && $_GET["floor"] == "UG"){echo " active";} ?>">
                                        <p> UG</p>
                                    </a>
                                </li>
                            </ul>
                        </li>
                    </ul>
                    <!--end::Sidebar Menu-->
                </nav>
            </div>
            <!--end::Sidebar Wrapper-->
        </aside>
        <!--end::Sidebar-->