From 5860551daa0f60103ad24e93da29f401a653f144 Mon Sep 17 00:00:00 2001 From: RaindropsSys Date: Fri, 29 Mar 2024 22:05:35 +0100 Subject: Updated 20 files, added 6 files, deleted 144 files and renamed .idea/ponycule.iml (automated) --- includes/system/history.inc | 174 -------------------------------------------- 1 file changed, 174 deletions(-) delete mode 100644 includes/system/history.inc (limited to 'includes/system') diff --git a/includes/system/history.inc b/includes/system/history.inc deleted file mode 100644 index ddf49bb..0000000 --- a/includes/system/history.inc +++ /dev/null @@ -1,174 +0,0 @@ - (86400 * ($day - 1)); - })); - - uksort($filtered, function ($a, $b) { - if (isset($b["timestamp"]) && isset($a["timestamp"])) { - return strtotime($b["timestamp"]) - strtotime($a["timestamp"]); - } else { - return null; - } - }); - - return $filtered; -} - -function getSwitchBefore(string $id) { - global $switches; - - $currentPassed = false; - $before = null; - - foreach ($switches as $switch) { - if ($currentPassed) { - $before = $switch; - break; - } else { - if ($switch["id"] === $id) { - $currentPassed = true; - } - } - } - - return $before; -} - -function isNotToday(int $timestamp, int $offset) { - if (date('Y-m-d', $timestamp) !== date('Y-m-d', time() - (86400 * $offset))) { - return true; - } else { - return false; - } -} - -if (!file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/cache/history.json")) file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/cache/history.json", "{}"); - -$cache = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/cache/history.json"), true); - -function page() { global $lang; global $systemCommonName; global $systemID; global $app; global $switches; global $isLoggedIn; global $isLowerLoggedIn; ?> -
-
- -

- - -

- -

No switches happened on that day

- - - -
- " style="opacity:.5;font-family: monospace;font-size:14px;vertical-align: middle;"> - - - - "> - " style="width:24px;"> - - 1): ?> - and - ">" style="width:24px;"> , ">" style="width:24px;"> , ">" style="width:24px;"> - - -
- -
- " style="opacity:.5;font-family: monospace;font-size:14px;vertical-align: middle;"> - - - - - -
- - - -
- - - - - - \ No newline at end of file -- cgit