diff options
author | Minteck <contact@minteck.org> | 2023-02-22 10:29:48 +0100 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2023-02-22 10:29:48 +0100 |
commit | bf2558253637537c2d57765e557bdc0e164c58ee (patch) | |
tree | 9c50b253090001183ba574cc073d13f74e273758 /includes | |
parent | 005bbb3c5b211dbb52cf8dcedac505f8a683cf42 (diff) | |
download | pluralconnect-bf2558253637537c2d57765e557bdc0e164c58ee.tar.gz pluralconnect-bf2558253637537c2d57765e557bdc0e164c58ee.tar.bz2 pluralconnect-bf2558253637537c2d57765e557bdc0e164c58ee.zip |
Updated 23 files, added assets/uploads/pt-princesscelestia.png and renamed assets/uploads/pt-luna.png (automated)
Diffstat (limited to 'includes')
-rw-r--r-- | includes/agewarning.inc | 42 | ||||
-rw-r--r-- | includes/banner.inc | 2 | ||||
-rw-r--r-- | includes/details.inc | 16 | ||||
-rw-r--r-- | includes/flags.json | 3 | ||||
-rw-r--r-- | includes/functions.inc | 2 | ||||
-rw-r--r-- | includes/init.inc | 8 | ||||
-rw-r--r-- | includes/navigation.inc | 104 | ||||
-rw-r--r-- | includes/pages.json | 40 | ||||
-rw-r--r-- | includes/pane.inc | 16 | ||||
-rw-r--r-- | includes/planner.inc | 42 | ||||
-rw-r--r-- | includes/score.inc | 1 | ||||
-rw-r--r-- | includes/session.inc | 46 | ||||
-rw-r--r-- | includes/short.inc | 1 | ||||
-rw-r--r-- | includes/sysbanner.inc | 16 | ||||
-rw-r--r-- | includes/system/history.inc | 9 | ||||
-rw-r--r-- | includes/system/history.old.inc | 40 |
16 files changed, 222 insertions, 166 deletions
diff --git a/includes/agewarning.inc b/includes/agewarning.inc index a7ab501..1f51647 100644 --- a/includes/agewarning.inc +++ b/includes/agewarning.inc @@ -3,17 +3,33 @@ function showWarning($name, $id, $system) { $ntfy = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/app.json"), true)["ntfy"]; - file_get_contents('https://' . $ntfy["server"] . '/' . $ntfy['topic'], false, stream_context_create([ - 'http' => [ - 'method' => 'POST', - 'header' => - "Content-Type: text/plain\r\n" . - "Title: ⚠️ $name does not have an age or birth year set\r\n" . - "Priority: max\r\n" . - "Tags: switch\r\n" . - "Actions: view, Edit on Cold Haze, https://ponies.equestria.horse/-/metadata/" . ($system === "gdapd" ? "raindrops" : "cloudburst") . "/" . $id . "/, clear=true\r\n" . - "Authorization: Basic " . base64_encode($ntfy["user"] . ":" . $ntfy["password"]), - 'content' => "To make sure they still appear on the fronting schedule after March 1st, they need to set an age or birth year now." - ] - ])); + if (time() > 1677628800) { + file_get_contents('https://' . $ntfy["server"] . '/' . $ntfy['topic'], false, stream_context_create([ + 'http' => [ + 'method' => 'POST', + 'header' => + "Content-Type: text/plain\r\n" . + "Title: ⚠️ $name does not have an age or birth year set\r\n" . + "Priority: max\r\n" . + "Tags: switch\r\n" . + "Actions: view, Edit on Cold Haze, https://ponies.equestria.horse/-/metadata/" . ($system === "gdapd" ? "raindrops" : "cloudburst") . "/" . $id . "/, clear=true\r\n" . + "Authorization: Basic " . base64_encode($ntfy["user"] . ":" . $ntfy["password"]), + 'content' => "To make sure they appear on the fronting schedule (and to make sure they can front again), they need to set an age or birth year now." + ] + ])); + } else { + file_get_contents('https://' . $ntfy["server"] . '/' . $ntfy['topic'], false, stream_context_create([ + 'http' => [ + 'method' => 'POST', + 'header' => + "Content-Type: text/plain\r\n" . + "Title: ⚠️ $name does not have an age or birth year set\r\n" . + "Priority: max\r\n" . + "Tags: switch\r\n" . + "Actions: view, Edit on Cold Haze, https://ponies.equestria.horse/-/metadata/" . ($system === "gdapd" ? "raindrops" : "cloudburst") . "/" . $id . "/, clear=true\r\n" . + "Authorization: Basic " . base64_encode($ntfy["user"] . ":" . $ntfy["password"]), + 'content' => "To make sure they still appear on the fronting schedule after March 1st, they need to set an age or birth year now." + ] + ])); + } }
\ No newline at end of file diff --git a/includes/banner.inc b/includes/banner.inc index 341b4e7..c96bedd 100644 --- a/includes/banner.inc +++ b/includes/banner.inc @@ -391,7 +391,7 @@ function getMemberBannerData(string $id, string $system, bool $french = false) { ]; } - if (($metadata["leader"] ?? false) && $isLoggedIn) { + if (($metadata["leader"] ?? false)) { $badges[] = [ "id" => "leader", "color" => "d6a833", diff --git a/includes/details.inc b/includes/details.inc index aced1ac..323352d 100644 --- a/includes/details.inc +++ b/includes/details.inc @@ -1,5 +1,5 @@ -<?php global $isLoggedIn; global $metadata; global $memberData; global $lang; global $pages; $pronouns = getMemberPronouns($memberData['pronouns']); ?> -<div id="member-details" class="<?= $isLoggedIn ? 'member-details-loggedIn' : '' ?>" style="<?php if (!$isLoggedIn): ?>grid-template-columns: repeat(4, 1fr);<?php endif; ?> background-color: <?= isset($memberData["color"]) ? '#' . $memberData["color"] . "33" : "transparent" ?>; margin-left: -20px; margin-right: -20px;"> +<?php global $isLoggedIn; global $metadata; global $memberData; global $isLowerLoggedIn; global $lang; global $pages; $pronouns = getMemberPronouns($memberData['pronouns']); ?> +<div id="member-details" class="<?= ($isLoggedIn || $isLowerLoggedIn) ? 'member-details-loggedIn' : '' ?>" style="<?php if (!$isLoggedIn && !$isLowerLoggedIn): ?>grid-template-columns: repeat(4, 1fr);<?php endif; ?> background-color: <?= isset($memberData["color"]) ? '#' . $memberData["color"] . "33" : "transparent" ?>; margin-left: -20px; margin-right: -20px;"> <div> <b><?= $lang["details"]["food"] ?></b><span class="member-small-separator"><br></span> <?= match ($metadata["food"]) { @@ -17,10 +17,10 @@ 2 => "<span data-bs-toggle='tooltip' title='" . str_replace("'", "'", ucfirst($pronouns["subjective"])) . ($pronouns["third"] ? " shares" : " share") . " all memories with " . str_replace("'", "'", $pronouns["possessive_det"]) . " headmates.'>" . $lang["details"]["memory_states"][2] . "</span>", } ?> </div> - <?php if ($isLoggedIn): ?> + <?php if ($isLoggedIn || $isLowerLoggedIn): ?> <div> <b>Age:</b><span class="member-small-separator"><br></span> - <?php if (!isset($metadata["birth"]["year"])): ?> + <?php if (!isset($metadata["birth"]["year"]) || $metadata["birth"]["age"] > 0): ?> <?php if ($metadata["birth"]["age"] === -1): $age = abs(log(0)); // => INF ?> <?= "<span data-bs-toggle='tooltip' title='" . str_replace("'", "'", ucfirst($pronouns["subjective"])) . " never age" . str_replace("'", "'", $pronouns["third"] ? "s" : "") . " and " . str_replace("'", "'", $pronouns["third"] ? "doesn't" : "don't") . " have a defined age, making " . str_replace("'", "'", $pronouns["object"]) . " pretty much eternal.'>Eternal</span>" ?> <?php elseif ($metadata["birth"]["age"] <= 0): ?> @@ -70,9 +70,10 @@ <?php endif; ?> </div> </div> -<?php if ($isLoggedIn): ?> -<div id="member-details-2" style="background-color: <?= isset($memberData["color"]) ? '#' . $memberData["color"] . "33" : "transparent" ?>; margin-left: -20px; margin-right: -20px;"> +<?php if ($isLoggedIn || $isLowerLoggedIn): ?> +<div id="member-details-2" style="background-color: <?= isset($memberData["color"]) ? '#' . $memberData["color"] . "33" : "transparent" ?>; margin-left: -20px; margin-right: -20px;<?php if ($isLowerLoggedIn): ?>grid-template-columns: repeat(3, 1fr);<?php endif; ?>"> <?php if (((isset($age) && $age >= 16 && $metadata["little"] === 0) || (!isset($age) && $metadata["little"] === 0)) || $metadata["sexual_features"]): ?> + <?php if ($isLoggedIn): ?> <div> <span style="vertical-align: middle;"> <b>Sexual consent:</b><span class="member-small-separator"><br></span> @@ -86,6 +87,7 @@ <img src="/assets/icons/warning.svg" style="width: 16px;" title="Although this pony is able to engage in sexual relationships, they are not allowed to have sex with ponies who are over 16 years old." data-bs-toggle="tooltip"> <?php endif; ?> </div> + <?php endif; ?> <div> <b><span class="member-detail-desktop">Sexual alignment</span><span class="member-detail-mobile">Sex. algn.</span>:</b><span class="member-small-separator"><br></span> <?php switch ($metadata["alignment"]["sexual"]) { @@ -110,7 +112,7 @@ <div> <style> #member-details-2 { - grid-template-columns: 2fr 1fr 1fr; + grid-template-columns: <?= $isLowerLoggedIn ? "1fr 1fr 1fr" : "2fr 1fr 1fr" ?>; } </style> <div style="display: flex; align-items: center; justify-content: center; height: 100%;opacity:.5;">This member is too young to be in a sexual relationship.</div> diff --git a/includes/flags.json b/includes/flags.json index 1802615..c4ccfce 100644 --- a/includes/flags.json +++ b/includes/flags.json @@ -19,5 +19,6 @@ "non_verbal": "Non verbal in real life", "less_frequent": "Fronts less frequently", "persecutor": "Persecutor", - "pacifier": "Sleeps with pacifier" + "pacifier": "Sleeps with pacifier", + "not_fronting": "Not fronting regularly" }
\ No newline at end of file diff --git a/includes/functions.inc b/includes/functions.inc index bdc961b..924bfae 100644 --- a/includes/functions.inc +++ b/includes/functions.inc @@ -178,7 +178,7 @@ if (!function_exists("getMiniName")) { function getMiniName(string $name) { $parts = explode(" ", $name); - if (strlen($parts[0]) > 3 && !str_ends_with($parts[0], "e") && $parts[0] !== "Filly" && $parts[0] !== "Windy" && (isset($parts[1]) && $parts[1] !== "Brightdawn")) { + if (strlen($parts[0]) > 3 && !str_ends_with($parts[0], "e") && $parts[0] !== "Filly" && $parts[0] !== "Windy" && (isset($parts[1]) && $parts[1] !== "Brightdawn" && $parts[1] !== "Fizz")) { if ($parts[0] === "Princess") { array_shift($parts); } diff --git a/includes/init.inc b/includes/init.inc index 53a6328..391a1bc 100644 --- a/includes/init.inc +++ b/includes/init.inc @@ -7,7 +7,7 @@ global $pages; global $lang; global $pages; $pages = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/pages.json"), true); -require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.inc"; global $isLoggedIn; +require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.inc"; global $isLoggedIn; global $isLowerLoggedIn; if (in_array($toplevel, array_keys($pages))) { $title = $pages[$toplevel]["name"][$lang["_name"]]; @@ -22,7 +22,11 @@ if (in_array($toplevel, array_keys($pages))) { $readOnly = true; } - if (!$isLoggedIn || ($readOnly && !$emergencyHeader)) header("Location: /-/login/?return=$toplevel") and die(); + if ($pages[$toplevel]["limited"]) { + if ((!$isLoggedIn && !$isLowerLoggedIn) || ($readOnly && !$emergencyHeader)) header("Location: /-/login/?return=$toplevel") and die(); + } else { + if (!$isLoggedIn || ($readOnly && !$emergencyHeader)) header("Location: /-/login/?return=$toplevel") and die(); + } } } else { $title = $toplevel; diff --git a/includes/navigation.inc b/includes/navigation.inc index 7f744b9..82b6046 100644 --- a/includes/navigation.inc +++ b/includes/navigation.inc @@ -18,7 +18,7 @@ global $lang; global $pages; $navigation_admin = [ "admin" => true, - "name" => $lang["navigation"]["admin"], + "name" => "Private utilities", "icon" => "/assets/icons/admin.svg", "invert" => true, "items" => [ @@ -31,14 +31,16 @@ $navigation_admin = [ "icon" => "/assets/icons/emergency.svg", "invert" => false, "link" => "/-/emergency", - "stepped" => "rgb(220,53,69)" + "stepped" => "rgb(220,53,69)", + "private" => false ], [ "name" => $pages["wakeup"]["name"][$lang["_name"]], "icon" => "/assets/icons/wakeup.svg", "invert" => false, "link" => "/-/wakeup", - "stepped" => "rgb(13,202,240)" + "stepped" => "rgb(13,202,240)", + "private" => false ] ] ], @@ -51,63 +53,72 @@ $navigation_admin = [ "icon" => "/assets/icons/about.svg", "invert" => true, "link" => "/-/about", - "stepped" => null + "stepped" => null, + "private" => false ], [ "name" => $pages["fronting"]["name"][$lang["_name"]], "icon" => "/assets/icons/fronting.svg", "invert" => true, "link" => "/-/fronting", - "stepped" => null + "stepped" => null, + "private" => false ], [ "name" => $pages["profiles"]["name"][$lang["_name"]], "icon" => "/assets/icons/profiles.svg", "invert" => true, "link" => "/-/profiles", - "stepped" => null + "stepped" => null, + "private" => false ], [ "name" => $pages["money"]["name"][$lang["_name"]], "icon" => "/assets/icons/money.svg", "invert" => true, "link" => "/-/money", - "stepped" => null + "stepped" => null, + "private" => true ], [ "name" => $pages["rules"]["name"][$lang["_name"]], "icon" => "/assets/icons/rules.svg", "invert" => true, "link" => "/-/rules", - "stepped" => null + "stepped" => null, + "private" => true ], [ "name" => $pages["docs"]["name"][$lang["_name"]], "icon" => "/assets/icons/docs.svg", "invert" => true, "link" => "/-/docs", - "stepped" => null + "stepped" => null, + "private" => true ], [ "name" => $pages["computers"]["name"][$lang["_name"]], "icon" => "/assets/icons/computers.svg", "invert" => true, "link" => "/-/computers", - "stepped" => null + "stepped" => null, + "private" => true ], [ "name" => $pages["travelling"]["name"][$lang["_name"]], "icon" => "/assets/icons/travelling.svg", "invert" => true, "link" => "/-/travelling", - "stepped" => null + "stepped" => null, + "private" => false ], [ "name" => $pages["stats"]["name"][$lang["_name"]], "icon" => "/assets/icons/stats.svg", "invert" => true, "link" => "/-/stats", - "stepped" => null + "stepped" => null, + "private" => true ] ] ], @@ -120,28 +131,32 @@ $navigation_admin = [ "icon" => "/assets/icons/splitting.svg", "invert" => true, "link" => "/-/splitting", - "stepped" => null + "stepped" => null, + "private" => false ], [ "name" => $pages["byfront"]["name"][$lang["_name"]], "icon" => "/assets/icons/byfront.svg", "invert" => true, "link" => "/-/byfront", - "stepped" => null + "stepped" => null, + "private" => false ], [ "name" => $pages["alphabet"]["name"][$lang["_name"]], "icon" => "/assets/icons/alphabet.svg", "invert" => true, "link" => "/-/alphabet", - "stepped" => null + "stepped" => null, + "private" => false ], [ "name" => $pages["s:species"]["name"][$lang["_name"]], "icon" => "/assets/icons/species.svg", "invert" => true, "link" => "/-/byspecies", - "stepped" => null + "stepped" => null, + "private" => false ], ] ], @@ -196,35 +211,32 @@ $navigation_global = [ "icon" => "/assets/icons/home.svg", "invert" => true, "link" => "/", - "stepped" => null + "stepped" => null, + "private" => false ], [ "name" => $pages["disclaimers"]["name"][$lang["_name"]], "icon" => "/assets/icons/disclaimers.svg", "invert" => true, "link" => "/-/disclaimers", - "stepped" => null + "stepped" => null, + "private" => false ], [ "name" => $pages["relations"]["name"][$lang["_name"]], "icon" => "/assets/icons/relations.svg", "invert" => true, "link" => "/-/relations", - "stepped" => null + "stepped" => null, + "private" => false ], - ($_SERVER['HTTP_HOST'] !== "fr.equestria.horse" ? [ - "name" => $pages["government"]["name"][$lang["_name"]], - "icon" => "/assets/icons/government.svg", - "invert" => true, - "link" => "/-/government", - "stepped" => null - ] : null), [ "name" => $pages["terminology"]["name"][$lang["_name"]], "icon" => "/assets/icons/terminology.svg", "invert" => true, "link" => "/-/terminology", - "stepped" => null + "stepped" => null, + "private" => false ] ] ] @@ -245,28 +257,24 @@ $navigation_cloudburst = [ "icon" => "/assets/icons/about.svg", "invert" => true, "link" => "/cloudburst", - "stepped" => null + "stepped" => null, + "private" => false ], [ "name" => $pages["s:history"]["name"][$lang["_name"]], "icon" => "/assets/icons/history.svg", "invert" => true, "link" => "/cloudburst/-/history", - "stepped" => null + "stepped" => null, + "private" => false ], [ "name" => $pages["s:compare"]["name"][$lang["_name"]], "icon" => "/assets/icons/compare.svg", "invert" => true, "link" => "/cloudburst/-/compare", - "stepped" => null - ], - [ - "name" => $pages["s:species"]["name"][$lang["_name"]], - "icon" => "/assets/icons/species.svg", - "invert" => true, - "link" => "/cloudburst/-/species", - "stepped" => null + "stepped" => null, + "private" => false ] ] ], @@ -294,7 +302,8 @@ $navigation_cloudburst = [ "icon" => getAsset($member["system"], $member["id"], "heads"), "invert" => false, "link" => "/$member[name]", - "stepped" => null + "stepped" => null, + "private" => false ]; }, array_filter(scoreOrder(withTravelers(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/ynmuc/members.json"), true), "ynmuc"), "ynmuc"), function ($member) { return $member['name'] !== "unknown" && $member['name'] !== "fusion" && $member['name'] !== "new"; @@ -317,28 +326,24 @@ $navigation_raindrops = [ "icon" => "/assets/icons/about.svg", "invert" => true, "link" => "/raindrops", - "stepped" => null + "stepped" => null, + "private" => false ], [ "name" => $pages["s:history"]["name"][$lang["_name"]], "icon" => "/assets/icons/history.svg", "invert" => true, "link" => "/raindrops/-/history", - "stepped" => null + "stepped" => null, + "private" => false ], [ "name" => $pages["s:compare"]["name"][$lang["_name"]], "icon" => "/assets/icons/compare.svg", "invert" => true, "link" => "/raindrops/-/compare", - "stepped" => null - ], - [ - "name" => $pages["s:species"]["name"][$lang["_name"]], - "icon" => "/assets/icons/species.svg", - "invert" => true, - "link" => "/raindrops/-/species", - "stepped" => null + "stepped" => null, + "private" => false ] ] ], @@ -366,7 +371,8 @@ $navigation_raindrops = [ "icon" => getAsset($member["system"], $member["id"], "heads"), "invert" => false, "link" => "/$member[name]", - "stepped" => null + "stepped" => null, + "private" => false ]; }, array_filter(scoreOrder(withTravelers(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/gdapd/members.json"), true), "gdapd"), "gdapd"), function ($member) { return $member['name'] !== "unknown" && $member['name'] !== "fusion" && $member['name'] !== "new"; diff --git a/includes/pages.json b/includes/pages.json index 985a224..eca0fe4 100644 --- a/includes/pages.json +++ b/includes/pages.json @@ -6,6 +6,7 @@ }, "short": "About", "admin": true, + "limited": true, "rail": true }, "actions": { @@ -15,6 +16,7 @@ }, "short": "Actions", "admin": true, + "limited": false, "rail": true }, "alphabet": { @@ -24,6 +26,7 @@ }, "short": null, "admin": false, + "limited": false, "rail": false }, "api": { @@ -33,6 +36,7 @@ }, "short": null, "admin": false, + "limited": false, "rail": false }, "app": { @@ -42,6 +46,7 @@ }, "short": null, "admin": false, + "limited": false, "rail": false }, "byfront": { @@ -51,6 +56,7 @@ }, "short": "Last fronts", "admin": true, + "limited": true, "rail": true }, "computers": { @@ -60,6 +66,7 @@ }, "short": "PCs", "admin": true, + "limited": false, "rail": true }, "dashboard": { @@ -69,6 +76,7 @@ }, "short": null, "admin": true, + "limited": false, "rail": true }, "debug": { @@ -78,6 +86,7 @@ }, "short": null, "admin": false, + "limited": false, "rail": true }, "docs": { @@ -87,6 +96,7 @@ }, "short": "Docs", "admin": true, + "limited": false, "rail": true }, "disclaimers": { @@ -96,6 +106,7 @@ }, "short": null, "admin": false, + "limited": false, "rail": false }, "edit": { @@ -105,6 +116,7 @@ }, "short": null, "admin": true, + "limited": false, "rail": false }, "edit-private": { @@ -114,6 +126,7 @@ }, "short": null, "admin": true, + "limited": false, "rail": false }, "emergency": { @@ -123,6 +136,7 @@ }, "short": null, "admin": true, + "limited": false, "rail": true }, "fronting": { @@ -132,6 +146,7 @@ }, "short": null, "admin": true, + "limited": true, "rail": true }, "government": { @@ -141,6 +156,7 @@ }, "short": null, "admin": false, + "limited": false, "rail": false }, "home": { @@ -150,6 +166,7 @@ }, "short": null, "admin": false, + "limited": false, "rail": false }, "login": { @@ -159,6 +176,7 @@ }, "short": null, "admin": false, + "limited": false, "rail": false }, "logout": { @@ -168,6 +186,7 @@ }, "short": null, "admin": false, + "limited": false, "rail": false }, "metadata": { @@ -177,6 +196,7 @@ }, "short": "Metadata", "admin": true, + "limited": false, "rail": false }, "money": { @@ -186,6 +206,7 @@ }, "short": "Money", "admin": true, + "limited": false, "rail": false }, "nicknames": { @@ -195,6 +216,7 @@ }, "short": "Nicknames", "admin": true, + "limited": false, "rail": true }, "page": { @@ -204,6 +226,7 @@ }, "short": null, "admin": false, + "limited": false, "rail": false }, "pleasure": { @@ -213,6 +236,7 @@ }, "short": null, "admin": true, + "limited": false, "rail": true }, "profiles": { @@ -222,6 +246,7 @@ }, "short": null, "admin": true, + "limited": true, "rail": true }, "relations": { @@ -231,6 +256,7 @@ }, "short": null, "admin": false, + "limited": false, "rail": false }, "rules": { @@ -240,6 +266,7 @@ }, "short": "Rules", "admin": true, + "limited": false, "rail": true }, "s:compare": { @@ -249,6 +276,7 @@ }, "short": null, "admin": false, + "limited": false, "rail": false }, "s:history": { @@ -258,6 +286,7 @@ }, "short": null, "admin": false, + "limited": false, "rail": false }, "s:species": { @@ -267,6 +296,7 @@ }, "short": null, "admin": false, + "limited": false, "rail": false }, "s:tree": { @@ -276,6 +306,7 @@ }, "short": null, "admin": false, + "limited": false, "rail": false }, "score": { @@ -285,6 +316,7 @@ }, "short": null, "admin": true, + "limited": true, "rail": true }, "splitting": { @@ -294,6 +326,7 @@ }, "short": "Splits", "admin": true, + "limited": true, "rail": true }, "stats": { @@ -303,6 +336,7 @@ }, "short": "Stats", "admin": true, + "limited": false, "rail": true }, "terminology": { @@ -312,6 +346,7 @@ }, "short": null, "admin": false, + "limited": false, "rail": true }, "together": { @@ -321,6 +356,7 @@ }, "short": "Together", "admin": true, + "limited": true, "rail": false }, "together-dev": { @@ -330,6 +366,7 @@ }, "short": null, "admin": true, + "limited": true, "rail": false }, "toys": { @@ -339,6 +376,7 @@ }, "short": "Toys", "admin": true, + "limited": false, "rail": true }, "travelling": { @@ -348,6 +386,7 @@ }, "short": "Travels", "admin": true, + "limited": true, "rail": true }, "wakeup": { @@ -357,6 +396,7 @@ }, "short": null, "admin": true, + "limited": false, "rail": true } }
\ No newline at end of file diff --git a/includes/pane.inc b/includes/pane.inc index e95747e..0a546a5 100644 --- a/includes/pane.inc +++ b/includes/pane.inc @@ -1,4 +1,4 @@ -<?php global $isLoggedIn; global $isUserLoggedIn; global $pages; global $navigation; $byColor = getMembersByColor($_SERVER['HTTP_HOST'] === "fr.equestria.horse"); global $lang; global $pages; ?> +<?php global $isLoggedIn; global $isLowerLoggedIn; global $pages; global $navigation; $byColor = getMembersByColor($_SERVER['HTTP_HOST'] === "fr.equestria.horse"); global $lang; global $pages; ?> <?php if ($_SERVER['HTTP_HOST'] === "fr.equestria.horse"): ?> <div id="pane-header-background" style="background-image: linear-gradient(90deg, <?php @@ -43,11 +43,11 @@ foreach ($list as $color) { </a> </div> -<?php if ($isLoggedIn || $isUserLoggedIn): ?> +<?php if ($isLoggedIn || $isLowerLoggedIn): ?> <a onclick="toggleGlobalSearch();" id="login-link" class="login-link-clickable"> <?= $lang["navigation"]["search"] ?> </a> -<?php elseif (!$isLoggedIn && !$isUserLoggedIn): ?> +<?php else: ?> <a href="/-/login" id="login-link" class="login-link-clickable"> <?php global $_PROFILE; ?> <img alt="" src="/assets/icons/login.svg" style="filter:invert(1);width:24px;vertical-align: middle;"> @@ -56,7 +56,7 @@ foreach ($list as $color) { <?php endif; ?> <?php endif; ?> -<?php foreach ($navigation as $id => $item): if (!$item["admin"] || $isLoggedIn): ?> +<?php foreach ($navigation as $id => $item): if (!$item["admin"] || $isLoggedIn || $isLowerLoggedIn): ?> <div class="pane-group" id="pane-group-<?= $id ?>"> <div class="pane-group-title"> @@ -64,19 +64,19 @@ foreach ($list as $color) { <span style="vertical-align: middle;"><?= $item["name"] ?></span> </div> - <?php foreach ($item["items"] as $category): ?> + <?php foreach ($item["items"] as $category): if (!($category["minimal"] && $isLowerLoggedIn)): ?> <div class="pane-group-category <?= $category["minimal"] ? "pane-group-category-minimal" : "" ?>" <?= $category["minimal"] ? 'style="display: grid; grid-template-columns: repeat(' . count($category["items"]) . ', 1fr); grid-gap: 10px;"' : "" ?>> <?php if (isset($category["name"])): ?> <div class="pane-group-category-title"><?= $category["name"] ?></div> <?php endif; ?> - <?php foreach ($category["items"] as $link): if (isset($link)): ?> + <?php foreach ($category["items"] as $link): if (isset($link)): if (!($isLowerLoggedIn && $link["private"])): ?> <a class="pane-group-item" href="<?= $link["link"] ?>"> <img src="<?= $link["icon"] ?>" <?php if ($link["invert"]): ?>class="dropdown-icon"<?php endif; ?> alt="" style="width:24px; border-radius: 5px; vertical-align: middle;"> <?php if (!$category["minimal"]): ?><span style="vertical-align: middle;<?= isset($link["stepped"]) ? "color: $link[stepped];" : "" ?>"><?= isset($link["stepped"]) ? "<b>$link[name]</b>" : $link["name"] ?></span><?php endif; ?> </a> - <?php endif; endforeach; ?> + <?php endif; endif; endforeach; ?> </div> - <?php endforeach; ?> + <?php endif; endforeach; ?> </div> <?php endif; endforeach; ?> diff --git a/includes/planner.inc b/includes/planner.inc index 1bc5143..ce6e0cb 100644 --- a/includes/planner.inc +++ b/includes/planner.inc @@ -4,7 +4,7 @@ require_once $_SERVER["DOCUMENT_ROOT"] . "/includes/travelling.inc"; global $tra require_once $_SERVER["DOCUMENT_ROOT"] . "/includes/score.inc"; require_once $_SERVER["DOCUMENT_ROOT"] . "/includes/pronouns.inc"; require_once $_SERVER["DOCUMENT_ROOT"] . "/includes/bitset.inc"; -require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.inc"; global $isLoggedIn; global $isUserLoggedIn; +require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.inc"; global $isLoggedIn; global $isUserLoggedIn; global $isLowerLoggedIn; require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/banner.inc"; require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/rainbow.inc"; require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/functions.inc"; @@ -14,9 +14,11 @@ $cloudburst = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includ $raindrops = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/planner/gdapd.json"), true); function pacifier($id) { + global $isLowerLoggedIn; + $metadata = parseMetadata(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/" . $id . ".json"), true)); - if ($metadata["pacifier"]) { + if ($metadata["pacifier"] && !$isLowerLoggedIn) { return "<img title='This pony likes to sleep with a pacifier.' data-bs-toggle='tooltip' src='/assets/logo/pacifier.png' style='margin-left:auto;float: right;opacity:.75;width:24px;height:24px;vertical-align: middle; filter: invert(1);'>"; } @@ -113,6 +115,7 @@ function formatTime($time) { function school($time, $first = false) { global $school; global $_PROFILE; + global $isLowerLoggedIn; $day = date('Y-m-d', $time); $parts = []; @@ -127,6 +130,8 @@ function school($time, $first = false) { } } + if ($isLowerLoggedIn) $parts = []; + if (count($parts) > 0) { if ($first) { return ucfirst(implode(", ", $parts)); @@ -142,7 +147,7 @@ function school($time, $first = false) { } } -function day($display, $diff): void { if ($diff < 0) $disabled = true; else $disabled = false; global $cloudburst; global $raindrops; ?> +function day($display, $diff): void { if ($diff < 0) $disabled = true; else $disabled = false; global $cloudburst; global $raindrops; global $isLowerLoggedIn; ?> <?php if (!isset($display)) { $display = date('l', time() + (86400 * $diff)); } @@ -194,10 +199,10 @@ function day($display, $diff): void { if ($diff < 0) $disabled = true; else $dis <?php endif; ?> </td> <?php if (!isset($dayCloudburst[$index][1])): ?> - <td class="planner-cofronter-inner planner-link" style="width:5%;text-align:center;border-left-color: transparent;border-bottom-color: transparent;"> + <td class="planner-cofronter-inner planner-link" style="width:5%;text-align:center;border-left-color: transparent;border-bottom-color: transparent;"><?php if (!$isLowerLoggedIn): ?> <a onclick="addCofronter('cloudburst', <?= $diff ?>, <?= $index ?>);" class="planner-add-link planner-add-link-cofronter"> <span class="planner-add-link-cofronter-inner"><img src="/assets/icons/add.svg" alt="" class="planner-add-icon"></span> - </a> + </a><?php endif; ?> </td> <?php else: ?> <td class="planner-link" style="border-bottom-color: transparent;width:41.35vw;" colspan="2"> @@ -211,7 +216,7 @@ function day($display, $diff): void { if ($diff < 0) $disabled = true; else $dis <?php endif; ?> </td> <?php endif; ?> - <?php elseif ($index === count($dayCloudburst)): ?> + <?php elseif ($index === count($dayCloudburst)): if (!$isLowerLoggedIn): ?> <td class="planner-add-inner planner-link" colspan="5" style="border-top-color: transparent;border-bottom-color: transparent;"> <a onclick="addFronter('cloudburst', <?= $diff ?>, <?= $index ?>);" id="planner-add-link-cloudburst-<?= $diff ?>" class="planner-add-link"> <div class="planner-add-link-inner"> @@ -220,7 +225,7 @@ function day($display, $diff): void { if ($diff < 0) $disabled = true; else $dis </div> </a> </td> - <?php else: ?> + <?php endif; else: ?> <td colspan="5" class="planner-empty" style="border-top-color:transparent;border-bottom-color:transparent;"></td> <?php endif; ?> <?php if (isset($dayRaindrops[$index])): ?> @@ -238,13 +243,13 @@ function day($display, $diff): void { if ($diff < 0) $disabled = true; else $dis <?php endif; ?> </td> <?php if (!isset($dayRaindrops[$index][1])): ?> - <td class="planner-cofronter-inner planner-link" style="border-bottom-color: transparent;border-left-color: transparent;width:5%;text-align:center;"> + <td class="planner-cofronter-inner planner-link" style="border-bottom-color: transparent;border-left-color: transparent;width:5%;text-align:center;"><?php if (!$isLowerLoggedIn): ?> <a onclick="addCofronter('raindrops', <?= $diff ?>, <?= $index ?>);" class="planner-add-link planner-add-link-cofronter"> <span class="planner-add-link-cofronter-inner"><img src="/assets/icons/add.svg" alt="" class="planner-add-icon"></span> - </a> + </a><?php endif; ?> </td> <?php else: ?> - <td class="planner-link" style="width:41.35vw;" colspan="2"> + <td class="planner-link" style="border-bottom-color:transparent;width:41.35vw;" colspan="2"> <?php $member = getMemberWithoutSystem($dayRaindrops[$index][1]); ?> <?php if ($member["name"] === "fusion"): ?> <a class="member-link" onclick="openEditCofronter('raindrops', <?= $index ?>, '<?= date('Y-m-d', time() + (86400 * $diff)) ?>')"><span class="member-link-inner"><img src="/assets/logo/newlogo.png" style="filter:grayscale(1);width:24px;"> <span class="member-link-text"><span class="merge-desktop" style="opacity:.75;">Multiple merged members</span></span></span></a> @@ -255,7 +260,7 @@ function day($display, $diff): void { if ($diff < 0) $disabled = true; else $dis <?php endif; ?> </td> <?php endif; ?> - <?php elseif ($index === count($dayRaindrops)): ?> + <?php elseif ($index === count($dayRaindrops)): if (!$isLowerLoggedIn): ?> <td class="planner-add-inner planner-link" colspan="5" style="border-top-color: transparent;border-bottom-color: transparent;"> <a onclick="addFronter('raindrops', <?= $diff ?>, <?= $index ?>);" id="planner-add-link-raindrops-<?= $diff ?>" class="planner-add-link"> <div class="planner-add-link-inner"> @@ -264,7 +269,7 @@ function day($display, $diff): void { if ($diff < 0) $disabled = true; else $dis </div> </a> </td> - <?php else: ?> + <?php endif; else: ?> <td colspan="5" class="planner-empty" style="border-top-color:transparent;border-bottom-color:transparent;"></td> <?php endif; ?> </tr> @@ -473,7 +478,6 @@ function day($display, $diff): void { if ($diff < 0) $disabled = true; else $dis .member-link:hover .member-link-inner, .planner-add-link:hover .planner-add-link-inner, .planner-add-link-cofronter:hover .planner-add-link-cofronter-inner { background-color: rgba(255, 255, 255, .125); - /*background-color: rgba(255, 255, 255, .25);*/ } </style> @@ -862,15 +866,15 @@ function day($display, $diff): void { if ($diff < 0) $disabled = true; else $dis <p class="text-muted">Editing for the <span id="edit-fronter-system">n/a</span></p> <div class="list-group" id="list-cloudburst"> - <a class="list-group-item list-group-item-action edit-fronter-link" onclick="deleteFronter();"> + <a class="list-group-item list-group-item-action edit-fronter-link <?= $isLowerLoggedIn ? "disabled" : "" ?>" onclick="deleteFronter();"> <img src="/assets/icons/delete.svg" style="width:24px;filter:invert(1);vertical-align: middle;"> <span style="vertical-align: middle;">Delete</span> </a> - <a class="list-group-item list-group-item-action edit-fronter-link" onclick="moveFronterUp();"> + <a class="list-group-item list-group-item-action edit-fronter-link <?= $isLowerLoggedIn ? "disabled" : "" ?>" onclick="moveFronterUp();"> <img src="/assets/icons/up.svg" style="width:24px;filter:invert(1);vertical-align: middle;"> <span style="vertical-align: middle;">Move up</span> </a> - <a class="list-group-item list-group-item-action edit-fronter-link" onclick="moveFronterDown();"> + <a class="list-group-item list-group-item-action edit-fronter-link <?= $isLowerLoggedIn ? "disabled" : "" ?>" onclick="moveFronterDown();"> <img src="/assets/icons/down.svg" style="width:24px;filter:invert(1);vertical-align: middle;"> <span style="vertical-align: middle;">Move down</span> </a> @@ -898,14 +902,10 @@ function day($display, $diff): void { if ($diff < 0) $disabled = true; else $dis <p class="text-muted">Editing for the <span id="edit-cofronter-system">n/a</span></p> <div class="list-group" id="list-cloudburst"> - <a class="list-group-item list-group-item-action edit-cofronter-link" onclick="deleteCofronter();"> + <a class="list-group-item list-group-item-action edit-cofronter-link <?= $isLowerLoggedIn ? "disabled" : "" ?>" onclick="deleteCofronter();"> <img src="/assets/icons/delete.svg" style="width:24px;filter:invert(1);vertical-align: middle;"> <span style="vertical-align: middle;">Delete</span> </a> - <!--<a class="list-group-item list-group-item-action edit-fronter-link" onclick="invertCofronter();"> - <img src="/assets/icons/invert.svg" style="width:24px;filter:invert(1);vertical-align: middle;"> - <span style="vertical-align: middle;">Invert main and secondary fronters</span> - </a>--> <a class="list-group-item list-group-item-action edit-cofronter-link" onclick="viewCofronterPage();"> <img src="/assets/icons/page.svg" style="width:24px;filter:invert(1);vertical-align: middle;"> <span style="vertical-align: middle;">View page</span> diff --git a/includes/score.inc b/includes/score.inc index 703b9cc..96925bf 100644 --- a/includes/score.inc +++ b/includes/score.inc @@ -17,6 +17,7 @@ function calculateScore($metadata, $name) { $scoreAdd = 0; if ($name === "Cloudy Dreams") $scoreAdd += 250; + if ($name === "Princess Celestia") $scoreAdd += 250; if ($name === "Scootaloo") $scoreAdd -= 235; $score = $scoreLeader + $scorePersecutor + $scoreFictive + $scoreLittle + $scoreNotTalking + $scoreProtector + $scoreSharedMemory + $scoreRelations + $scoreSpecies + $scoreName + $scoreMedian + $scoreAdd; diff --git a/includes/session.inc b/includes/session.inc index 4e2569c..5c94e92 100644 --- a/includes/session.inc +++ b/includes/session.inc @@ -1,41 +1,27 @@ <?php global $isLoggedIn; -global $isUserLoggedIn; +global $isLowerLoggedIn; global $_PROFILE; -if (isset($_COOKIE['PEH2_SESSION_TOKEN'])) { - if (str_contains($_COOKIE['PEH2_SESSION_TOKEN'], ".") || str_contains($_COOKIE['PEH2_SESSION_TOKEN'], "/") || trim($_COOKIE["PEH2_SESSION_TOKEN"]) === "") { - $isLoggedIn = false; - } +$isLoggedIn = false; +$isLowerLoggedIn = false; - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/tokens/" . str_replace(".", "", str_replace("/", "", $_COOKIE['PEH2_SESSION_TOKEN'])))) { - $_PROFILE = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/tokens/" . str_replace(".", "", str_replace("/", "", $_COOKIE['PEH2_SESSION_TOKEN']))), true); - - if (isset($_GET['invert'])) { - $_PROFILE["login"] = $_PROFILE["login"] === "raindrops" ? "cloudburst" : "raindrops"; - $_PROFILE["name"] = $_PROFILE["name"] === "Raindrops System" ? "Cloudburst System" : "Raindrops System"; - } +if (isset($_COOKIE['PEH2_SESSION_TOKEN'])) { + if (!(str_contains($_COOKIE['PEH2_SESSION_TOKEN'], ".") || str_contains($_COOKIE['PEH2_SESSION_TOKEN'], "/") || trim($_COOKIE["PEH2_SESSION_TOKEN"]) === "")) { + if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/tokens/" . str_replace(".", "", str_replace("/", "", $_COOKIE['PEH2_SESSION_TOKEN'])))) { + $_PROFILE = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/tokens/" . str_replace(".", "", str_replace("/", "", $_COOKIE['PEH2_SESSION_TOKEN']))), true); - $isLoggedIn = true; - } else { - $isLoggedIn = false; - } -} else { - $isLoggedIn = false; -} + if (isset($_GET['invert'])) { + $_PROFILE["login"] = $_PROFILE["login"] === "raindrops" ? "cloudburst" : "raindrops"; + $_PROFILE["name"] = $_PROFILE["name"] === "Raindrops System" ? "Cloudburst System" : "Raindrops System"; + } -if (isset($_COOKIE['PEH2_USER_TOKEN'])) { - if (str_contains($_COOKIE['PEH2_USER_TOKEN'], ".") || str_contains($_COOKIE['PEH2_USER_TOKEN'], "/")) { - $isUserLoggedIn = false; - } + $isLoggedIn = true; + } elseif (file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/lowertokens/" . str_replace(".", "", str_replace("/", "", $_COOKIE['PEH2_SESSION_TOKEN'])))) { + $_PROFILE = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/lowertokens/" . str_replace(".", "", str_replace("/", "", $_COOKIE['PEH2_SESSION_TOKEN']))), true); - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/tokens-public/" . str_replace(".", "", str_replace("/", "", $_COOKIE['PEH2_USER_TOKEN'])))) { - $_PROFILE = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/tokens-public/" . str_replace(".", "", str_replace("/", "", $_COOKIE['PEH2_USER_TOKEN']))), true); - $isUserLoggedIn = true; - } else { - $isUserLoggedIn = false; + $isLowerLoggedIn = true; + } } -} else { - $isUserLoggedIn = false; }
\ No newline at end of file diff --git a/includes/short.inc b/includes/short.inc index fe0baa5..dda38d0 100644 --- a/includes/short.inc +++ b/includes/short.inc @@ -13,6 +13,7 @@ $list = [ "cb" => "/cloudburst", "minty" => "/cloudydreams", "twilight" => "/twi", + "luna" => "/princessluna", "cloudy" => "/cloudydreams", "zipp" => "/zippstorm", "babs" => "/babsseed", diff --git a/includes/sysbanner.inc b/includes/sysbanner.inc index f9feb5c..d240869 100644 --- a/includes/sysbanner.inc +++ b/includes/sysbanner.inc @@ -50,8 +50,8 @@ $pages = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/pa <?php $member = $fronters["members"][0]; ?> <a class="member-link" href="/<?= $member["name"] ?>"><img src="<?= getAsset($systemID, $member["id"], "heads") ?>" style="width:24px;"> <?= getMiniName($member["display_name"] ?? ($member["name"] === "fusion" ? "<peh-muted>" . $lang["system"]["more"] . "</peh-muted>" : $member["name"])) ?></a> <?php if (count($fronters["members"]) > 1): ?> - <br>(<?= $lang["system"]["with"] ?> - <?php if (isset($fronters["members"][1])): ?><?php $member2 = $fronters["members"][1]; ?><a class="member-link" href="/<?= $member2["name"] ?>"><img src="<?= getAsset($systemID, $member2["id"], "heads") ?>" style="width:24px;"> <?= getMiniName($member2["display_name"] ?? ($member2["name"] === "fusion" ? "<peh-muted>" . $lang["system"]["more"] . "</peh-muted>" : $member2["name"])) ?></a><?php endif; ?><?php if (isset($fronters["members"][2])): ?><?php $member2 = $fronters["members"][2]; ?>, <a class="member-link" href="/<?= $member2["name"] ?>"><img src="<?= getAsset($systemID, $member2["id"], "heads") ?>" style="width:24px;"> <?= getMiniName($member2["display_name"] ?? ($member2["name"] === "fusion" ? "<peh-muted>" . $lang["system"]["more"] . "</peh-muted>" : $member2["name"])) ?></a><?php endif; ?><?php if (isset($fronters["members"][3])): ?><?php $member2 = $fronters["members"][3]; ?>, <a class="member-link" href="/<?= $member2["name"] ?>"><img src="<?= getAsset($systemID, $member2["id"], "heads") ?>" style="width:24px;"> <?= getMiniName($member2["display_name"] ?? ($member2["name"] === "fusion" ? "<peh-muted>" . $lang["system"]["more"] . "</peh-muted>" : $member2["name"])) ?></a><?php endif; ?>)<?php endif; ?> + <br>and + <?php if (isset($fronters["members"][1])): ?><?php $member2 = $fronters["members"][1]; ?><a class="member-link" href="/<?= $member2["name"] ?>"><img src="<?= getAsset($systemID, $member2["id"], "heads") ?>" style="width:24px;"> <?= getMiniName($member2["display_name"] ?? ($member2["name"] === "fusion" ? "<peh-muted>" . $lang["system"]["more"] . "</peh-muted>" : $member2["name"])) ?></a><?php endif; ?><?php if (isset($fronters["members"][2])): ?><?php $member2 = $fronters["members"][2]; ?>, <a class="member-link" href="/<?= $member2["name"] ?>"><img src="<?= getAsset($systemID, $member2["id"], "heads") ?>" style="width:24px;"> <?= getMiniName($member2["display_name"] ?? ($member2["name"] === "fusion" ? "<peh-muted>" . $lang["system"]["more"] . "</peh-muted>" : $member2["name"])) ?></a><?php endif; ?><?php if (isset($fronters["members"][3])): ?><?php $member2 = $fronters["members"][3]; ?>, <a class="member-link" href="/<?= $member2["name"] ?>"><img src="<?= getAsset($systemID, $member2["id"], "heads") ?>" style="width:24px;"> <?= getMiniName($member2["display_name"] ?? ($member2["name"] === "fusion" ? "<peh-muted>" . $lang["system"]["more"] . "</peh-muted>" : $member2["name"])) ?></a><?php endif; ?><?php endif; ?> <?php else: ?>-<?php endif; ?> </span> <span> @@ -74,7 +74,7 @@ $pages = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/pa ?> <a class="member-link" href="/<?= $member["name"] ?>"><img src="<?= getAsset($systemID, $member["id"], "heads") ?>" style="width:24px;"> <?= getMiniName($member["display_name"] ?? ($member["name"] === "fusion" ? "<peh-muted>" . $lang["system"]["more"] . "</peh-muted>" : $member["name"])) ?></a> <?php if (count($previous) > 1): ?> - <br>(<?= $lang["system"]["with"] ?> <?php if (isset($previous[1])): ?><?php $member2 = getMemberWithoutSystem($previous[1]); ?><a class="member-link" href="/<?= $member2["name"] ?>"><img src="<?= getAsset($systemID, $member2["id"], "heads") ?>" style="width:24px;"> <?= getMiniName($member2["display_name"] ?? ($member2["name"] === "fusion" ? "<peh-muted>" . $lang["system"]["more"] . "</peh-muted>" : $member2["name"])) ?></a><?php endif; ?><?php if (isset($previous[2])): ?><?php $member2 = getMemberWithoutSystem($previous[2]); ?>, <a class="member-link" href="/<?= $member2["name"] ?>"><img src="<?= getAsset($systemID, $member2["id"], "heads") ?>" style="width:24px;"> <?= getMiniName($member2["display_name"] ?? ($member2["name"] === "fusion" ? "<peh-muted>" . $lang["system"]["more"] . "</peh-muted>" : $member2["name"])) ?></a><?php endif; ?><?php if (isset($previous[3])): ?><?php $member2 = getMemberWithoutSystem($previous[3]); ?>, <a class="member-link" href="/<?= $member2["name"] ?>"><img src="<?= getAsset($systemID, $member2["id"], "heads") ?>" style="width:24px;"> <?= getMiniName($member2["display_name"] ?? ($member2["name"] === "fusion" ? "<peh-muted>" . $lang["system"]["more"] . "</peh-muted>" : $member2["name"])) ?></a><?php endif; ?>) + <br>and <?php if (isset($previous[1])): ?><?php $member2 = getMemberWithoutSystem($previous[1]); ?><a class="member-link" href="/<?= $member2["name"] ?>"><img src="<?= getAsset($systemID, $member2["id"], "heads") ?>" style="width:24px;"> <?= getMiniName($member2["display_name"] ?? ($member2["name"] === "fusion" ? "<peh-muted>" . $lang["system"]["more"] . "</peh-muted>" : $member2["name"])) ?></a><?php endif; ?><?php if (isset($previous[2])): ?><?php $member2 = getMemberWithoutSystem($previous[2]); ?>, <a class="member-link" href="/<?= $member2["name"] ?>"><img src="<?= getAsset($systemID, $member2["id"], "heads") ?>" style="width:24px;"> <?= getMiniName($member2["display_name"] ?? ($member2["name"] === "fusion" ? "<peh-muted>" . $lang["system"]["more"] . "</peh-muted>" : $member2["name"])) ?></a><?php endif; ?><?php if (isset($previous[3])): ?><?php $member2 = getMemberWithoutSystem($previous[3]); ?>, <a class="member-link" href="/<?= $member2["name"] ?>"><img src="<?= getAsset($systemID, $member2["id"], "heads") ?>" style="width:24px;"> <?= getMiniName($member2["display_name"] ?? ($member2["name"] === "fusion" ? "<peh-muted>" . $lang["system"]["more"] . "</peh-muted>" : $member2["name"])) ?></a><?php endif; ?> <?php endif; ?> <?php else: ?>-<?php endif; ?> </span> @@ -102,7 +102,7 @@ $pages = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/pa </div> </div> -<div id="system-actions" style="padding:5px 30px;display:grid;grid-template-columns: 1fr 1fr 1fr 1fr;background-color:rgba(255, 255, 255, .025);margin-left: -20px; margin-right: -20px;"> +<div id="system-actions" style="padding:5px 30px;display:grid;grid-template-columns: 1fr 1fr;background-color:rgba(255, 255, 255, .025);margin-left: -20px; margin-right: -20px;"> <a title="<?= $pages["s:history"]["name"][$lang["_name"]] ?>" data-bs-toggle="tooltip" style="display:inline-block;padding:5px 10px;text-align: center" class="system-action tooltip-nohelp" href="/<?= $system ?>/-/history"> <img src="/assets/icons/history.svg" style="vertical-align: middle;height: 24px;width: 24px;filter: invert(1)" alt=""> <span style="vertical-align: middle;" class="list-separator-desktop"><?= $pages["s:history"]["name"][$lang["_name"]] ?></span> @@ -111,12 +111,12 @@ $pages = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/pa <img src="/assets/icons/compare.svg" style="vertical-align: middle;height: 24px;width: 24px;filter: invert(1)" alt=""> <span style="vertical-align: middle;" class="list-separator-desktop"><?= $pages["s:compare"]["name"][$lang["_name"]] ?></span> </a> - <a title="<?= $pages["s:tree"]["name"][$lang["_name"]] ?>" data-bs-toggle="tooltip" style="display:inline-block;padding:5px 10px;text-align: center" class="system-action tooltip-nohelp" href="/<?= $system ?>/-/tree"> + <!--<a title="<?= $pages["s:tree"]["name"][$lang["_name"]] ?>" data-bs-toggle="tooltip" style="display:inline-block;padding:5px 10px;text-align: center" class="system-action tooltip-nohelp" href="/<?= $system ?>/-/tree"> <img src="/assets/icons/tree.svg" style="vertical-align: middle;height: 24px;width: 24px;filter: invert(1)" alt=""> <span style="vertical-align: middle;" class="list-separator-desktop"><?= $pages["s:tree"]["name"][$lang["_name"]] ?></span> - </a> - <a title="<?= $pages["s:species"]["name"][$lang["_name"]] ?>" data-bs-toggle="tooltip" style="display:inline-block;padding:5px 10px;text-align: center" class="system-action tooltip-nohelp" href="/<?= $system ?>/-/species"> + </a>--> + <!--<a title="<?= $pages["s:species"]["name"][$lang["_name"]] ?>" data-bs-toggle="tooltip" style="display:inline-block;padding:5px 10px;text-align: center" class="system-action tooltip-nohelp" href="/<?= $system ?>/-/species"> <img src="/assets/icons/species.svg" style="vertical-align: middle;height: 24px;width: 24px;filter: invert(1)" alt=""> <span style="vertical-align: middle;" class="list-separator-desktop"><?= $pages["s:species"]["name"][$lang["_name"]] ?></span> - </a> + </a>--> </div>
\ No newline at end of file diff --git a/includes/system/history.inc b/includes/system/history.inc index b66b8c4..ee7f762 100644 --- a/includes/system/history.inc +++ b/includes/system/history.inc @@ -56,10 +56,9 @@ function getMember(string $id) { $original = str_replace("Sat", "Sam.", $original); $original = str_replace("Sun", "Dim.", $original); - return $original; - } else { - return $original; } + + return $original; } function getSwitchesForDay(int $day) { @@ -145,8 +144,8 @@ function getMember(string $id) { <img src="<?= getAsset($systemID, $member["id"], "heads") ?>" style="width:24px;"> <?= $member["display_name"] ?? $member["name"] ?> </a> <?php if (count($switch["members"]) > 1): ?> - (<?= $lang["system"]["with"] ?> - <?php if (isset($switch["members"][1])): $member2 = getMember($switch["members"][1]); ?><a class="member-link" href="/<?= $member2["name"] ?>"><img src="<?= getAsset($systemID, $member2["id"], "heads") ?>" style="width:24px;"> <?= $member2["display_name"] ?? $member2["name"] ?></a><?php endif; ?><?php if (isset($switch["members"][2])): $member2 = getMember($switch["members"][2]); ?>, <a class="member-link" href="/<?= $member2["name"] ?>"><img src="<?= getAsset($systemID, $member2["id"], "heads") ?>" style="width:24px;"> <?= $member2["display_name"] ?? $member2["name"] ?></a><?php endif; ?><?php if (isset($switch["members"][3])): $member2 = getMember($switch["members"][3]); ?>, <a class="member-link" href="/<?= $member2["name"] ?>"><img src="<?= getAsset($systemID, $member2["id"], "heads") ?>" style="width:24px;"> <?= $member2["display_name"] ?? $member2["name"] ?></a><?php endif; ?>) + and + <?php if (isset($switch["members"][1])): $member2 = getMember($switch["members"][1]); ?><a class="member-link" href="/<?= $member2["name"] ?>"><img src="<?= getAsset($systemID, $member2["id"], "heads") ?>" style="width:24px;"> <?= $member2["display_name"] ?? $member2["name"] ?></a><?php endif; ?><?php if (isset($switch["members"][2])): $member2 = getMember($switch["members"][2]); ?>, <a class="member-link" href="/<?= $member2["name"] ?>"><img src="<?= getAsset($systemID, $member2["id"], "heads") ?>" style="width:24px;"> <?= $member2["display_name"] ?? $member2["name"] ?></a><?php endif; ?><?php if (isset($switch["members"][3])): $member2 = getMember($switch["members"][3]); ?>, <a class="member-link" href="/<?= $member2["name"] ?>"><img src="<?= getAsset($systemID, $member2["id"], "heads") ?>" style="width:24px;"> <?= $member2["display_name"] ?? $member2["name"] ?></a><?php endif; ?> <?php endif; ?> </span> </div> diff --git a/includes/system/history.old.inc b/includes/system/history.old.inc index ee687d7..060ba97 100644 --- a/includes/system/history.old.inc +++ b/includes/system/history.old.inc @@ -123,8 +123,8 @@ function getMember(string $id) { <img src="<?= getAsset($systemID, $member["id"], "heads") ?>" style="width:24px;"> <?= $member["display_name"] ?? $member["name"] ?> </a> <?php if (isset($fronter["member2"])): $member2 = getMember($fronter["member2"]); ?> - (with <a class="member-link" href="/<?= $member2["name"] ?>"> - <img src="<?= getAsset($systemID, $member2["id"], "heads") ?>" style="width:24px;"> <?= $member2["display_name"] ?? $member2["name"] ?></a>) + and <a class="member-link" href="/<?= $member2["name"] ?>"> + <img src="<?= getAsset($systemID, $member2["id"], "heads") ?>" style="width:24px;"> <?= $member2["display_name"] ?? $member2["name"] ?></a> <?php endif; ?> </span> </div> @@ -166,8 +166,8 @@ function getMember(string $id) { <img src="<?= getAsset($systemID, $member["id"], "heads") ?>" style="width:24px;"> <?= $member["display_name"] ?? $member["name"] ?> </a> <?php if (isset($fronter["member2"])): $member2 = getMember($fronter["member2"]); ?> - (with <a class="member-link" href="/<?= $member2["name"] ?>"> - <img src="<?= getAsset($systemID, $member2["id"], "heads") ?>" style="width:24px;"> <?= $member2["display_name"] ?? $member2["name"] ?></a>) + and <a class="member-link" href="/<?= $member2["name"] ?>"> + <img src="<?= getAsset($systemID, $member2["id"], "heads") ?>" style="width:24px;"> <?= $member2["display_name"] ?? $member2["name"] ?></a> <?php endif; ?> </span> </div> @@ -209,8 +209,8 @@ function getMember(string $id) { <img src="<?= getAsset($systemID, $member["id"], "heads") ?>" style="width:24px;"> <?= $member["display_name"] ?? $member["name"] ?> </a> <?php if (isset($fronter["member2"])): $member2 = getMember($fronter["member2"]); ?> - (with <a class="member-link" href="/<?= $member2["name"] ?>"> - <img src="<?= getAsset($systemID, $member2["id"], "heads") ?>" style="width:24px;"> <?= $member2["display_name"] ?? $member2["name"] ?></a>) + and <a class="member-link" href="/<?= $member2["name"] ?>"> + <img src="<?= getAsset($systemID, $member2["id"], "heads") ?>" style="width:24px;"> <?= $member2["display_name"] ?? $member2["name"] ?></a> <?php endif; ?> </span> </div> @@ -252,8 +252,8 @@ function getMember(string $id) { <img src="<?= getAsset($systemID, $member["id"], "heads") ?>" style="width:24px;"> <?= $member["display_name"] ?? $member["name"] ?> </a> <?php if (isset($fronter["member2"])): $member2 = getMember($fronter["member2"]); ?> - (with <a class="member-link" href="/<?= $member2["name"] ?>"> - <img src="<?= getAsset($systemID, $member2["id"], "heads") ?>" style="width:24px;"> <?= $member2["display_name"] ?? $member2["name"] ?></a>) + and <a class="member-link" href="/<?= $member2["name"] ?>"> + <img src="<?= getAsset($systemID, $member2["id"], "heads") ?>" style="width:24px;"> <?= $member2["display_name"] ?? $member2["name"] ?></a> <?php endif; ?> </span> </div> @@ -295,8 +295,8 @@ function getMember(string $id) { <img src="<?= getAsset($systemID, $member["id"], "heads") ?>" style="width:24px;"> <?= $member["display_name"] ?? $member["name"] ?> </a> <?php if (isset($fronter["member2"])): $member2 = getMember($fronter["member2"]); ?> - (with <a class="member-link" href="/<?= $member2["name"] ?>"> - <img src="<?= getAsset($systemID, $member2["id"], "heads") ?>" style="width:24px;"> <?= $member2["display_name"] ?? $member2["name"] ?></a>) + and <a class="member-link" href="/<?= $member2["name"] ?>"> + <img src="<?= getAsset($systemID, $member2["id"], "heads") ?>" style="width:24px;"> <?= $member2["display_name"] ?? $member2["name"] ?></a> <?php endif; ?> </span> </div> @@ -338,8 +338,8 @@ function getMember(string $id) { <img src="<?= getAsset($systemID, $member["id"], "heads") ?>" style="width:24px;"> <?= $member["display_name"] ?? $member["name"] ?> </a> <?php if (isset($fronter["member2"])): $member2 = getMember($fronter["member2"]); ?> - (with <a class="member-link" href="/<?= $member2["name"] ?>"> - <img src="<?= getAsset($systemID, $member2["id"], "heads") ?>" style="width:24px;"> <?= $member2["display_name"] ?? $member2["name"] ?></a>) + and <a class="member-link" href="/<?= $member2["name"] ?>"> + <img src="<?= getAsset($systemID, $member2["id"], "heads") ?>" style="width:24px;"> <?= $member2["display_name"] ?? $member2["name"] ?></a> <?php endif; ?> </span> </div> @@ -381,8 +381,8 @@ function getMember(string $id) { <img src="<?= getAsset($systemID, $member["id"], "heads") ?>" style="width:24px;"> <?= $member["display_name"] ?? $member["name"] ?> </a> <?php if (isset($fronter["member2"])): $member2 = getMember($fronter["member2"]); ?> - (with <a class="member-link" href="/<?= $member2["name"] ?>"> - <img src="<?= getAsset($systemID, $member2["id"], "heads") ?>" style="width:24px;"> <?= $member2["display_name"] ?? $member2["name"] ?></a>) + and <a class="member-link" href="/<?= $member2["name"] ?>"> + <img src="<?= getAsset($systemID, $member2["id"], "heads") ?>" style="width:24px;"> <?= $member2["display_name"] ?? $member2["name"] ?></a> <?php endif; ?> </span> </div> @@ -424,8 +424,8 @@ function getMember(string $id) { <img src="<?= getAsset($systemID, $member["id"], "heads") ?>" style="width:24px;"> <?= $member["display_name"] ?? $member["name"] ?> </a> <?php if (isset($fronter["member2"])): $member2 = getMember($fronter["member2"]); ?> - (with <a class="member-link" href="/<?= $member2["name"] ?>"> - <img src="<?= getAsset($systemID, $member["id"], "heads") ?>" style="width:24px;"> <?= $member2["display_name"] ?? $member2["name"] ?></a>) + and <a class="member-link" href="/<?= $member2["name"] ?>"> + <img src="<?= getAsset($systemID, $member["id"], "heads") ?>" style="width:24px;"> <?= $member2["display_name"] ?? $member2["name"] ?></a> <?php endif; ?> </span> </div> @@ -467,8 +467,8 @@ function getMember(string $id) { <img src="<?= getAsset($systemID, $member["id"], "heads") ?>" style="width:24px;"> <?= $member["display_name"] ?? $member["name"] ?> </a> <?php if (isset($fronter["member2"])): $member2 = getMember($fronter["member2"]); ?> - (with <a class="member-link" href="/<?= $member2["name"] ?>"> - <img src="<?= getAsset($systemID, $member["id"], "heads") ?>" style="width:24px;"> <?= $member2["display_name"] ?? $member2["name"] ?></a>) + and <a class="member-link" href="/<?= $member2["name"] ?>"> + <img src="<?= getAsset($systemID, $member["id"], "heads") ?>" style="width:24px;"> <?= $member2["display_name"] ?? $member2["name"] ?></a> <?php endif; ?> </span> </div> @@ -504,8 +504,8 @@ function getMember(string $id) { <img src="<?= getAsset($systemID, $member["id"], "heads") ?>" style="width:24px;"> <?= $member["display_name"] ?? $member["name"] ?> </a> <?php if (isset($fronter["member2"])): $member2 = getMember($fronter["member2"]); ?> - (with <a class="member-link" href="/<?= $member2["name"] ?>"> - <img src="<?= getAsset($systemID, $member["id"], "heads") ?>" style="width:24px;"> <?= $member2["display_name"] ?? $member2["name"] ?></a>) + <a class="member-link" href="/<?= $member2["name"] ?>"> + <img src="<?= getAsset($systemID, $member["id"], "heads") ?>" style="width:24px;"> <?= $member2["display_name"] ?? $member2["name"] ?></a> <?php endif; ?> </span> </div> |