From 2b192b3840ac344c456b98304ea400f0af90da15 Mon Sep 17 00:00:00 2001 From: RaindropsSys Date: Sat, 13 Jan 2024 16:12:11 +0100 Subject: Updated 46 files and deleted 19 files (automated) --- app.php | 15 +- assets/logo/custom-2023.css | 10 +- includes/components/2023ui.inc | 18 +- includes/components/emergency.inc | 8 +- includes/components/fullbanner.inc | 14 +- includes/components/header.inc | 8 +- includes/components/pleasure.inc | 10 +- includes/components/sysbanner.inc | 15 - includes/components/timeline.inc | 2 +- includes/external/signal/index.js | 6 +- includes/fragments/dashboard.inc | 37 +- includes/fragments/member.inc | 35 -- includes/fragments/system.inc | 4 +- includes/jobs/FrontersNotification.php | 4 - includes/jobs/PKFronters.php | 6 +- includes/jobs/RefreshCache.php | 2 +- includes/jobs/UpdateAssets.php | 3 - includes/maintenance/deleteUnusedAssets.php | 6 +- includes/reminder.php | 21 - includes/system/history.inc | 2 +- includes/util/agewarning.inc | 4 +- includes/util/banner.inc | 22 +- includes/util/functions.inc | 58 +- includes/util/homepage.inc | 9 +- includes/util/rainbow.inc | 12 +- includes/util/score.inc | 28 - includes/util/session.inc | 5 - includes/util/short.inc | 3 - includes/util/travelling.inc | 61 +-- pages/alerts.inc | 2 - pages/api/cloudburst-img-round.php | 18 - pages/api/cloudburst-img.php | 11 - pages/api/cloudburst-img2-round.php | 18 - pages/api/cloudburst-two.php | 8 - pages/api/cloudburst.php | 6 - pages/api/emergency-real.php | 2 +- pages/api/emergency.php | 2 +- pages/api/me.php | 10 +- pages/api/money/account.php | 62 --- pages/api/money/accounts.php | 96 ---- pages/api/money/create.php | 99 ---- pages/api/pleasure-real.php | 5 +- pages/api/pleasure.php | 5 +- pages/api/pluralkit-integration.php | 3 - pages/api/raindrops-img-round.php | 18 - pages/api/raindrops-img-round2.php | 20 - pages/api/raindrops-img.php | 11 - pages/api/raindrops-img2-round.php | 18 - pages/api/raindrops-img2-round2.php | 20 - pages/api/raindrops-two.php | 8 - pages/api/raindrops.php | 6 - pages/api/timeline.php | 2 +- pages/api/wakeup-real.php | 33 -- pages/api/wakeup.php | 33 -- pages/byfront.inc | 43 +- pages/emergency.inc | 2 - pages/front.inc | 8 +- pages/metadata.inc | 8 +- pages/money.inc | 822 ---------------------------- pages/page.inc | 29 +- pages/pleasure.inc | 1 - pages/public.inc | 13 +- pages/relations.inc | 19 +- pages/sessions.inc | 2 - pages/travelling.inc | 223 -------- 65 files changed, 102 insertions(+), 2012 deletions(-) delete mode 100644 pages/api/cloudburst-img-round.php delete mode 100644 pages/api/cloudburst-img.php delete mode 100644 pages/api/cloudburst-img2-round.php delete mode 100644 pages/api/cloudburst-two.php delete mode 100644 pages/api/cloudburst.php delete mode 100644 pages/api/money/account.php delete mode 100644 pages/api/money/accounts.php delete mode 100644 pages/api/money/create.php delete mode 100644 pages/api/raindrops-img-round.php delete mode 100644 pages/api/raindrops-img-round2.php delete mode 100644 pages/api/raindrops-img.php delete mode 100644 pages/api/raindrops-img2-round.php delete mode 100644 pages/api/raindrops-img2-round2.php delete mode 100644 pages/api/raindrops-two.php delete mode 100644 pages/api/raindrops.php delete mode 100644 pages/api/wakeup-real.php delete mode 100644 pages/api/wakeup.php delete mode 100644 pages/money.inc delete mode 100644 pages/travelling.inc diff --git a/app.php b/app.php index 638d8c4..2a6578a 100644 --- a/app.php +++ b/app.php @@ -61,16 +61,12 @@ if (in_array($toplevel, ["editor", "icons", "species", "uploads"])) { $GLOBALS["ColdHazePerformance"]["router"] = (microtime(true) - $start) * 1000; require_once $_SERVER['DOCUMENT_ROOT'] . "/pages/" . $toplevel . ".inc"; } - } else if ($toplevel === "cloudburst" || $toplevel === "raindrops" || $toplevel === "moonglow" || (($isLoggedIn || $isLowerLoggedIn) && $toplevel === $app["other"]["slug"])) { + } else if ($toplevel === "raindrops" || $toplevel === "moonglow" || (($isLoggedIn || $isLowerLoggedIn) && $toplevel === $app["other"]["slug"])) { $parts = explode("/", $_GET['_']); if (isset($parts[1]) && $parts[1] !== "-") { if ($parts[1] === "unknown") { - if ($parts[0] === "cloudburst") { - header("Location: /unknown-cb"); - } else { - header("Location: /unknown-rd"); - } + header("Location: /unknown-rd"); } else { header("Location: /" . $parts[1]); } @@ -85,11 +81,6 @@ if (in_array($toplevel, ["editor", "icons", "species", "uploads"])) { if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/pages/" . $toplevel . ".inc")) { header("Location: /-/" . $toplevel); } else { - $namesCloudburst = [...array_map(function ($i) { - return $i['name']; - }, array_filter(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/ynmuc/members.json"), true), function ($i) { - return file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/" . $i["id"] . ".json"); - })), "unknown-cb"]; $namesRaindrops = [...array_map(function ($i) { return $i['name']; }, array_filter(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/gdapd/members.json"), true), function ($i) { @@ -110,7 +101,7 @@ if (in_array($toplevel, ["editor", "icons", "species", "uploads"])) { })), $app["other"]["unknown"]]; } - if ((in_array($toplevel, $namesCloudburst) || in_array($toplevel, $namesRaindrops) || in_array($toplevel, $namesOther) || in_array($toplevel, $namesMoonglow)) && $toplevel !== "unknown") { + if ((in_array($toplevel, $namesRaindrops) || in_array($toplevel, $namesOther) || in_array($toplevel, $namesMoonglow)) && $toplevel !== "unknown") { $pageFile = $_SERVER['DOCUMENT_ROOT'] . "/pages/page.inc"; $GLOBALS["ColdHazePerformance"]["router"] = (microtime(true) - $start) * 1000; require_once $_SERVER['DOCUMENT_ROOT'] . "/pages/page.inc"; diff --git a/assets/logo/custom-2023.css b/assets/logo/custom-2023.css index 4d296f5..0f8c75b 100644 --- a/assets/logo/custom-2023.css +++ b/assets/logo/custom-2023.css @@ -83,7 +83,7 @@ nav.navbar { } @media (max-width: 991px) { - #hpd-cloudburst > div, #hpd-raindrops > div, #hpd-legacy > div, #hpd-other > div { + #hpd-raindrops > div, #hpd-legacy > div, #hpd-other > div { grid-template-columns: repeat(3, 1fr) !important; } @@ -97,13 +97,13 @@ nav.navbar { } @media (max-width: 768px) { - #hpd-cloudburst > div, #hpd-raindrops > div, #hpd-legacy > div, #hpd-other > div { + #hpd-raindrops > div, #hpd-legacy > div, #hpd-other > div { grid-template-columns: repeat(2, 1fr) !important; } } @media (max-width: 575px) { - #hpd-cloudburst > div, #hpd-raindrops > div, #hpd-legacy > div, #hpd-other > div { + #hpd-raindrops > div, #hpd-legacy > div, #hpd-other > div { grid-template-columns: repeat(1, 1fr) !important; } @@ -114,7 +114,7 @@ nav.navbar { width: 32px !important; } - #hpd-cloudburst > div, #hpd-raindrops > div, #hpd-legacy > div, #hpd-other > div { + #hpd-raindrops > div, #hpd-legacy > div, #hpd-other > div { grid-gap: 5px !important; } @@ -612,7 +612,7 @@ dd { #new-homepage-systems { display: grid; - grid-template-columns: repeat(3, 1fr); + grid-template-columns: repeat(2, 1fr); grid-gap: 20px; } 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 @@
" target="_blank" style="color: inherit; text-decoration: inherit;"> - + - " style="width: 32px; height: 32px; border-radius: 999px; background-color: var(--palette-2);"> + " style="width: 32px; height: 32px; border-radius: 999px; background-color: var(--palette-2);"> ?dpr=2&size=32" style="width: 32px; height: 32px; border-radius: 999px; background-color: var(--palette-2);"> @@ -188,10 +188,7 @@ \ 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 @@ Turn ON -

Sending next notification never

+

Sending the next notification never


@@ -24,6 +24,9 @@ + - -
-
- -
-

Money tracker

- -
- The Ponycule money tracker is deprecated and will be removed. Data currently in the money tracker will be moved to individual accounts on a dedicated money tracking application that Equestria.dev will not have control over. -
- -
- - -

£ · €

-

As of · €1.00 = £

- - - - - -
- -

Cloudburst System (£, earning £/month)

-
-
- Show monthly earnings - - - $value): ?> - - - - - -
:">£
-
-
-
- $account): if ($account["owner"] === "cloudburst"): ?> - "> -
-
-

- Default · % interests -
Max balance: (% used)
No maximum balance -
-
-
- -
- -
- $minimumCloudburst) { - $part2 = ($allAccounts - $minimumCloudburst) / $allAccounts; - $part1 = 1 - $part2; - $difference = $allAccounts - $minimumCloudburst; - } else { - $part1 = 1; - $part2 = 0; - $difference = $minimumCloudburst - $allAccounts; - } - - ?> -
-
-
-

