summaryrefslogtreecommitdiff
path: root/app/planner
diff options
context:
space:
mode:
Diffstat (limited to 'app/planner')
-rw-r--r--app/planner/index.php69
1 files changed, 69 insertions, 0 deletions
diff --git a/app/planner/index.php b/app/planner/index.php
new file mode 100644
index 0000000..30f09dd
--- /dev/null
+++ b/app/planner/index.php
@@ -0,0 +1,69 @@
+<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.php"; global $isLoggedIn; if (!$isLoggedIn) header("Location: /login") and die(); ?>
+
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <title>Planner</title>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
+ <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
+ <style>
+ body {
+ background-color: black !important;
+ color: white;
+ }
+
+ .alert, .alert .btn, .alert code {
+ filter: hue-rotate(180deg);
+ }
+
+ .alert {
+ filter: invert(1) hue-rotate(180deg);
+ }
+
+ .member-link {
+ color: white !important;
+ text-decoration: none !important;
+ }
+ </style>
+</head>
+<body>
+ <div class="container">
+ <br>
+ <?php
+
+ require_once $_SERVER["DOCUMENT_ROOT"] . "/includes/score.php";
+ require_once $_SERVER["DOCUMENT_ROOT"] . "/includes/bitset.php";
+
+ function getMiniName(string $name) {
+ $parts = explode(" ", $name);
+
+ if (strlen($parts[0]) > 3 && !str_ends_with($parts[0], "e") && $parts[0] !== "Filly") {
+ if (str_contains($parts[0], "/")) {
+ return explode("/", $parts[0])[0];
+ } else {
+ return $parts[0];
+ }
+ } else {
+ return $name;
+ }
+ }
+
+ function getSystemMember(string $system, string $id) {
+ $systemID = $system;
+
+ $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;
+ }
+
+ return $member;
+ }
+
+ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/planner.php"; ?>
+ </div>
+</body>
+</html> \ No newline at end of file