ENDE; } } else if (checkLogin()) { /* * Seitentabelle: Vorlage, Seitenskripte und welche Bibliotheken die Seite * ueberhaupt braucht. Frueher wurden Chart.js, MQTT & Co. auf jeder Seite * geladen - die Home-Seite etwa zeichnet gar keine Diagramme. */ $pages = [ "solar" => ["template" => "solar.php", "mqtt" => true, "charts" => true, "meteogram" => true, "leaflet" => false, "scripts" => ["js/solar/jahresstatistik.js", "js/solar/anlageKatalog.js", "js/solar/anlage.js", "js/solar/speicher.js", "js/solar/energieflussKatalog.js", "js/solar/energiefluss.js", "js/solar/bewaesserungAnzeige.js", "js/solar/ladefenster.js", "js/solar/bedienfenster.js", "js/solar/solarMQTT.js"]], "home" => ["template" => "home.php", "mqtt" => true, "charts" => false, "meteogram" => false, "leaflet" => false, "scripts" => ["js/solar/autoActionFuncs.js", "js/solar/zeitleiste.js", "js/solar/raumfenster.js", "js/solar/homeMQTT.js"]], "heat" => ["template" => "heat.php", "mqtt" => true, "charts" => true, "meteogram" => false, "leaflet" => false, "scripts" => ["js/solar/heatMQTT.js"]], "history" => ["template" => "history.php", "mqtt" => false, "charts" => true, "meteogram" => false, "leaflet" => false, "scripts" => ["js/solar/jahresstatistik.js", "js/solar/historyMQTT.js"]], "skoda" => ["template" => "skoda.php", "mqtt" => true, "charts" => true, "meteogram" => false, "leaflet" => true, "scripts" => ["js/solar/skodaMQTT.js"]], "weather" => ["template" => "weather.php", "mqtt" => true, "charts" => false, "meteogram" => true, "leaflet" => false, "scripts" => ["js/solar/weatherMQTT.js"]], "settings" => ["template" => "settings.php", "mqtt" => false, "charts" => false, "meteogram" => false, "leaflet" => false, "scripts" => ["js/solar/settings.js", "js/solar/grundriss.js", "js/solar/anlageKatalog.js", "js/solar/energieflussKatalog.js", "js/solar/energiefluss.js", "js/solar/energieflussEinstellungen.js", "js/solar/benachrichtigungen.js"]], "logs" => ["template" => "logs.php", "mqtt" => false, "charts" => false, "meteogram" => false, "leaflet" => false, "scripts" => ["js/solar/logs.js"]], "einfuehrung" => ["template" => "einfuehrung.php", "mqtt" => false, "charts" => false, "meteogram" => false, "leaflet" => false, "scripts" => ["js/solar/einfuehrung.js"]], ]; // Anzeige für ein festes Display (Raspberry Pi, 800 x 480): die Solar-Seite // ohne Kopfleiste und Menue, mit schmaler Leiste - header.php und // footer.php richten sich nach "anzeige", js/solar/anzeige.js macht den Rest. $pages["anzeige"] = $pages["solar"]; $pages["anzeige"]["anzeige"] = true; $pages["anzeige"]["scripts"][] = "js/solar/anzeige.js"; // Unbekannte oder fehlende Aktion faellt auf die Solar-Seite zurueck. if (!isset($_GET["action"]) || !isset($pages[$_GET["action"]])) { $_GET["action"] = "solar"; } $page = $pages[$_GET["action"]]; include "restricted/header.php"; include "restricted/" . $page["template"]; include "restricted/footer.php"; } else { echo << ENDE; }