diff options
Diffstat (limited to 'app/planner/index.php')
-rw-r--r-- | app/planner/index.php | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/app/planner/index.php b/app/planner/index.php index 775fec3..0ae3663 100644 --- a/app/planner/index.php +++ b/app/planner/index.php @@ -1,4 +1,4 @@ -<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.php"; global $isLoggedIn; if (!$isLoggedIn) header("Location: /-/login") and die(); ?> +<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.inc"; global $isLoggedIn; if (!$isLoggedIn) header("Location: /-/login") and die(); ?> <!DOCTYPE html> <html lang="en"> @@ -33,13 +33,13 @@ <br> <?php - require_once $_SERVER["DOCUMENT_ROOT"] . "/includes/score.php"; - require_once $_SERVER["DOCUMENT_ROOT"] . "/includes/bitset.php"; + require_once $_SERVER["DOCUMENT_ROOT"] . "/includes/score.inc"; + require_once $_SERVER["DOCUMENT_ROOT"] . "/includes/bitset.inc"; function getMiniName(string $name) { $parts = explode(" ", $name); - if (strlen($parts[0]) > 3 && !str_ends_with($parts[0], "e") && $parts[0] !== "Filly" && $parts[0] !== "Windy") { + if (strlen($parts[0]) > 3 && !str_ends_with($parts[0], "e") && $parts[0] !== "Filly" && $parts[0] !== "Windy" && (isset($parts[1]) && $parts[1] !== "Brightdawn")) { if (str_contains($parts[0], "/")) { return explode("/", $parts[0])[0]; } else { @@ -53,17 +53,19 @@ function getSystemMember(string $system, string $id) { $systemID = $system; - $members = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$systemID-members.json"), true); + $members = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$systemID/members.json"), true); $member = null; foreach ($members as $m) { if ($m["id"] === $id) $member = $m; } + $member["system"] = $member["_system"] = $system; + return $member; } - require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/planner.php"; ?> + require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/planner.inc"; ?> </div> </body> </html>
\ No newline at end of file |