">£ $minimumCloudburst): ?> (%) $minimumCloudburst ? "over" : "under" ?> the minimum

- - -
-
- " style="width: 100%;"> -
-
-
-

-
-
%">
-
- 0): $months = ceil($missing / getMonthlyEarnings()["cloudburst"]); ?> -
Costs £ · Missing £ · Can afford it in (in month 1 ? "s" : "" ?>)
-
You can afford it now, this will take you to the minimum.
-
You can afford it now, this will take you £ above the minimum.
-
-
-
- - - - - - -

Raindrops System (, earning €/month)

-
-
- Show monthly earnings - - - $value): ?> - - - - - -
:">€
-
-
-
- $account): if ($account["owner"] === "raindrops"): ?> - "> -
-
-

- Default · % interests -
Max balance: (% used)
No maximum balance -
-
-
- -
- -
- $minimumRaindrops) { - $part2 = ($allAccounts - $minimumRaindrops) / $allAccounts; - $part1 = 1 - $part2; - $difference = $allAccounts - $minimumRaindrops; - } else { - $part1 = 1; - $part2 = 0; - $difference = $minimumRaindrops - $allAccounts; - } - - ?> -
-
-
-

">€ $minimumRaindrops): ?> (%) $minimumRaindrops ? "over" : "under" ?> the minimum

