diff options
Diffstat (limited to 'pages')
-rw-r--r-- | pages/api.inc | 2 | ||||
-rw-r--r-- | pages/contacts.inc | 4 | ||||
-rw-r--r-- | pages/schedules.inc | 12 |
3 files changed, 9 insertions, 9 deletions
diff --git a/pages/api.inc b/pages/api.inc index 418df76..8bcea02 100644 --- a/pages/api.inc +++ b/pages/api.inc @@ -7,7 +7,7 @@ if (str_ends_with($_GET['_'], "/")) { } $toplevel = explode("/", $pagename)[1]; -$middlelevel = explode("/", $pagename)[2]; +$middlelevel = explode("/", $pagename)[2] ?? null; if (isset($middlelevel) && file_exists($_SERVER['DOCUMENT_ROOT'] . "/pages/api/" . $toplevel . "/" . $middlelevel . ".php") && is_file($_SERVER['DOCUMENT_ROOT'] . "/pages/api/" . $toplevel . "/" . $middlelevel . ".php")) { require_once $_SERVER['DOCUMENT_ROOT'] . "/pages/api/" . $toplevel . "/" . $middlelevel . ".php"; diff --git a/pages/contacts.inc b/pages/contacts.inc index 9239274..b93460a 100644 --- a/pages/contacts.inc +++ b/pages/contacts.inc @@ -93,7 +93,7 @@ uasort($contacts, function ($a, $b) { <?php endif; ?> </span> </div> - <div class="text-muted" style="margin-top: 10px;"><?= $Parsedown->text($contact["description"]) ?></div> + <div class="text-muted" style="margin-top: 10px;"><?= $Parsedown->text($contact["description"] ?? "") ?></div> </div> <div style="display: grid; grid-template-columns: 3fr max-content;"> <span> @@ -112,7 +112,7 @@ uasort($contacts, function ($a, $b) { <a data-bs-toggle="dropdown" style="text-decoration: underline; cursor: pointer;">...</a> <ul class="dropdown-menu"> <?php foreach ($data["copy"] as $action): ?> - <li><a style="cursor: pointer;" class="dropdown-item" onclick="copyToClipboard('<?= base64_encode($action["text"]) ?>');"><?= $action["title"] ?></a></li> + <li><a style="cursor: pointer;" class="dropdown-item" onclick="copyToClipboard('<?= base64_encode($action["text"] ?? "") ?>');"><?= $action["title"] ?></a></li> <?php endforeach; ?> </ul> </div> diff --git a/pages/schedules.inc b/pages/schedules.inc index fae5984..9b1c5eb 100644 --- a/pages/schedules.inc +++ b/pages/schedules.inc @@ -40,7 +40,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/composer/ical/ical.php"; <h3 id="live-time-other">--:--</h3> </div> - <?php + <!--<?php $weekDay = (int)date('N'); @@ -61,7 +61,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/composer/ical/ical.php"; echo('<div class="alert alert-success"><b><span class="invert">🎉</span> No work today!</b></div>'); } - ?> + ?>--> <ul> <li><b>Anchorage:</b> <span id="live-time-other1">--:--</span></li> @@ -77,7 +77,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/composer/ical/ical.php"; <h3 id="live-time-cloudburst">--:--</h3> </div> - <?php + <!--<?php $calendar = new \om\IcalParser(); $calendar->parseFile($_SERVER['DOCUMENT_ROOT'] . "/includes/data/calendar.ics"); @@ -102,7 +102,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/composer/ical/ical.php"; echo('<div class="alert alert-success"><b><span class="invert">🎉</span> No college today!</b></div>'); } - ?> + ?>--> <hr style="display: none;" class="schedules-separator"> </div> @@ -113,7 +113,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/composer/ical/ical.php"; <h3 id="live-time-raindrops">--:--</h3> </div> - <?php + <!--<?php $school = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/school.json"), true); @@ -137,7 +137,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/composer/ical/ical.php"; } } - ?> + ?>--> </div> </div> </div> |