From 105d105c4da36ab784f8c51f5f3b3c24caf71cd3 Mon Sep 17 00:00:00 2001 From: willwheeler Date: Thu, 18 Jun 2026 20:14:37 +0000 Subject: [PATCH] Upload files to "/" --- test.php | 1787 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1787 insertions(+) create mode 100644 test.php diff --git a/test.php b/test.php new file mode 100644 index 0000000..dcd32a7 --- /dev/null +++ b/test.php @@ -0,0 +1,1787 @@ +auth()) { + // Rebuild cust / site / key indexes from session — same logic as index.php sidebar + $custIndex = isset($_SESSION["custIndex"]) ? $_SESSION["custIndex"] : 0; + $custList = $Client->getCustList($_SESSION["office"]); + $siteIndex = isset($_SESSION["siteIndex"]) ? $_SESSION["siteIndex"] : 0; + $siteList = $Client->getSites($custList[$custIndex]["id"]); + $keyIndex = isset($_SESSION["keyIndex"]) ? $_SESSION["keyIndex"] : 0; + $keyList = $BasData->getKeys($siteList[$siteIndex]["id"]); + if (count($keyList) > 0 && isset($keyList[$keyIndex])) { + $basKeyid = $keyList[$keyIndex]["id"]; // ← this is what index.php puts in #sitekeys value + $basKeyname = $keyList[$keyIndex]["keyname"]; // ← this is what you see in the dropdown ("asp") + $basLiveHint = ""; + } +} +// Optional override: test.php?keyid=3 (same number as asp dropdown value on index) +if (isset($_GET["keyid"]) && $_GET["keyid"] !== "") { + $basKeyid = (int)$_GET["keyid"]; +} +// Force sample data: test.php?sample=1 (ignores login — auto-loads rtu-sample.js + veris-sample.js) +$basForceSample = isset($_GET["sample"]) && $_GET["sample"] !== "" && $_GET["sample"] !== "0"; +if ($basForceSample) { + $basKeyid = null; + $basLiveHint = "Sample data mode — rtu-sample.js and veris-sample.js (matches forecast.py)."; +} +// Force forecast overlay: test.php?forecast=1 (auto-loads forecast_output.json) +$basForceForecast = isset($_GET["forecast"]) && $_GET["forecast"] !== "" && $_GET["forecast"] !== "0"; +// reports.php iframe: test.php?embed=1 hides duplicate page title +$basEmbed = isset($_GET["embed"]) && $_GET["embed"] !== "" && $_GET["embed"] !== "0"; +// Optional: test.php?interval=48&tstamp=NOW (or YYYY-MM-DD) — same as reports sidebar +$basInterval = 35; +if (isset($_GET["interval"]) && $_GET["interval"] !== "") { + $basInterval = min(max(8, (int)$_GET["interval"]), 72); +} +$basTstamp = "NOW"; +if (isset($_GET["tstamp"]) && $_GET["tstamp"] !== "") { + $basTstamp = $_GET["tstamp"]; +} +?> + + + + + + + BAS Data + + + + + + +
+ + +
+ +

Device Snapshot

+ + +
+ +
Live key: (keyid )
+ + +
+
+
+
+
+
+
+ + + + + + +
+
+ + + +
+
+ + + | + Show: +
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+ + + +
+
+
+
+
+ Fan runtime + -- +
+
+
+
+
+
+
+
+ Power runtime + -- +
+
+
+
+
+
+
+
+ Room temp + -- +
+
+
+
+
+
+
+ +
+
+ + | + +
+
+
+ + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+ + + + + + + + + + +