- - -
-
- " style="width: 100%;"> -
-
-
-

-
-
%">
-
- 0): $months = ceil($missing / getMonthlyEarnings()["raindrops"]); ?> -
Costs € · Missing € · Can afford it in (in month 1 ? "s" : "" ?>)
-
You can afford it now, this will take you to the minimum.
-
You can afford it now, this will take you € above the minimum.
-
-
-
- - - - - -
- -

- · (default) - " style="float:right;margin-top:5px;vertical-align:middle;opacity:1 !important; ">Back -

-
-

-
-
Maximum balance: (% used)No maximum balance
-
Interests: % interestsNone
-
-
- - - - -
- - - - - - - - - -
- - diff --git a/pages/page.inc b/pages/page.inc index fb63383..fa82a10 100644 --- a/pages/page.inc +++ b/pages/page.inc @@ -9,10 +9,7 @@ if (!isset($_GET['_']) || trim($_GET['_']) === "") peh_error("Invalid request", $parts = explode("/", $_GET['_']); -if (($parts[0] !== "cloudburst" && $parts[0] !== "raindrops" && $parts[0] !== "moonglow" && $parts[0] !== $app["other"]["slug"]) && (!(count($parts) > 2) || $parts[1] === "-")) { - $namesCloudburst = [...array_map(function ($i) { - return $i['name']; - }, json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/ynmuc/members.json"), true)), "unknown-cb"]; +if (($parts[0] !== "raindrops" && $parts[0] !== "moonglow" && $parts[0] !== $app["other"]["slug"]) && (!(count($parts) > 2) || $parts[1] === "-")) { $namesRaindrops = [...array_map(function ($i) { return $i['name']; }, json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/gdapd/members.json"), true)), "unknown-rd"]; @@ -33,9 +30,7 @@ if (($parts[0] !== "cloudburst" && $parts[0] !== "raindrops" && $parts[0] !== "m array_unshift($parts, ""); $parts = array_values($parts); - if (in_array($parts[1], $namesCloudburst)) { - $parts[0] = "cloudburst"; - } else if (in_array($parts[1], $namesRaindrops)) { + if (in_array($parts[1], $namesRaindrops)) { $parts[0] = "raindrops"; } else if (in_array($parts[1], $namesMoonglow)) { $parts[0] = "moonglow"; @@ -49,9 +44,9 @@ if (($parts[0] !== "cloudburst" && $parts[0] !== "raindrops" && $parts[0] !== "m $system = $parts[0]; $member = ($parts[1] ?? null) === "" ? null : ($parts[1] ?? null); -if ($system !== "cloudburst" && $system !== "raindrops" && $system !== "moonglow" && ($system !== $app["other"]["slug"] && !$isLowerLoggedIn && !$isLoggedIn)) peh_error("System not found", 404); -$systemCommonName = $system === "cloudburst" ? "Cloudburst System" : ($system === $app["other"]["slug"] && ($isLoggedIn || $isLowerLoggedIn) ? $app["other"]["name"] : ($system === "moonglow" ? "Moonglow" : "Raindrops System")); -$systemID = $system === "cloudburst" ? "ynmuc" : ($system === $app["other"]["slug"] && ($isLoggedIn || $isLowerLoggedIn) ? $app["other"]["id"] : ($system === "moonglow" ? "hrbom" : "gdapd")); +if ($system !== "raindrops" && $system !== "moonglow" && ($system !== $app["other"]["slug"] && !$isLowerLoggedIn && !$isLoggedIn)) peh_error("System not found", 404); +$systemCommonName = $system === $app["other"]["slug"] && ($isLoggedIn || $isLowerLoggedIn) ? $app["other"]["name"] : ($system === "moonglow" ? "Moonglow" : "Raindrops System"); +$systemID = $system === $app["other"]["slug"] && ($isLoggedIn || $isLowerLoggedIn) ? $app["other"]["id"] : ($system === "moonglow" ? "hrbom" : "gdapd"); if ($member === null) { global $_SystemName; @@ -72,13 +67,12 @@ if ($member === null) { $traveller = false; $members = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . ($systemID === $app["other"]["id"] ? "other" : $systemID) . "/members.json"), true); - $members2 = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . ($systemID === "gdapd" ? "ynmuc" : "gdapd") . "/members.json"), true); + $members2 = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . ($systemID === "gdapd" ? "hrbom" : "gdapd") . "/members.json"), true); $memberData = null; $memberCommonName = null; $memberID = null; - foreach ($members as $m) { - if ($m['name'] === $member) { + foreach ($members as $m) {if ($m['name'] === $member) { $memberData = $m; $memberCommonName = $m['display_name'] ?? $m['name']; $memberID = $m['id']; @@ -86,14 +80,7 @@ if ($member === null) { } foreach ($members2 as $m) { - if ($m['name'] === $member && $travelling[$m['id']]['travelling']) { - $traveller = true; - $memberData = $m; - $memberCommonName = $m['display_name'] ?? $m['name']; - $memberID = $m['id']; - $system = $systemID === "gdapd" ? "cloudburst" : "raindrops"; - $systemID = $system === "cloudburst" ? "ynmuc" : "gdapd"; - } else if ($m['name'] === $member) { + if ($m['name'] === $member) { $memberFoundInAnotherSystem = true; } } diff --git a/pages/pleasure.inc b/pages/pleasure.inc index 1a6e50a..5435bd1 100644 --- a/pages/pleasure.inc +++ b/pages/pleasure.inc @@ -1,7 +1,6 @@
-
style="grid-template-columns: repeat(4, 1fr);"> - +
style="grid-template-columns: repeat(3, 1fr);"> @@ -74,7 +73,7 @@ function members() { $isLoggedIn = false; $isLowerLoggedIn = false; global $app;
- -
- Ponycule Documents is now deprecated. Ponycule's Documents feature is now deprecated in favor of Google Docs and will be removed in the future. Please migrate your documents to Google Drive as soon as possible. -
- - diff --git a/pages/relations.inc b/pages/relations.inc index 1c5a878..5d3f7ef 100644 --- a/pages/relations.inc +++ b/pages/relations.inc @@ -11,7 +11,7 @@ function page() { global $isLoggedIn; global $isLowerLoggedIn; global $pages; gl

-
+
"> " style="width:24px;"> @@ -66,23 +66,6 @@ function page() { global $isLoggedIn; global $isLowerLoggedIn; global $pages; gl - - - - - - -
- Friends:
-
- - - - - " data-bs-toggle="tooltip" class="member-link tooltip-nohelp" href="/">" style="width:24px;"> - - -
diff --git a/pages/sessions.inc b/pages/sessions.inc index 7e6f328..444e981 100644 --- a/pages/sessions.inc +++ b/pages/sessions.inc @@ -7,7 +7,6 @@ $verified = [ dns_get_record("zephyrheights.equestria.dev", DNS_A)[0]["ip"], dns_get_record("maretimebay.equestria.dev", DNS_A)[0]["ip"], dns_get_record("bridlewood.equestria.dev", DNS_A)[0]["ip"], - dns_get_record("cloudsdale.equestria.dev", DNS_A)[0]["ip"], dns_get_record("manehattan.equestria.dev", DNS_A)[0]["ip"], dns_get_record("everfree.equestria.dev", DNS_A)[0]["ip"], ]; @@ -16,7 +15,6 @@ $verifiedNames = [ "Raindrops System", "Raindrops System", "Equestria.dev bridlewood", - "Cloudburst System", "Equestria.dev manehattan", $app["other"]["name"] ]; diff --git a/pages/travelling.inc b/pages/travelling.inc deleted file mode 100644 index c7eaadf..0000000 --- a/pages/travelling.inc +++ /dev/null @@ -1,223 +0,0 @@ - [ - 'method' => "DELETE", - 'header' => "Authorization: " . $app["pluralkit"][$travellingSystem === "gdapd" ? "raindrops" : "cloudburst"] - ] - ]; - - $reqContext = stream_context_create($reqOptions); - - // No actual data is received on DELETE, so we don't even bother trying to collect req response; if it fails it will put a warning in the logs anyway. - //sleep(1); - //file_get_contents("https://api.pluralkit.me/v2/members/$travellingMember", false, $reqContext); - } - } else { - $travelling[$_GET['member']]["travelling"] = true; - $travelling[$_GET['member']]["equestria"] = $equestria; - $travelling[$_GET['member']]["pluralkit"] = null; - $travelling[$_GET['member']]["history"][] = [ - "start" => date("c"), - "end" => null, - "equestria" => $equestria - ]; - - if (!$equestria) { - // Insert code here to run after a travelling member is ADDED. - // $id is the member ID (e.g. rirgf) - // $member is the member - // $system is the system the member comes from - // $metadata is the ponies.equestria.horse metadata - // $travellingMember is unset here - // Store the travelling member ID in $travelling[$id]['pluralkit'] - $reqOptions = [ - 'http' => [ - 'method' => "POST", - 'header' => "Authorization: " . $app["pluralkit"][$travellingSystem === "gdapd" ? "raindrops" : "cloudburst"] . "\r\n" . - "Content-Type: application/json", - 'content' => json_encode([ - 'name' => "$member[name]-travelling", - 'display_name' => $member["display_name"], - 'color' => $member["color"], - 'birthday' => $member["birthday"], - 'created' => $member["created"], - 'pronouns' => $member["pronouns"], - 'avatar_url' => $member["avatar_url"], - 'banner' => $member["banner"], - 'description' => "**This pony is visiting this system from the " . ($system === "gdapd" ? "Raindrops System" : "Cloudburst System") . ". They are not a permanent member of this system**\n\n$member[description]", - 'proxy_tags' => array_map(function ($i) { - $i["prefix"] = "+" . $i['prefix']; - return $i; - }, $member["proxy_tags"]), - 'privacy' => $member["privacy"] - ]) - ] - ]; - - $reqContext = stream_context_create($reqOptions); - - //sleep(1); - //$member = json_decode(file_get_contents("https://api.pluralkit.me/v2/members", false, $reqContext), true); - - // Member exists? - //if (isset($member)) { - //$travelling[$id]['pluralkit'] = $member["id"]; - //} - } - } - } - - file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/cache/navigation.json", "{}"); - file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/cache/home.json", "{}"); - createJob("RefreshCache", []); - - header("Location: /-/travelling"); - file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/travelling/travelling.json", utf8_encode(json_encode($travelling, JSON_PRETTY_PRINT))); - die(); -} - -global $use2023UI; - -require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/components/header.inc'; -global $travelling; - -?> - - - -
-
-
-

System travelling

- -
- -
- "> - " style="width:24px;">  - - -
-
- Current location:
- - - - Equestria - - Celeste - - - "> System - - - () - -
-
- -
- - - - - -
-
- -
- - -
- - -- cgit