summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
Diffstat (limited to 'includes')
-rw-r--r--includes/components/2023ui.inc18
-rw-r--r--includes/components/emergency.inc8
-rw-r--r--includes/components/fullbanner.inc14
-rw-r--r--includes/components/header.inc8
-rw-r--r--includes/components/pleasure.inc10
-rw-r--r--includes/components/sysbanner.inc15
-rw-r--r--includes/components/timeline.inc2
-rw-r--r--includes/external/signal/index.js6
-rw-r--r--includes/fragments/dashboard.inc37
-rw-r--r--includes/fragments/member.inc35
-rw-r--r--includes/fragments/system.inc4
-rw-r--r--includes/jobs/FrontersNotification.php4
-rw-r--r--includes/jobs/PKFronters.php6
-rw-r--r--includes/jobs/RefreshCache.php2
-rw-r--r--includes/jobs/UpdateAssets.php3
-rw-r--r--includes/maintenance/deleteUnusedAssets.php6
-rw-r--r--includes/reminder.php21
-rw-r--r--includes/system/history.inc2
-rw-r--r--includes/util/agewarning.inc4
-rw-r--r--includes/util/banner.inc22
-rw-r--r--includes/util/functions.inc58
-rw-r--r--includes/util/homepage.inc9
-rw-r--r--includes/util/rainbow.inc12
-rw-r--r--includes/util/score.inc28
-rw-r--r--includes/util/session.inc5
-rw-r--r--includes/util/short.inc3
-rw-r--r--includes/util/travelling.inc61
27 files changed, 60 insertions, 343 deletions
diff --git a/includes/components/2023ui.inc b/includes/components/2023ui.inc
index 40c2d00..7b74395 100644
--- a/includes/components/2023ui.inc
+++ b/includes/components/2023ui.inc
@@ -152,9 +152,9 @@
<div style="height: 52px; display: flex; align-items: center;">
<?php global $isLowerLoggedIn; global $isLoggedIn; global $_PROFILE; if ($isLoggedIn || $isLowerLoggedIn): ?>
<a href="https://account.equestria.dev/hub/users/<?= $_PROFILE["id"] ?>" target="_blank" style="color: inherit; text-decoration: inherit;">
- <?php $fronters = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . ($_PROFILE["login"] === "raindrops" ? "gdapd" : ($_PROFILE["login"] === "cloudburst" ? "ynmuc" : ($_PROFILE["login"] === "Moonwind" ? "hrbom" : "other"))) . "/fronters.json"), true); if (isset($fronters["members"][0])): ?>
+ <?php $fronters = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . ($_PROFILE["login"] === "raindrops" ? "gdapd" : ($_PROFILE["login"] === "Moonglow" ? "hrbom" : "other")) . "/fronters.json"), true); if (isset($fronters["members"][0])): ?>
<span class="mobile-hide" style="margin-right: 5px; vertical-align: middle; margin-top: -2px;"><?= $fronters["members"][0]["display_name"] ?? $fronters["members"][0]["name"] ?></span>
- <img src="<?= getAsset(($_PROFILE["login"] === "raindrops" ? "gdapd" : ($_PROFILE["login"] === "cloudburst" ? "ynmuc" : ($_PROFILE["login"] === "Moonwind" ? "hrbom" : "other"))), $fronters["members"][0]["id"]) ?>" style="width: 32px; height: 32px; border-radius: 999px; background-color: var(--palette-2);">
+ <img src="<?= getAsset(($_PROFILE["login"] === "raindrops" ? "gdapd" : ($_PROFILE["login"] === "Moonglow" ? "hrbom" : "other")), $fronters["members"][0]["id"]) ?>" style="width: 32px; height: 32px; border-radius: 999px; background-color: var(--palette-2);">
<?php else: ?>
<span class="mobile-hide" style="margin-right: 5px; vertical-align: middle; margin-top: -2px;"><?= $_PROFILE["name"] ?></span>
<img class="antialias" src="https://account.equestria.dev/hub/api/rest/avatar/<?= $_PROFILE["id"] ?>?dpr=2&size=32" style="width: 32px; height: 32px; border-radius: 999px; background-color: var(--palette-2);">
@@ -188,10 +188,7 @@
<div id="side-bar" style="position: fixed; top: 62px; bottom: 20px; left: 0; width: 64px; display: flex; justify-content: center;">
<div>
<div id="side-bar-systems" style="background-color: var(--palette-4); height: max-content; border-radius: 999px;">
- <a data-bs-toggle="tooltip" data-bs-placement="right" title="Cloudburst System" class="ui2023-side-bar-system" href="/cloudburst" style="padding: 8px; height: 48px; width: 48px; display: block; border-top-left-radius: 999px; border-top-right-radius: 999px;">
- <img class="antialias" src="<?= getAsset("ynmuc") ?>" style="max-width: 32px; max-height: 32px;">
- </a>
- <a data-bs-toggle="tooltip" data-bs-placement="right" title="Raindrops System" class="ui2023-side-bar-system" href="/raindrops" style="padding: 8px; height: 48px; width: 48px; display: block;">
+ <a data-bs-toggle="tooltip" data-bs-placement="right" title="Raindrops System" class="ui2023-side-bar-system" href="/raindrops" style="padding: 8px; height: 48px; width: 48px; display: block; border-top-left-radius: 999px; border-top-right-radius: 999px;">
<img class="antialias" class="antialias" src="<?= getAsset("gdapd") ?>" style="max-width: 32px; max-height: 32px;">
</a>
<?php global $app; if ($isLoggedIn || $isLowerLoggedIn): ?>
@@ -208,15 +205,6 @@
<a data-bs-toggle="tooltip" data-bs-placement="right" title="Relations" class="ui2023-side-bar-item" href="/-/relations" style="padding: 10px; height: 48px; width: 48px; display: block; border-radius: 999px;">
<img src="<?= icon("relations") ?>" style="max-width: 28px; max-height: 28px;">
</a>
-
- <?php if ($isLoggedIn): ?>
- <a data-bs-toggle="tooltip" data-bs-placement="right" title="Money tracker" class="ui2023-side-bar-item" href="/-/money" style="padding: 10px; height: 48px; width: 48px; display: block; border-radius: 999px;">
- <img src="<?= icon("money") ?>" style="max-width: 28px; max-height: 28px;">
- </a>
- <a data-bs-toggle="tooltip" data-bs-placement="right" title="System travelling" class="ui2023-side-bar-item" href="/-/travelling" style="padding: 10px; height: 48px; width: 48px; display: block; border-radius: 999px;">
- <img src="<?= icon("travelling") ?>" style="max-width: 28px; max-height: 28px;">
- </a>
- <?php endif; ?>
</div>
</div>
</div> \ No newline at end of file
diff --git a/includes/components/emergency.inc b/includes/components/emergency.inc
index 03d468c..8ebd65e 100644
--- a/includes/components/emergency.inc
+++ b/includes/components/emergency.inc
@@ -7,7 +7,7 @@
<span data-bs-toggle="modal" data-bs-target="#turn-on" id="btn-on" style="background: #7f0000;font-size: 48px;padding: 10px 50px;border-radius: 10px;width: max-content;display: block;margin-left: auto;margin-right: auto;cursor: pointer;">Turn <b>ON</b></span>
<span data-bs-toggle="modal" onclick="disableAlert();" id="btn-off" style="display:none;background: #007f0b;font-size: 48px;padding: 10px 50px;border-radius: 10px;width: max-content;margin-left: auto;margin-right: auto;cursor: pointer;">Turn <b>OFF</b></span>
-<p style="text-align:center;margin-top:10px;">Sending next notification <b><span id="next-notification">never</span></b></p>
+<p style="text-align:center;margin-top:10px;">Sending the next notification <b><span id="next-notification">never</span></b></p>
<hr>
@@ -24,6 +24,9 @@
<label style="display: block; margin-left: 10px;">
<input type="checkbox" id="enable-moonglow"> Moonglow
</label>
+<!--<label style="display: block; margin-left: 10px;">
+ <input type="checkbox" id="enable-hailstorm"> Hailstorm
+</label>-->
<style>
<?php global $use2023UI; if (!$use2023UI): ?>
@@ -82,6 +85,7 @@
document.getElementById("enable-<?= $GLOBALS["ColdHazeApp"]["other"]["slug"] ?>").checked ? "<?= $GLOBALS["ColdHazeApp"]["other"]["slug"] ?>" : null,
document.getElementById("enable-raindrops").checked ? "raindrops" : null,
document.getElementById("enable-moonglow").checked ? "moonglow" : null,
+ document.getElementById("enable-hailstorm").checked ? "hailstorm" : null,
].filter(i => i);
return "?" + targets.join("&");
}
@@ -123,6 +127,7 @@
document.getElementById("enable-<?= $GLOBALS["ColdHazeApp"]["other"]["slug"] ?>").disabled = true;
document.getElementById("enable-raindrops").disabled = true;
document.getElementById("enable-moonglow").disabled = true;
+ document.getElementById("enable-hailstorm").disabled = true;
window.alertInterval = setInterval(() => {
window.alertIntervalCounter--;
@@ -146,5 +151,6 @@
document.getElementById("enable-<?= $GLOBALS["ColdHazeApp"]["other"]["slug"] ?>").disabled = false;
document.getElementById("enable-raindrops").disabled = false;
document.getElementById("enable-moonglow").disabled = false;
+ document.getElementById("enable-hailstorm").disabled = false;
}
</script> \ No newline at end of file
diff --git a/includes/components/fullbanner.inc b/includes/components/fullbanner.inc
index 960ae0a..07dfa59 100644
--- a/includes/components/fullbanner.inc
+++ b/includes/components/fullbanner.inc
@@ -4,16 +4,4 @@
</script>
<div id="member-banner"></div>
-<script src="/assets/logo/banner.js?_=<?= sha1_file($_SERVER['DOCUMENT_ROOT'] . "/assets/logo/banner.js") ?>"></script><script>refreshBanner(false, <?= $lang["_french"] ? "true" : "false" ?>)</script>
-
-<?php if (isset($travelling[$memberID]) && $travelling[$memberID]['travelling'] && !$travelling[$memberID]['equestria']): ?>
- <br>
- <div class="alert alert-primary" style="margin-bottom: 0 !important;">
- <?= getMiniName($memberData["display_name"] ?? $memberData["name"]) ?> <?= $lang["fullbanner"]["visit"][0] ?> <?= $systemID === "ynmuc" ? "Raindrops System" : "Cloudburst System" ?><?= str_replace("%1", getMemberPronouns($memberData["pronouns"])["subjective"], str_replace("%2", getMemberPronouns($memberData["pronouns"])["third"] ? "is" : "are", $lang["fullbanner"]["visit"][1])) ?><?= $systemCommonName ?>.
- </div>
-<?php elseif (isset($travelling[$memberID]) && $travelling[$memberID]['travelling'] && $travelling[$memberID]['equestria']): ?>
- <br>
- <div class="alert alert-primary" style="margin-bottom: 0 !important;">
- <?= getMiniName($memberData["display_name"] ?? $memberData["name"]) ?> is on a trip to <?= $metadata["fictive"] ? "Equestria" : "Celeste" ?>. <?= str_replace("%1", getMemberPronouns($memberData["pronouns"])["subjective"], str_replace("%2", getMemberPronouns($memberData["pronouns"])["third"] ? "is" : "are", "Therefore %1 %2 currently not in the ")) ?><?= $systemCommonName ?>.
- </div>
-<?php endif; ?> \ No newline at end of file
+<script src="/assets/logo/banner.js?_=<?= sha1_file($_SERVER['DOCUMENT_ROOT'] . "/assets/logo/banner.js") ?>"></script><script>refreshBanner(false, <?= $lang["_french"] ? "true" : "false" ?>)</script> \ No newline at end of file
diff --git a/includes/components/header.inc b/includes/components/header.inc
index 9409917..bd85761 100644
--- a/includes/components/header.inc
+++ b/includes/components/header.inc
@@ -72,9 +72,9 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/rainbow.inc";
echo("Color: #" . $member["color"] . "\n\n");
}
- $sr = hexdec(substr($member["color"], 0, 2));
- $sg = hexdec(substr($member["color"], 2, 2));
- $sb = hexdec(substr($member["color"], 4, 2));
+ $sr = hexdec(substr($color, 0, 2));
+ $sg = hexdec(substr($color, 2, 2));
+ $sb = hexdec(substr($color, 4, 2));
$differencesAll = [];
@@ -432,7 +432,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/rainbow.inc";
opacity: 1 !important;
}
- .antialias, #new-homepage img, #hpd-other img, #hpd-raindrops img, #hpd-cloudburst img, .ck img, #system-info img, #member-card img {
+ .antialias, #new-homepage img, #hpd-other img, #hpd-raindrops img, .ck img, #system-info img, #member-card img {
image-rendering: auto !important;
}
diff --git a/includes/components/pleasure.inc b/includes/components/pleasure.inc
index 9d2825c..6d5f4b1 100644
--- a/includes/components/pleasure.inc
+++ b/includes/components/pleasure.inc
@@ -7,12 +7,6 @@
</details>
</h2>
-<?php if ($_PROFILE["login"] === "cloudburst"): ?>
-<div class="alert alert-danger">
- <b>Notice:</b> Only <?= $app["other"]["name"] ?> can use the pleasure alert. If you wish to wake somepony up, use the <a href="/-/wakeup" style="filter: invert(1) hue-rotate(180deg);">wake-up alert</a> instead.
-</div>
-<?php endif; ?>
-
<?php if (isset($front[0])): ?>
<?php if (!parseMetadata(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/" . $front[0]["id"] . ".json"), true))["other"] && !parseMetadata(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/" . $front[0]["id"] . ".json"), true))["other2"]): ?>
<div class="alert alert-warning">
@@ -45,9 +39,9 @@
<?php endif; ?>
<?php endif; ?>
-<span data-bs-toggle="modal" <?php if ($_PROFILE["login"] === "cloudburst"): ?>class="disabled"<?php endif; ?> data-bs-target="#turn-on" id="btn-on" style="background: #7f0000;font-size: 48px;padding: 10px 50px;border-radius: 10px;width: max-content;display: block;margin-left: auto;margin-right: auto;cursor: pointer;">Turn <b>ON</b></span>
+<span data-bs-toggle="modal" data-bs-target="#turn-on" id="btn-on" style="background: #7f0000;font-size: 48px;padding: 10px 50px;border-radius: 10px;width: max-content;display: block;margin-left: auto;margin-right: auto;cursor: pointer;">Turn <b>ON</b></span>
<span onclick="disableAlert()" id="btn-off" style="display:none;background: #007f0b;font-size: 48px;padding: 10px 50px;border-radius: 10px;width: max-content;margin-left: auto;margin-right: auto;cursor: pointer;">Turn <b>OFF</b></span>
-<p style="text-align:center;margin-top:10px;">Sending next notification <b><span id="next-notification">never</span></b> · Local time for Raindrops: <span id="raindrops-time">--:--</span></p>
+<p style="text-align:center;margin-top:10px;">Sending the next notification <b><span id="next-notification">never</span></b> · Local time for Raindrops: <span id="raindrops-time">--:--</span></p>
<hr>
diff --git a/includes/components/sysbanner.inc b/includes/components/sysbanner.inc
index a97169a..6a66ab4 100644
--- a/includes/components/sysbanner.inc
+++ b/includes/components/sysbanner.inc
@@ -20,23 +20,8 @@ $pages = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/pa
<h3 style="height:max-content;"><?= $systemCommonName ?></h3>
<div style="height:max-content;" id="member-card">
<span>
- <?php
-
- if ($systemID === $app["other"]["id"]) {
- $travellers = [];
- } else {
- $travellers = array_filter(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . ($systemID === "gdapd" ? "ynmuc" : "gdapd") . "/members.json"), true), function ($i) use ($travelling) {
- return $travelling[$i['id']]['travelling'] && !$travelling[$i['id']]['equestria'];
- });
- }
-
- ?>
<?= count(scoreOrder(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$systemID/members.json"), true), $systemID)) ?> members<?php
- if (count($travellers) > 0) {
- echo(" (+ " . count($travellers) . " " . (count($travellers) > 1 ? $lang["system"]["travellers"] : $lang["system"]["traveller"]) . ")");
- }
-
?><br><?php $leaders = array_filter(scoreOrderGlobal(), function ($i) use ($systemID) {
return $i["_system"] === $systemID && isset($i["_metadata"]["leader2"]) && $i["_metadata"]["leader2"];
}); if (count($leaders) > 0): ?><span style="vertical-align: middle; height: 24px;">Leader<?= count($leaders) > 1 ? "s" : "" ?>: </span><?php foreach ($leaders as $index => $leader): ?><a href="/<?= $leader["name"] ?>" class="member-link"><img src="<?= getAsset($leader["_system"], $leader["id"], "heads") ?>"><span style="vertical-align: middle;"> <?= $leader["display_name"] ?? $leader["name"] ?></span></a><?= $index <= count($leaders) - 1 ? ", " : "" ?><?php endforeach; ?><?php endif; ?>
diff --git a/includes/components/timeline.inc b/includes/components/timeline.inc
index 95b413b..21e82a2 100644
--- a/includes/components/timeline.inc
+++ b/includes/components/timeline.inc
@@ -29,7 +29,7 @@ function displayTimeline($systems) { global $app; $showIcons = count($systems) >
<?php foreach ($systems as $system): ?>
<tr style="height: <?= count($systems) === 1 ? 50 : 30 ?>px;">
<?php if ($showIcons): ?><td colspan="20">
- <a href="/<?= $system === "gdapd" ? "raindrops" : ($system === "ynmuc" ? "cloudburst" : ($system === "hrbom" ? "moonglow" : $app["other"]["slug"])) ?>" style="width: 100%; height: 30px; display: flex; align-items: center; justify-content: center;">
+ <a href="/<?= $system === "gdapd" ? "raindrops" : ($system === "hrbom" ? "moonglow" : $app["other"]["slug"]) ?>" style="width: 100%; height: 30px; display: flex; align-items: center; justify-content: center;">
<img alt="" style="border-radius: 5px; height: 24px; text-align: center;" src="<?= getAsset($system) ?>">
</a>
</td><?php endif; ?>
diff --git a/includes/external/signal/index.js b/includes/external/signal/index.js
index 7531fb5..31de8a7 100644
--- a/includes/external/signal/index.js
+++ b/includes/external/signal/index.js
@@ -10,9 +10,9 @@ const child_process = require("child_process");
(async () => {
console.log("Ready");
- let system = require('../../data/' + (user === "raindrops" ? "gdapd" : (user === "cloudburst" ? "ynmuc" : "other")) + "/general.json");
- let fronters = require('../../data/' + (user === "raindrops" ? "gdapd" : (user === "cloudburst" ? "ynmuc" : "other")) + "/fronters.json");
- let members = require('../../data/' + (user === "raindrops" ? "gdapd" : (user === "cloudburst" ? "ynmuc" : "other")) + "/members.json");
+ let system = require('../../data/' + (user === "raindrops" ? "gdapd" : (user === "Moonglow" ? "hrbom" : "other")) + "/general.json");
+ let fronters = require('../../data/' + (user === "raindrops" ? "gdapd" : (user === "Moonglow" ? "hrbom" : "other")) + "/fronters.json");
+ let members = require('../../data/' + (user === "raindrops" ? "gdapd" : (user === "Moonglow" ? "hrbom" : "other")) + "/members.json");
console.log(system.name);
console.log(fronters.members.length + " member(s) at front");
diff --git a/includes/fragments/dashboard.inc b/includes/fragments/dashboard.inc
index bb58df1..f25fba1 100644
--- a/includes/fragments/dashboard.inc
+++ b/includes/fragments/dashboard.inc
@@ -48,8 +48,8 @@ global $use2023UI;
<h2>
<span id="greeting">Hi</span> <span><?php
- $fronters = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . ($_PROFILE["login"] === "raindrops" ? "gdapd" : ($_PROFILE["login"] === "cloudburst" ? "ynmuc" : ($_PROFILE["login"] === "Moonwind" ? "hrbom" : "other"))) . "/fronters.json"), true);
- $name = ($_PROFILE["login"] === "raindrops" ? "Raindrops System" : ($_PROFILE["login"] === "cloudburst" ? "Cloudburst System" : ($_PROFILE["login"] === "Moonwind" ? "Moonglow" : $app["other"]["name"])));
+ $fronters = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . ($_PROFILE["login"] === "raindrops" ? "gdapd" : ($_PROFILE["login"] === "Moonglow" ? "hrbom" : "other")) . "/fronters.json"), true);
+ $name = ($_PROFILE["login"] === "raindrops" ? "Raindrops System" : ($_PROFILE["login"] === "Moonglow" ? "Moonglow" : $app["other"]["name"]));
if (isset($fronters["members"][0])) {
$name = implode(" and ", array_map(function ($i) {
@@ -62,7 +62,7 @@ global $use2023UI;
?>!</span>
</h2>
- <div id="schedules" style="margin-top: 20px; display: grid; grid-template-columns: repeat(4, 1fr); grid-gap: 20px;">
+ <div id="schedules" style="margin-top: 20px; display: grid; grid-template-columns: repeat(3, 1fr); grid-gap: 20px;">
<div>
<div id="live-time-other-outer" class="day-gradient" style="text-align: center; background-color: rgba(255, 255, 255, .1); padding: 20px 0; border-radius: 10px;">
<b><?= $app["other"]["name"] ?></b><br>
@@ -73,15 +73,6 @@ global $use2023UI;
</div>
<div>
- <div id="live-time-cloudburst-outer" class="day-gradient" style="text-align: center; background-color: rgba(255, 255, 255, .1); padding: 20px 0; border-radius: 10px;">
- <b>Cloudburst System</b><br>
- <h3 id="live-time-cloudburst">--:--</h3>
- </div>
-
- <hr style="display: none;" class="schedules-separator">
- </div>
-
- <div>
<div id="live-time-raindrops-outer" class="day-gradient" style="text-align: center; background-color: rgba(255, 255, 255, .1); padding: 20px 0; border-radius: 10px;">
<b>Raindrops System</b><br>
<h3 id="live-time-raindrops">--:--</h3>
@@ -133,16 +124,6 @@ global $use2023UI;
document.getElementById("live-time-moonwind").innerText = time4.replace("24:", "00:");
document.getElementById("live-time-moonwind-outer").style.backgroundPositionY = getDayPercentage(time4) + "%";
- let time2 = (new Intl.DateTimeFormat('en-US', {
- timeZone: 'Europe/London',
- hour: 'numeric',
- minute: '2-digit',
- hour12: false
- })).format(new Date());
-
- document.getElementById("live-time-cloudburst").innerText = time2.replace("24:", "00:");
- document.getElementById("live-time-cloudburst-outer").style.backgroundPositionY = getDayPercentage(time2) + "%";
-
let time3 = (new Intl.DateTimeFormat('en-US', {
timeZone: 'America/Chicago',
hour: 'numeric',
@@ -207,7 +188,7 @@ global $use2023UI;
<div id="timeline"></div>
<script>
async function refreshTimeline() {
- document.getElementById("timeline").innerHTML = await (await fetch("/api/timeline?gdapd&ynmuc<?= ($isLowerLoggedIn || $isLoggedIn) ? "&" . $app["other"]["id"] : "" ?>&hrbom")).text();
+ document.getElementById("timeline").innerHTML = await (await fetch("/api/timeline?gdapd<?= ($isLowerLoggedIn || $isLoggedIn) ? "&" . $app["other"]["id"] : "" ?>&hrbom")).text();
Array.from(document.getElementsByClassName("dynamic-time")).forEach((el) => {
let time = el.getAttribute("data-time");
@@ -228,9 +209,6 @@ global $use2023UI;
<div style="display: grid; grid-template-columns: 1fr 2fr; grid-gap: 20px;" id="home-parts">
<div style="background-color: var(--palette-2) !important; margin-top: 20px; border-radius: 10px;">
<div class="list-group">
- <a href="/cloudburst" class="list-group-item list-group-item-action" style="display: flex; align-items: center;">
- <img src="/assets/avatars/ade46823206b4b0cad3ccaae934a5f3b.webp" style="margin-right: 5px; width: 24px;"><div style="vertical-align: middle; display: flex; align-items: center; color: var(--bs-body-color);">Cloudburst System</div>
- </a>
<a href="/raindrops" class="list-group-item list-group-item-action" style="display: flex; align-items: center;">
<img src="/assets/avatars/7d9f543ef74240f69d0786c3f2983124.webp" style="margin-right: 5px; width: 24px;"><div style="vertical-align: middle; display: flex; align-items: center; color: var(--bs-body-color);">Raindrops System</div>
</a>
@@ -246,8 +224,8 @@ global $use2023UI;
<a href="/-/byfront" class="list-group-item list-group-item-action" style="display: grid; grid-template-columns: max-content 1fr;">
<img src="/assets/icons/new/front.svg?color=474747" style="margin-right: 5px; height: 24px; width: 24px;"><div style="display: flex; align-items: center; color: var(--bs-body-color);">By last fronted date</div>
</a>
- <a href="https://countdown.equestria.horse" target="_blank" class="list-group-item list-group-item-action" style="display: grid; grid-template-columns: max-content 1fr;">
- <img src="/assets/icons/new/schedule.svg?color=474747" style="margin-right: 5px; height: 24px; width: 24px;"><div style="display: flex; align-items: center; color: var(--bs-body-color);">Meet-up countdown</div>
+ <a href="/-/schedule" target="_blank" class="list-group-item list-group-item-action" style="display: grid; grid-template-columns: max-content 1fr;">
+ <img src="/assets/icons/new/schedule.svg?color=474747" style="margin-right: 5px; height: 24px; width: 24px;"><div style="display: flex; align-items: center; color: var(--bs-body-color);">Raindrops schedule</div>
</a>
<a href="https://plex.equestria.horse" target="_blank" class="list-group-item list-group-item-action" style="display: grid; grid-template-columns: max-content 1fr;">
<img src="https://plex.equestria.horse/web/favicon.ico" style="margin-right: 5px; height: 24px; width: 24px;"><div style="display: flex; align-items: center; color: var(--bs-body-color);">Plex</div>
@@ -255,9 +233,6 @@ global $use2023UI;
<a href="https://live.equestria.dev" target="_blank" class="list-group-item list-group-item-action" style="display: grid; grid-template-columns: max-content 1fr;">
<img src="https://avatars.githubusercontent.com/u/8463692?s=128" style="margin-right: 5px; height: 24px; width: 24px;"><div style="display: flex; align-items: center; color: var(--bs-body-color);">Streaming server</div>
</a>
- <a href="https://mist.equestria.horse" target="_blank" class="list-group-item list-group-item-action" style="display: grid; grid-template-columns: max-content 1fr;">
- <img src="https://mist.equestria.horse/icons/normal_128x128.png" style="margin-right: 5px; height: 24px; width: 24px;"><div style="display: flex; align-items: center; color: var(--bs-body-color);">Mist</div>
- </a>
</div>
</div>
<div style="background-color: var(--palette-2) !important; text-align: center; margin-top: 20px; border-radius: 10px; display: flex; align-items: center; justify-content: center;">
diff --git a/includes/fragments/member.inc b/includes/fragments/member.inc
index 8b153fa..0b1ce03 100644
--- a/includes/fragments/member.inc
+++ b/includes/fragments/member.inc
@@ -29,27 +29,8 @@ if ($memberData["name"] !== "unknown" && $memberData["name"] !== "fusion") {
global $isLoggedIn;
$frontersRaindrops = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/gdapd/fronters.json"), true);
-$frontersCloudburst = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/ynmuc/fronters.json"), true);
$frontersOther = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/other/fronters.json"), true);
-$fusionRaindrops = false;
-
-if ($memberData["name"] === "fusion") {
- if (in_array("fusion", array_map(function ($i) {
- return $i["name"];
- }, $frontersRaindrops["members"]))) {
- $fusionRaindrops = true;
-
- $memberData = array_values(array_filter($frontersRaindrops["members"], function ($i) {
- return $i["name"] === "fusion";
- }))[0];
- $memberCommonName = $memberData['display_name'] ?? $memberData['name'];
- $memberID = $memberData['id'];
- $system = $systemID === "gdapd" ? "cloudburst" : "raindrops";
- $systemID = $system === "cloudburst" ? "ynmuc" : "gdapd";
- }
-}
-
if (!file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/designs/" . $memberID . ".json")) file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/designs/" . $memberID . ".json", json_encode([
"_main" => [
"name" => "Main",
@@ -113,22 +94,6 @@ if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/assets/ponies/" . $memberID . ".pn
<span>In all cases, feel free to ask!</span>
</div>
<br>
- <?php elseif ($memberData["name"] === "fusion"): ?>
- <br>
- <div class="alert alert-secondary" style="margin-bottom: 0 !important;">
- <p><?= $lang["member"]["fusion"][0] ?></p>
- <p><?= $lang["member"]["fusion"][1] ?></p>
- <p><?= $lang["member"]["fusion"][2] ?></p>
- <div class="list-group">
- <?php $foundFusion = false; $fusionOn = false; foreach ($fusionRaindrops ? $frontersRaindrops['members'] : $frontersCloudburst['members'] as $fronter): if ($fronter["name"] !== "fusion"): if ($fusionOn): $foundFusion = true; $name = str_ends_with($fronter['name'], "-travelling") ? substr($fronter['name'], 0, strlen($fronter['name']) - 11) : $fronter['name'] ?>
- <a class="list-group-item list-group-item-action text-black" href="/<?= $name ?>"><img src="<?= getAsset($system, $fronter["id"], "heads") ?>" style="filter:invert(1) hue-rotate(180deg);width:24px;"> <?= $fronter["display_name"] ?? $name ?></a>
- <?php endif; else: $fusionOn = true; endif; endforeach; ?>
- </div>
- <?php if (!$foundFusion): ?>
- <i><?= $lang["member"]["no_fusion"] ?></i>
- <?php endif; ?>
- </div>
- <br>
<?php else: ?><?php endif; ?>
</div>
</div>
diff --git a/includes/fragments/system.inc b/includes/fragments/system.inc
index bc1b0df..717efee 100644
--- a/includes/fragments/system.inc
+++ b/includes/fragments/system.inc
@@ -17,7 +17,7 @@
<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/components/sysbanner.inc"; ?>
<br>
- <?php if ($system === "cloudburst") cloudburst(true); elseif ($system === "raindrops") raindrops(true); elseif ($system === "moonglow") moonglow(true); elseif ($isLoggedIn || $isLowerLoggedIn) other(true); ?>
+ <?php if ($system === "raindrops") raindrops(true); elseif ($system === "moonglow") moonglow(true); elseif ($isLoggedIn || $isLowerLoggedIn) other(true); ?>
</div>
</div>
@@ -26,7 +26,7 @@
</div>
<style>
- #hpd-cloudburst, #hpd-raindrops, #hpd-cloudburst, #hpd-other {
+ #hpd-raindrops, #hpd-moonglow, #hpd-other {
background: transparent !important;
padding: 0 !important;
margin-bottom: 0 !important;
diff --git a/includes/jobs/FrontersNotification.php b/includes/jobs/FrontersNotification.php
index 04fff9b..85a3216 100644
--- a/includes/jobs/FrontersNotification.php
+++ b/includes/jobs/FrontersNotification.php
@@ -20,8 +20,6 @@ echo("Processing for system $system\n");
if ($system === "gdapd") {
$name = "Raindrops System";
-} elseif ($system === "ynmuc") {
- $name = "Cloudburst System";
} elseif ($system === "hrbom") {
$name = "Moonglow";
} elseif (isset($app["other"]) && $system === $app["other"]["id"]) {
@@ -112,8 +110,6 @@ if ($system !== $app["other"]["id"] || !isset($app["other"])) {
if ($system === "gdapd") {
$topic = "public-switches-raindrops";
-} else if ($system === "ynmuc") {
- $topic = "public-switches-cloudburst";
} else {
$topic = "main";
}
diff --git a/includes/jobs/PKFronters.php b/includes/jobs/PKFronters.php
index 4dd31f9..2dfac45 100644
--- a/includes/jobs/PKFronters.php
+++ b/includes/jobs/PKFronters.php
@@ -41,12 +41,8 @@ if (trim($data) !== "" && $data !== false && json_last_error() === JSON_ERROR_NO
echo("Data is invalid: " . json_last_error_msg() . ": " . $data . "\n");
}
-echo("Running Matrix integration...\n");
-chdir($_SERVER['DOCUMENT_ROOT'] . "/includes/external/matrix");
-exec("nice -n 19 node index.js " . ($system === "gdapd" ? "raindrops" : ($system === "ynmuc" ? "cloudburst" : "other")));
-
echo("Running Signal integration...\n");
chdir("/opt/peh/includes/external/signal");
exec("nice -n 19 node index.js raindrops");
-exec("nice -n 19 node index.js cloudburst");
+exec("nice -n 19 node index.js moonglow");
exec("nice -n 19 node index.js other"); \ No newline at end of file
diff --git a/includes/jobs/RefreshCache.php b/includes/jobs/RefreshCache.php
index cac61a6..35e724a 100644
--- a/includes/jobs/RefreshCache.php
+++ b/includes/jobs/RefreshCache.php
@@ -15,8 +15,8 @@ $urls = [
"/-/alphabet",
"/-/byspecies",
"/-/relations",
- "/cloudburst/-/history",
"/raindrops/-/history",
+ "/moonglow/-/history",
"/" . $app["other"]["slug"] . "/-/history"
];
diff --git a/includes/jobs/UpdateAssets.php b/includes/jobs/UpdateAssets.php
index ee94537..5c5c288 100644
--- a/includes/jobs/UpdateAssets.php
+++ b/includes/jobs/UpdateAssets.php
@@ -99,9 +99,6 @@ function downloadAssets($system, $path = null) {
echo("Downloading for gdapd\n");
downloadAssets("gdapd");
-echo("Downloading for ynmuc\n");
-downloadAssets("ynmuc");
-
echo("Downloading for hrbom\n");
downloadAssets("hrbom");
diff --git a/includes/maintenance/deleteUnusedAssets.php b/includes/maintenance/deleteUnusedAssets.php
index 780c80f..bd7cd38 100644
--- a/includes/maintenance/deleteUnusedAssets.php
+++ b/includes/maintenance/deleteUnusedAssets.php
@@ -14,14 +14,14 @@ if (isset($_SERVER["argv"][1])) {
$list = [
str_replace("-", "", json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/gdapd/general.json"), true)["uuid"]),
- str_replace("-", "", json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/ynmuc/general.json"), true)["uuid"]),
+ str_replace("-", "", json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/hrbom/general.json"), true)["uuid"]),
str_replace("-", "", json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/other/general.json"), true)["uuid"]),
...array_map(function ($i) {
return str_replace("-", "", json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/gdapd/general.json"), true)["uuid"]) . str_replace("-", "", $i["uuid"]);
}, json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/gdapd/members.json"), true)),
...array_map(function ($i) {
- return str_replace("-", "", json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/ynmuc/general.json"), true)["uuid"]) . str_replace("-", "", $i["uuid"]);
- }, json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/ynmuc/members.json"), true)),
+ return str_replace("-", "", json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/hrbom/general.json"), true)["uuid"]) . str_replace("-", "", $i["uuid"]);
+ }, json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/hrbom/members.json"), true)),
...array_map(function ($i) {
return str_replace("-", "", json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/other/general.json"), true)["uuid"]) . str_replace("-", "", $i["uuid"]);
}, json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/other/members.json"), true))
diff --git a/includes/reminder.php b/includes/reminder.php
index 05b7bd5..e69de29 100644
--- a/includes/reminder.php
+++ b/includes/reminder.php
@@ -1,21 +0,0 @@
-<?php
-
-;
-$_SERVER['DOCUMENT_ROOT'] = "..";
-require_once './util/functions.inc';
-
-$app = json_decode(file_get_contents("./app.json"), true);
-$ntfy = $app["ntfy"];
-
-file_get_contents('https://' . $ntfy["server"] . '/' . $ntfy["topic"], false, stream_context_create([
- 'http' => [
- 'method' => 'POST',
- 'header' =>
- "Content-Type: text/plain\r\n" .
- "Title: " . formatPonypush("🔔 Did you update the money tracker?") . "\r\n" .
- "Tags: reminder\r\n" .
- "Actions: view, Open money tracker, https://ponies.equestria.horse/-/money, clear=true\r\n" .
- "Authorization: Basic " . base64_encode($ntfy["user"] . ":" . $ntfy["password"]),
- 'content' => formatPonypush("Make sure the money tracker is up to date. Any transaction you have made must be added now, NOT TOMORROW.")
- ]
-])); \ No newline at end of file
diff --git a/includes/system/history.inc b/includes/system/history.inc
index b879f6e..ddf49bb 100644
--- a/includes/system/history.inc
+++ b/includes/system/history.inc
@@ -107,7 +107,7 @@ function page() { global $lang; global $systemCommonName; global $systemID; glob
<?= isNotToday($switch["timestamp"], $day[1]) ? "00:00" : date('H:i', $switch["timestamp"]) ?>
</span>
<span class="fronter-profile" style="vertical-align: middle;">
- <a class="member-link" href="/<?= (isset($member) && $member["name"] === "unknown") ? ($systemID === "gdapd" ? "unknown-rd" : ($systemID === "ynmuc" ? "unknown-cb" : $app["other"]["unknown"])) : $member["name"] ?>">
+ <a class="member-link" href="/<?= (isset($member) && $member["name"] === "unknown") ? ($systemID === "gdapd" ? "unknown-rd" : $app["other"]["unknown"]) : $member["name"] ?>">
<img src="<?= getAsset($systemID, $member["id"], "heads") ?>" style="width:24px;"> <?= $member["display_name"] ?? $member["name"] ?>
</a>
<?php if (count($switch["members"]) > 1): ?>
diff --git a/includes/util/agewarning.inc b/includes/util/agewarning.inc
index 66a163c..8f3753c 100644
--- a/includes/util/agewarning.inc
+++ b/includes/util/agewarning.inc
@@ -12,7 +12,7 @@ function showWarning($name, $id, $system) {
"Title: " . formatPonypush("⚠️ $name does not have an age or birth year set") . "\r\n" .
"Priority: max\r\n" .
"Tags: switch\r\n" .
- "Actions: view, Edit on Ponycule, https://ponies.equestria.horse/-/metadata/" . ($system === "gdapd" ? "raindrops" : "cloudburst") . "/" . $id . "/, clear=true\r\n" .
+ "Actions: view, Edit on Ponycule, https://ponies.equestria.horse/-/metadata/" . ($system === "gdapd" ? "raindrops" : ($system === "hrbom" ? "moonglow" : $GLOBALS["ColdHazeApp"]["other"]["slug"])) . "/" . $id . "/, clear=true\r\n" .
"Authorization: Basic " . base64_encode($ntfy["user"] . ":" . $ntfy["password"]),
'content' => formatPonypush("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.")
]
@@ -26,7 +26,7 @@ function showWarning($name, $id, $system) {
"Title: " . formatPonypush("⚠️ $name does not have an age or birth year set") . "\r\n" .
"Priority: max\r\n" .
"Tags: switch\r\n" .
- "Actions: view, Edit on Ponycule, https://ponies.equestria.horse/-/metadata/" . ($system === "gdapd" ? "raindrops" : "cloudburst") . "/" . $id . "/, clear=true\r\n" .
+ "Actions: view, Edit on Ponycule, https://ponies.equestria.horse/-/metadata/" . ($system === "gdapd" ? "raindrops" : ($system === "hrbom" ? "moonglow" : $GLOBALS["ColdHazeApp"]["other"]["slug"])) . "/" . $id . "/, clear=true\r\n" .
"Authorization: Basic " . base64_encode($ntfy["user"] . ":" . $ntfy["password"]),
'content' => formatPonypush("To make sure they still appear on the fronting schedule after March 1st, they need to set an age or birth year now.")
]
diff --git a/includes/util/banner.inc b/includes/util/banner.inc
index 955b93d..ea8a1eb 100644
--- a/includes/util/banner.inc
+++ b/includes/util/banner.inc
@@ -187,28 +187,12 @@ function getMemberBannerData(string $id, string $system, bool $french = false) {
$app = $GLOBALS["ColdHazeApp"];
$systemData = [];
- $systemData['page'] = "/" . ($system === "gdapd" ? "raindrops" : ($system === $app["other"]["id"] ? $app["other"]["slug"] : ($system === "hrbom" ? "moonglow" : "cloudburst")));
+ $systemData['page'] = "/" . ($system === "gdapd" ? "raindrops" : ($system === $app["other"]["id"] ? $app["other"]["slug"] : "moonglow"));
$systemData['icon'] = getAsset($system);
- $systemData['name'] = $system === "gdapd" ? "Raindrops" : ($system === $app["other"]["id"] ? $app["other"]["short"] : ($system === "hrbom" ? "Moonglow" : "Cloudburst"));
- $systemData['full_name'] = $system === "gdapd" ? "Raindrops System" : ($system === $app["other"]["id"] ? $app["other"]["name"] : ($system === "hrbom" ? "Moonglow" : "Cloudburst System"));
+ $systemData['name'] = $system === "gdapd" ? "Raindrops" : ($system === $app["other"]["id"] ? $app["other"]["short"] : "Moonglow");
+ $systemData['full_name'] = $system === "gdapd" ? "Raindrops System" : ($system === $app["other"]["id"] ? $app["other"]["name"] : "Moonglow");
$systemData['temporary'] = false;
- if (isset($travelling[$member['id']]) && $travelling[$member['id']]["travelling"] && !$travelling[$member['id']]["equestria"]) {
- $systemData['page'] = "/" . ($system === "gdapd" ? "cloudburst" : "raindrops");
- $systemData['icon'] = getAsset($system === "gdapd" ? "ynmuc" : "gdapd");
- $systemData['name'] = $system === "gdapd" ? "Cloudburst" : "Raindrops";
- $systemData['full_name'] = $system === "gdapd" ? "Cloudburst System" : "Raindrops System";
- $systemData['temporary'] = true;
- }
-
- if (isset($travelling[$member['id']]) && $travelling[$member['id']]["travelling"] && $travelling[$member['id']]["equestria"]) {
- $systemData['page'] = null;
- $systemData['icon'] = "/assets/logo/equestria.png";
- $systemData['name'] = "Equestria";
- $systemData['full_name'] = "Equestria";
- $systemData['temporary'] = true;
- }
-
$marefriends = [];
foreach ($metadata["marefriends"] as $marefriend) {
$mfSystem = explode("/", $marefriend)[0];
diff --git a/includes/util/functions.inc b/includes/util/functions.inc
index 67b1786..87954ea 100644
--- a/includes/util/functions.inc
+++ b/includes/util/functions.inc
@@ -127,9 +127,9 @@ if (!function_exists("getAsset")) {
$id = $id1 . $id2;
if (str_ends_with((getMemberWithoutSystem($memberID) ?? ['name' => ''])["name"], "-travelling")) {
- $id1 = preg_replace("/^([\da-f]{8})-([\da-f]{4})-([\da-f]{4})-([\da-f]{4})-([\da-f]{12})$/", "$1$2$3$4$5", json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . ($systemID === "gdapd" ? "ynmuc" : "gdapd") . "/general.json"), true)["uuid"]);
+ $id1 = preg_replace("/^([\da-f]{8})-([\da-f]{4})-([\da-f]{4})-([\da-f]{4})-([\da-f]{12})$/", "$1$2$3$4$5", json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . ($systemID === "gdapd" ? "hrbom" : "gdapd") . "/general.json"), true)["uuid"]);
- $members = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . ($systemID === "gdapd" ? "ynmuc" : "gdapd") . "/members.json"), true);
+ $members = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . ($systemID === "gdapd" ? "hrbom" : "gdapd") . "/members.json"), true);
$list = array_map(function ($i) {
return $i["name"];
}, $members);
@@ -322,13 +322,6 @@ if (!function_exists("getMemberWithoutSystem")) {
global $isLowerLoggedIn; global $isLoggedIn;
$member = null;
- $members1 = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/ynmuc/members.json"), true);
- foreach ($members1 as $m) {
- $m["_system"] = "ynmuc";
- $m["system"] = "ynmuc";
- if ($m["id"] === $id) $member = $m;
- }
-
$members2 = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/gdapd/members.json"), true);
foreach ($members2 as $m) {
$m["_system"] = "gdapd";
@@ -345,9 +338,9 @@ if (!function_exists("getMemberWithoutSystem")) {
if ($isLowerLoggedIn || $isLoggedIn) {
$app = $GLOBALS["ColdHazeApp"] ?? json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/app.json"), true);
- $members3 = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/other/members.json"), true);
+ $members4 = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/other/members.json"), true);
- foreach ($members3 as $m) {
+ foreach ($members4 as $m) {
$m["_system"] = $app["other"]["id"];
$m["system"] = $app["other"]["id"];
if ($m["id"] === $id) $member = $m;
@@ -396,11 +389,11 @@ if (!function_exists("showSystem")) {
$global = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . (isset($app["other"]) && $id === $app["other"]["id"] ? "other" : $id) . "/general.json"), true);
if ($hideTitle) {
- echo('<div id="hpd-' . ($id === "gdapd" ? "raindrops" : ($id === "ynmuc" ? "cloudburst" : "other")) . '" style="background:rgba(255, 255, 255, .1);border-radius:10px;padding:10px;display:grid;grid-template-columns: 1fr;margin-bottom:10px;">');
+ echo('<div id="hpd-' . ($id === "gdapd" ? "raindrops" : ($id === "hrbom" ? "moonglow" : "other")) . '" style="background:rgba(255, 255, 255, .1);border-radius:10px;padding:10px;display:grid;grid-template-columns: 1fr;margin-bottom:10px;">');
} else {
- echo('<div id="hpd-' . ($id === "gdapd" ? "raindrops" : ($id === "ynmuc" ? "cloudburst" : "other")) . '" style="background:rgba(255, 255, 255, .1);border-radius:10px;padding:10px 10px 10px 20px;display:grid;grid-template-columns: 128px 1fr;margin-bottom:10px;">');
+ echo('<div id="hpd-' . ($id === "gdapd" ? "raindrops" : ($id === "hrbom" ? "moonglow" : "other")) . '" style="background:rgba(255, 255, 255, .1);border-radius:10px;padding:10px 10px 10px 20px;display:grid;grid-template-columns: 128px 1fr;margin-bottom:10px;">');
}
- if (!$hideTitle) echo('<a style="display:flex;margin: -10px -20px;align-items:center;justify-content:center;text-align:center;padding: 10px 20px;border-radius: 10px;background: #' . $global['color'] . '55;width: 148px;text-decoration:none;color:white;filter:none !important;" href="/' . ($id === "gdapd" ? "raindrops" : ($id === $app["other"]["id"] ? $app["other"]["slug"] : "cloudburst")) . '" class="hpd-system">
+ if (!$hideTitle) echo('<a style="display:flex;margin: -10px -20px;align-items:center;justify-content:center;text-align:center;padding: 10px 20px;border-radius: 10px;background: #' . $global['color'] . '55;width: 148px;text-decoration:none;color:white;filter:none !important;" href="/' . ($id === "gdapd" ? "raindrops" : ($id === $app["other"]["id"] ? $app["other"]["slug"] : "moonglow")) . '" class="hpd-system">
<div style="text-align:center;"><img src="' . getAsset($id) . '" style="width:64px;"><br>' . $name . '</div>
</a>');
@@ -410,29 +403,12 @@ if (!function_exists("showSystem")) {
echo(' <div style="display:grid;grid-template-columns:repeat(6, 1fr);padding-left:10px;grid-gap:10px;">');
}
- if ($id === $app["other"]["id"]) {
- showMembersFromList(scoreOrder([...array_map(function ($i) use ($id, $travelling) {
- $i["travelling"] = false;
- $i["system"] = $id;
- $i["equestria"] = false;
- return $i;
- }, json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . (isset($app["other"]) && $id === $app["other"]["id"] ? "other" : $id) . "/members.json"), true))], $id));
- } else {
- showMembersFromList(scoreOrder([...array_map(function ($i) use ($id, $travelling) {
- $i["travelling"] = false;
- $i["system"] = $id;
- if (isset($travelling[$i['id']])) $i["equestria"] = $travelling[$i['id']]['travelling'] && $travelling[$i['id']]['equestria'];
- return $i;
- }, array_filter(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . (isset($app["other"]) && $id === $app["other"]["id"] ? "other" : $id) . "/members.json"), true), function ($i) use ($travelling) {
- return !(isset($travelling[$i['id']]) && $travelling[$i['id']]['travelling'] && (!isset($travelling[$i['id']]['equestria']) || !$travelling[$i['id']]['equestria']));
- })), ...array_map(function ($i) use ($id) {
- $i["travelling"] = true;
- $i["system"] = ($id === "gdapd" ? "ynmuc" : "gdapd");
- return $i;
- }, array_filter(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . ($id === "gdapd" ? "ynmuc" : "gdapd") . "/members.json"), true), function ($i) use ($travelling) {
- return isset($travelling[$i['id']]) && $travelling[$i['id']]['travelling'] && (!isset($travelling[$i['id']]['equestria']) || !$travelling[$i['id']]['equestria']);
- }))], $id));
- }
+ showMembersFromList(scoreOrder([...array_map(function ($i) use ($id, $travelling) {
+ $i["travelling"] = false;
+ $i["system"] = $id;
+ $i["equestria"] = false;
+ return $i;
+ }, json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . (isset($app["other"]) && $id === $app["other"]["id"] ? "other" : $id) . "/members.json"), true))], $id));
echo('</div>
@@ -440,12 +416,6 @@ if (!function_exists("showSystem")) {
}
}
-if (!function_exists("cloudburst")) {
- function cloudburst(bool $hideTitle): void {
- showSystem("ynmuc", "Cloudburst System", "#5f08a9a6", $hideTitle);
- }
-}
-
if (!function_exists("raindrops")) {
function raindrops(bool $hideTitle): void {
showSystem("gdapd", "Raindrops System", "#a95f08a6", $hideTitle);
@@ -647,7 +617,7 @@ if (!function_exists("getMemberSystem")) {
if (!function_exists("getMemberFromName")) {
function getMemberFromName(string $name) {
- $list = [...json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/gdapd/members.json"), true), ...json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/ynmuc/members.json"), true), ...json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/other/members.json"), true)];
+ $list = [...json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/gdapd/members.json"), true), ...json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/hrbom/members.json"), true), ...json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/other/members.json"), true)];
foreach ($list as $item) {
if ($item["name"] === $name) return getMemberWithoutSystem($item["id"]);
diff --git a/includes/util/homepage.inc b/includes/util/homepage.inc
index a78c28d..45f91b6 100644
--- a/includes/util/homepage.inc
+++ b/includes/util/homepage.inc
@@ -20,15 +20,8 @@ function newHomepage($id, $page, $title) {
<div class="new-homepage-system-list" id="new-homepage-system-<?= $id ?>-list">
<?php $list = array_values(scoreOrder(withTravelers(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . $id . "/members.json"), true), $id), $id)); foreach ($list as $index => $member): ?>
<a href="/<?= $member["name"] ?>" class="new-homepage-link <?= $index === count($list) - 1 ? "new-homepage-link-last" : "" ?>" style="color: white; text-decoration: none !important; display: block; background-color: #<?= $member["color"] ?>22; padding: 5px 10px;">
- <img src="<?= getAsset(isset($travelling[$member["id"]]) && ($travelling[$member["id"]]["travelling"] && !$travelling[$member["id"]]["equestria"]) ? ($id === "gdapd" ? "ynmuc" : "gdapd") : $id, $member["id"]) ?>" style="width: 32px; height: 32px; vertical-align: middle; background-color: rgba(0, 0, 0, .25); border-radius: 999px;">
+ <img src="<?= getAsset($id, $member["id"]) ?>" style="width: 32px; height: 32px; vertical-align: middle; background-color: rgba(0, 0, 0, .25); border-radius: 999px;">
<span style="width: calc(100% - 37px); vertical-align: middle; margin-left: 5px;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;"><?= $member["display_name"] ?? $member["name"] ?></span>
- <span style="vertical-align: middle; float:right;">
- <?php if (isset($travelling[$member["id"]]) && $travelling[$member["id"]]["travelling"] && $travelling[$member["id"]]["equestria"]): ?>
- <img src="/assets/logo/<?= $member["_metadata"]["fictive"] ? "equestria" : ($member["_metadata"]["fictive2"] ? "celeste" : "") ?>.png" style="width: 24px; height: 24px; margin-top: 5px;">
- <?php elseif (isset($travelling[$member["id"]]) && $travelling[$member["id"]]["travelling"]): ?>
- <img src="<?= getAsset($id === "gdapd" ? "ynmuc" : "gdapd") ?>" style="width: 24px; height: 24px; margin-top: 5px;">
- <?php endif; ?>
- </span>
</a>
<?php endforeach; ?>
</div>
diff --git a/includes/util/rainbow.inc b/includes/util/rainbow.inc
index 3dc9480..027c771 100644
--- a/includes/util/rainbow.inc
+++ b/includes/util/rainbow.inc
@@ -3,15 +3,9 @@
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/functions.inc";
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/score.inc";
-function rainbow($hideCloudburst = false): array {
+function rainbow(): array {
$members = scoreOrderGlobal();
- if ($hideCloudburst) {
- $members = array_filter($members, function ($i) {
- return $i["_system"] === "gdapd";
- });
- }
-
$data = [];
foreach ($members as $member) {
@@ -39,8 +33,8 @@ function rainbow($hideCloudburst = false): array {
return $data;
}
-function getMembersByColor($hideCloudburst = false, $ignoreHumans = false): array {
- $members = rainbow($hideCloudburst);
+function getMembersByColor($_ = false, $ignoreHumans = false): array {
+ $members = rainbow();
uasort($members, function ($a, $b) {
return $a['hsl'][0] - $b['hsl'][0];
diff --git a/includes/util/score.inc b/includes/util/score.inc
index b70f866..622f057 100644
--- a/includes/util/score.inc
+++ b/includes/util/score.inc
@@ -113,34 +113,6 @@ function scoreOrderGlobal() {
}
}
- foreach (json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/ynmuc/members.json"), true) as $member) {
- if ($member["name"] !== "unknown" && $member["name"] !== "fusion" && $member["name"] !== "new" && !str_starts_with($member["name"], "smol") && !str_ends_with($member["name"], "-travelling") && file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/$member[id].json")) {
- if (isset($member["color"])) {
- $rgb = [
- hexdec(substr($member["color"], 0, 2)),
- hexdec(substr($member["color"], 2, 2)),
- hexdec(substr($member["color"], 4, 2))
- ];
- $hsl = rgbToHsl(
- $rgb[0],
- $rgb[1],
- $rgb[2]
- );
- } else {
- $rgb = [255, 255, 255];
- $hsl = rgbToHsl(255, 255, 255);
- }
- $member["_score"] = $hsl[0];
- $member["_system"] = "ynmuc";
- $member["system"] = "ynmuc";
- $member["_metadata"] = parseMetadata(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/$member[id].json"), true));
-
- if (!isset($member["_metadata"]["private"]) || !$member["_metadata"]["private"] || $isLoggedIn || $isLowerLoggedIn) {
- $ordered[] = $member;
- }
- }
- }
-
if ($isLowerLoggedIn || $isLoggedIn) {
$app = $GLOBALS["ColdHazeApp"] ?? json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/app.json"), true);
foreach (json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/other/members.json"), true) as $member) {
diff --git a/includes/util/session.inc b/includes/util/session.inc
index 6449ee9..867b306 100644
--- a/includes/util/session.inc
+++ b/includes/util/session.inc
@@ -66,11 +66,6 @@ if (isset($token)) {
$_PROFILE = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/tokens/" . str_replace("/", "", $token)), true);
}
- if (isset($_GET['invert'])) {
- $_PROFILE["login"] = $_PROFILE["login"] === "raindrops" ? "cloudburst" : "raindrops";
- $_PROFILE["name"] = $_PROFILE["name"] === "Raindrops System" ? "Cloudburst System" : "Raindrops System";
- }
-
$isLoggedIn = true;
} elseif (file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/lowertokens/" . str_replace("/", "", $token))) {
$data = json_decode(pf_utf8_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/sessions/" . str_replace("/", "", $token))), true);
diff --git a/includes/util/short.inc b/includes/util/short.inc
index 81c389d..1654d93 100644
--- a/includes/util/short.inc
+++ b/includes/util/short.inc
@@ -9,11 +9,8 @@ header("Content-Type: text/plain");
$members = scoreOrderGlobal();
$list = [
"rd" => "/raindrops",
- "cb" => "/cloudburst",
"minty" => "/cloudydreams",
"violetdawn" => "/sandydawn",
- "twilight" => "/twi",
- "luna" => "/princessluna",
"cloudy" => "/cloudydreams",
"zipp" => "/zippstorm",
"babs" => "/fleurheartseed",
diff --git a/includes/util/travelling.inc b/includes/util/travelling.inc
index eced4f2..b1479fb 100644
--- a/includes/util/travelling.inc
+++ b/includes/util/travelling.inc
@@ -1,62 +1,5 @@
<?php
-$app = $GLOBALS["ColdHazeApp"] ?? json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/app.json"), true);
-$travelling = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/travelling/travelling.json"), true);
-
-$json_cloudburst = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/ynmuc/members.json"), true);
-$json_raindrops = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/gdapd/members.json"), true);
-$json_other = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/other/members.json"), true);
-
-if (!isset($json_cloudburst)) $json_cloudburst = [];
-if (!isset($json_raindrops)) $json_raindrops = [];
-if (!isset($json_other)) $json_other = [];
-
-$members = [...array_map(function ($i) {
- $i["_system"] = "ynmuc";
- return $i;
-}, $json_cloudburst), ...array_map(function ($i) {
- $i["_system"] = "gdapd";
- return $i;
-}, $json_raindrops), ...array_map(function ($i) use ($app) {
- $i["_system"] = $app["other"]["id"];
- return $i;
-}, $json_other)];
-
-foreach ($members as $member) {
- if (!isset($travelling[$member["id"]])) {
- $travelling[$member["id"]] = [
- "travelling" => false,
- "history" => []
- ];
-
- @file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/travelling/travelling.json", utf8_encode(json_encode($travelling, JSON_PRETTY_PRINT)));
- }
-
- if (!isset($travelling[$member["id"]]["equestria"])) {
- $travelling[$member["id"]]["equestria"] = false;
- }
-}
-
-function withTravelers(array $members, string $system): array {
- global $travelling;
- global $app;
-
- if ($system === $app["other"]["id"]) {
- return $members;
- } else {
- return [
- ...array_map(function ($i) use ($system) {
- $i['system'] = $system;
- return $i;
- }, array_filter($members, function ($i) use ($travelling) {
- return !(isset($travelling[$i['id']]) && $travelling[$i['id']]['travelling'] && (!isset($travelling[$i['id']]['equestria']) || !$travelling[$i['id']]['equestria']));
- })),
- ...array_filter(array_map(function ($i) use ($system) {
- $i['system'] = $system === "gdapd" ? "ynmuc" : "gdapd";
- return $i;
- }, json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . ($system === "gdapd" ? "ynmuc" : "gdapd") . "/members.json"), true)), function ($i) use ($travelling) {
- return isset($travelling[$i['id']]) && $travelling[$i['id']]['travelling'] && (!isset($travelling[$i['id']]['equestria']) || !$travelling[$i['id']]['equestria']);
- })
- ];
- }
+function withTravelers(array $members): array {
+ return $members;
} \ No newline at end of file