diff options
Diffstat (limited to 'includes/system/subsystem.php')
-rw-r--r-- | includes/system/subsystem.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/includes/system/subsystem.php b/includes/system/subsystem.php index 5d28cba..14d1b2a 100644 --- a/includes/system/subsystem.php +++ b/includes/system/subsystem.php @@ -1,5 +1,7 @@ <?php global $system; global $systemCommonName; global $parts; global $systemID; +if (str_ends_with($_GET['_'], "/subsystem")) header("Location: /?error=Invalid subsystem ID") and die(); + $members = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$systemID-members.json"), true); $subsystemID = $parts[3]; @@ -97,7 +99,7 @@ function timeAgo($time): string { $difference = round($difference); $period = $periods[$j] . ($difference >1 ? "s" :''); - return "{$difference} {$period} {$tense} "; + return "{$difference} {$period} {$tense}"; } if (getSubsystemByID($subsystemID) === null) header("Location: /?error=Invalid subsystem ID") and die(); @@ -114,7 +116,7 @@ $title = $subsystemData["name"] . " ยท " . $systemCommonName; require_once $_SER <div id="page-content"> <?php global $isLoggedIn; if ($isLoggedIn): ?> - <small style="opacity:.5;display:block;">(<a href="/edit/<?= $system ?>/<?= $subsystemID ?>">edit</a>)</small> + <small style="opacity:.5;display:block;">(<a href="/-/edit/<?= $system ?>/<?= $subsystemID ?>">edit</a>)</small> <?php endif; ?> <?= file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$systemID-subsystem-$subsystemID.html") ?> </div> |