From eb89b15c0f044673c1206a418a21d0baba1a675e Mon Sep 17 00:00:00 2001 From: RaindropsSys Date: Sun, 12 Mar 2023 19:16:53 +0100 Subject: Updated 104 files, added 3 files, deleted 4 files and renamed 36 files (automated) --- pages/about.inc | 80 ------------------------ pages/alphabet.inc | 4 +- pages/api/chrome.php | 87 ++++++++++++++++++++++++++ pages/api/close.php | 1 + pages/api/cloudburst-img.php | 2 +- pages/api/computer.php | 8 ++- pages/api/data.php | 4 +- pages/api/docs.php | 2 +- pages/api/emergency-real.php | 2 +- pages/api/emergency.php | 2 +- pages/api/fronter.php | 2 +- pages/api/me.php | 2 +- pages/api/plex.php | 4 +- pages/api/pluralkit-integration.php | 120 ++++++++++++++---------------------- pages/api/ponytown.php | 2 +- pages/api/raindrops-img.php | 2 +- pages/api/save-private.php | 2 +- pages/api/save.php | 2 +- pages/api/token.php | 2 +- pages/api/wakeup-real.php | 2 +- pages/api/wakeup.php | 2 +- pages/byfront.inc | 4 +- pages/byspecies.inc | 6 +- pages/computers.inc | 48 +++++++++------ pages/debug.inc | 4 +- pages/docs.inc | 6 +- pages/edit-private.inc | 2 +- pages/edit.inc | 4 +- pages/emergency.inc | 6 +- pages/fronting.inc | 6 +- pages/games.inc | 4 +- pages/home.inc | 10 +-- pages/home.old.inc | 10 +-- pages/login.inc | 20 +++++- pages/metadata.inc | 6 +- pages/money.inc | 6 +- pages/page.inc | 8 +-- pages/ponytown.inc | 4 +- pages/profiles.inc | 6 +- pages/relations.inc | 4 +- pages/rules.inc | 8 +-- pages/splitting.inc | 4 +- pages/stats.inc | 4 +- pages/terminology.inc | 4 +- pages/travelling.inc | 6 +- pages/wakeup.inc | 6 +- 46 files changed, 265 insertions(+), 265 deletions(-) delete mode 100644 pages/about.inc create mode 100644 pages/api/chrome.php create mode 100644 pages/api/close.php (limited to 'pages') diff --git a/pages/about.inc b/pages/about.inc deleted file mode 100644 index 8a62d66..0000000 --- a/pages/about.inc +++ /dev/null @@ -1,80 +0,0 @@ - - -
-
-
-

About Cold Haze

-

- Cold Haze Engine version 2..
- Version date:
- Version ID:
- Install path:
- Server software: , via
- Transport protocol: -

- -

- PHP
- Zend Engine:
- Server API:
- Memory usage:
- Server OS:
- Server domain name:
- Server architecture: -

- -

- Disk space usage
- Engine:
- Database: -

-
-
- - diff --git a/pages/alphabet.inc b/pages/alphabet.inc index 55cb130..37bd74d 100644 --- a/pages/alphabet.inc +++ b/pages/alphabet.inc @@ -1,7 +1,7 @@ @@ -35,4 +35,4 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.inc'; - + diff --git a/pages/api/chrome.php b/pages/api/chrome.php new file mode 100644 index 0000000..0be8a94 --- /dev/null +++ b/pages/api/chrome.php @@ -0,0 +1,87 @@ + + + + + + + + + Luna for Chrome OS + + + +
+
+ +

Please login to Cold Haze

+

To proceed with activating Luna on this Chromebook, you need to login to Cold Haze. You also need to make sure you properly enroled this computer into Chrome Enterprise.

+ +
+
+ + + + +window.close(); \ No newline at end of file diff --git a/pages/api/cloudburst-img.php b/pages/api/cloudburst-img.php index 1967a90..7d22aad 100644 --- a/pages/api/cloudburst-img.php +++ b/pages/api/cloudburst-img.php @@ -1,6 +1,6 @@ "Plex", diff --git a/pages/api/pluralkit-integration.php b/pages/api/pluralkit-integration.php index 0793873..f5bb4dd 100644 --- a/pages/api/pluralkit-integration.php +++ b/pages/api/pluralkit-integration.php @@ -1,6 +1,6 @@ 1) { - $context = stream_context_create([ - 'http' => [ - 'method' => 'POST', - 'header' => - "Content-Type: text/plain\r\n" . - "Title: 🐴 Switch occurred in the $name\r\n" . - "Priority: default\r\n" . - "Tags: switch\r\n" . - "Actions: view, Open " . $fronters["members"][0]["display_name"] . " on Cold Haze, https://ponies.equestria.horse/" . $fronters["members"][0]["name"] . "/, clear=true;view, Open " . $fronters["members"][1]["display_name"] . " on Cold Haze, https://ponies.equestria.horse/" . $fronters["members"][1]["name"] . "/, clear=true\r\n" . - "Authorization: Basic " . base64_encode($ntfy["user"] . ":" . $ntfy["password"]), - 'content' => ($fronters["members"][0]["display_name"] ?? $fronters["members"][0]["name"]) . " and " . ($fronters["members"][1]["display_name"] ?? $fronters["members"][1]["name"]) . " switched in just now" - ] - ]); - } else if (count($fronters["members"]) > 0) { - $context = stream_context_create([ - 'http' => [ - 'method' => 'POST', - 'header' => - "Content-Type: text/plain\r\n" . - "Title: 🐴 Switch occurred in the $name\r\n" . - "Priority: default\r\n" . - "Tags: switch\r\n" . - "Actions: view, Open on Cold Haze, https://ponies.equestria.horse/" . $fronters["members"][0]["name"] . "/, clear=true\r\n" . - "Authorization: Basic " . base64_encode($ntfy["user"] . ":" . $ntfy["password"]), - 'content' => ($fronters["members"][0]["display_name"] ?? $fronters["members"][0]["name"]) . " switched in just now" - ] - ]); - } else { - $context = stream_context_create([ - 'http' => [ - 'method' => 'POST', - 'header' => - "Content-Type: text/plain\r\n" . - "Title: 🐴 Switch occurred in the $name\r\n" . - "Priority: default\r\n" . - "Tags: switch\r\n" . - "Actions: view, Open on Cold Haze, https://ponies.equestria.horse/, clear=true\r\n" . - "Authorization: Basic " . base64_encode($ntfy["user"] . ":" . $ntfy["password"]), - 'content' => "The fallback pony switched in just now" - ] - ]); - } + if (count($fronters["members"]) > 1) { + $context = stream_context_create([ + 'http' => [ + 'method' => 'POST', + 'header' => + "Content-Type: text/plain\r\n" . + "Title: 🐴 Switch occurred in $name\r\n" . + "Priority: default\r\n" . + "Tags: switch\r\n" . + "Actions: view, Open " . $fronters["members"][0]["display_name"] . " on Cold Haze, https://ponies.equestria.horse/" . $fronters["members"][0]["name"] . "/, clear=true;view, Open " . $fronters["members"][1]["display_name"] . " on Cold Haze, https://ponies.equestria.horse/" . $fronters["members"][1]["name"] . "/, clear=true\r\n" . + "Authorization: Basic " . base64_encode($ntfy["user"] . ":" . $ntfy["password"]), + 'content' => ($fronters["members"][0]["display_name"] ?? $fronters["members"][0]["name"]) . " and " . ($fronters["members"][1]["display_name"] ?? $fronters["members"][1]["name"]) . " switched in just now" + ] + ]); + } else if (count($fronters["members"]) > 0) { + $context = stream_context_create([ + 'http' => [ + 'method' => 'POST', + 'header' => + "Content-Type: text/plain\r\n" . + "Title: 🐴 Switch occurred in $name\r\n" . + "Priority: default\r\n" . + "Tags: switch\r\n" . + "Actions: view, Open on Cold Haze, https://ponies.equestria.horse/" . $fronters["members"][0]["name"] . "/, clear=true\r\n" . + "Authorization: Basic " . base64_encode($ntfy["user"] . ":" . $ntfy["password"]), + 'content' => ($fronters["members"][0]["display_name"] ?? $fronters["members"][0]["name"]) . " switched in just now" + ] + ]); + } else { + $context = stream_context_create([ + 'http' => [ + 'method' => 'POST', + 'header' => + "Content-Type: text/plain\r\n" . + "Title: 🐴 Switch occurred in $name\r\n" . + "Priority: default\r\n" . + "Tags: switch\r\n" . + "Actions: view, Open on Cold Haze, https://ponies.equestria.horse/, clear=true\r\n" . + "Authorization: Basic " . base64_encode($ntfy["user"] . ":" . $ntfy["password"]), + 'content' => "The fallback pony switched in just now" + ] + ]); + } + if ($system !== $app["other"]["id"] || !isset($app["other"])) { file_get_contents('https://' . $ntfy["server"] . '/public-switches', false, $context); } if ($system === "gdapd") { $topic = "public-switches-raindrops"; - - if (count($fronters["members"]) > 0) { - file_get_contents('https://' . $ntfy["server"] . '/public-switches-fr', false, stream_context_create([ - 'http' => [ - 'method' => 'POST', - 'header' => - "Content-Type: text/plain\r\n" . - "Title: 🐴 $name vient de switch\r\n" . - "Priority: default\r\n" . - "Tags: switch\r\n" . - "Actions: view, Voir sur Cold Haze, https://fr.equestria.horse/" . $fronters["members"][0]["name"] . "/, clear=true\r\n" . - "Authorization: Basic " . base64_encode($ntfy["user"] . ":" . $ntfy["password"]), - 'content' => ($fronters["members"][0]["display_name"] ?? $fronters["members"][0]["name"]) . " est désormais au front" - ] - ])); - } else { - file_get_contents('https://' . $ntfy["server"] . '/public-switches-fr', false, stream_context_create([ - 'http' => [ - 'method' => 'POST', - 'header' => - "Content-Type: text/plain\r\n" . - "Title: 🐴 $name vient de switch\r\n" . - "Priority: default\r\n" . - "Tags: switch\r\n" . - "Actions: view, Voir sur Cold Haze, https://fr.equestria.horse/, clear=true\r\n" . - "Authorization: Basic " . base64_encode($ntfy["user"] . ":" . $ntfy["password"]), - 'content' => "Le poney de trait est désormais au front" - ] - ])); - } } else if ($system === "ynmuc") { $topic = "public-switches-cloudburst"; } else { diff --git a/pages/api/ponytown.php b/pages/api/ponytown.php index f41ac01..e75ea33 100644 --- a/pages/api/ponytown.php +++ b/pages/api/ponytown.php @@ -1,6 +1,6 @@ @@ -174,4 +174,4 @@ $travelling = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includ - + diff --git a/pages/byspecies.inc b/pages/byspecies.inc index 28f114e..ee2b372 100644 --- a/pages/byspecies.inc +++ b/pages/byspecies.inc @@ -1,4 +1,4 @@ - 0): ?> - ">" style="width:24px;"> ,
'); $index++; endforeach; ?> + ">" style="width:24px;"> ,
'); $index++; endforeach; ?> - @@ -54,4 +54,4 @@ function species(array $members, string $id, string $name) { global $systemID; g - \ No newline at end of file + \ No newline at end of file diff --git a/pages/computers.inc b/pages/computers.inc index 56a1b5d..fb88296 100644 --- a/pages/computers.inc +++ b/pages/computers.inc @@ -1,6 +1,6 @@ @@ -812,7 +814,13 @@ if (count($parts) === 2 || count($parts) === 3) { + +
+ Install Chrome OS extension +
@@ -881,4 +893,4 @@ if (count($parts) === 2 || count($parts) === 3) { } - + diff --git a/pages/debug.inc b/pages/debug.inc index 1327af5..6d2b4c9 100644 --- a/pages/debug.inc +++ b/pages/debug.inc @@ -1,7 +1,7 @@ - + diff --git a/pages/docs.inc b/pages/docs.inc index 2e43727..a94f92e 100644 --- a/pages/docs.inc +++ b/pages/docs.inc @@ -1,7 +1,7 @@
@@ -401,4 +401,4 @@ function showDocument($item) { ?> } - + diff --git a/pages/edit-private.inc b/pages/edit-private.inc index 4d89b5c..f26c8c6 100644 --- a/pages/edit-private.inc +++ b/pages/edit-private.inc @@ -34,7 +34,7 @@ if ($member === null) { peh_error("System member not found", 404); } - require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/edit-private.inc'; + require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/fragments/edit-private.inc'; } exit; \ No newline at end of file diff --git a/pages/edit.inc b/pages/edit.inc index e074087..28b8d88 100644 --- a/pages/edit.inc +++ b/pages/edit.inc @@ -19,7 +19,7 @@ if ($isLowerLoggedIn && $systemID !== $app["other"]["id"]) { } if ($member === null) { - require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/sysedit.inc'; + require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/fragments/sysedit.inc'; } else { $members = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . $systemID . "/members.json"), true); $memberData = null; @@ -38,7 +38,7 @@ if ($member === null) { peh_error("System member not found", 404); } - require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/edit.inc'; + require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/fragments/edit.inc'; } exit; \ No newline at end of file diff --git a/pages/emergency.inc b/pages/emergency.inc index 0d34251..244571b 100644 --- a/pages/emergency.inc +++ b/pages/emergency.inc @@ -1,15 +1,15 @@
- +
- + diff --git a/pages/fronting.inc b/pages/fronting.inc index a2b5cb0..6cd464b 100644 --- a/pages/fronting.inc +++ b/pages/fronting.inc @@ -1,15 +1,15 @@
- +
- + diff --git a/pages/games.inc b/pages/games.inc index 4df95f1..ca881e4 100644 --- a/pages/games.inc +++ b/pages/games.inc @@ -1,7 +1,7 @@ @@ -80,4 +80,4 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.inc';
- + diff --git a/pages/home.inc b/pages/home.inc index 82ff3d5..86bf513 100644 --- a/pages/home.inc +++ b/pages/home.inc @@ -4,7 +4,7 @@ if (isset($_GET["ec"])) { header("HTTP/1.1 " . $_GET["ec"] . " Error"); } -require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/init.inc"; require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.inc'; global $readOnly; global $isNormallyLoggedIn; global $_PROFILE; global $lang; global $pages; global $isLowerLoggedIn; global $app; global $isLoggedIn; ?> +require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/init.inc"; require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/components/header.inc'; global $readOnly; global $isNormallyLoggedIn; global $_PROFILE; global $lang; global $pages; global $isLowerLoggedIn; global $app; global $isLoggedIn; ?>
@@ -21,7 +21,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/init.inc"; require_once $_SE
- +
.png" style="width:128px;">

@@ -34,15 +34,11 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/init.inc"; require_once $_SE

Cold Haze

- -

poneys dans une tête

-

ponies in 3 plural systems

-
@@ -79,4 +75,4 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/init.inc"; require_once $_SE - \ No newline at end of file + \ No newline at end of file diff --git a/pages/home.old.inc b/pages/home.old.inc index f918549..085af58 100644 --- a/pages/home.old.inc +++ b/pages/home.old.inc @@ -4,7 +4,7 @@ if (isset($_GET["ec"])) { header("HTTP/1.1 " . $_GET["ec"] . " Error"); } -require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/init.inc"; require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.inc'; global $readOnly; global $isNormallyLoggedIn; global $_PROFILE; global $lang; global $pages; global $isLowerLoggedIn; global $app; global $isLoggedIn; ?> +require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/init.inc"; require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/components/header.inc'; global $readOnly; global $isNormallyLoggedIn; global $_PROFILE; global $lang; global $pages; global $isLowerLoggedIn; global $app; global $isLoggedIn; ?>
@@ -21,7 +21,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/init.inc"; require_once $_SE
- +
.png" style="width:128px;">

@@ -34,15 +34,11 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/init.inc"; require_once $_SE

Cold Haze

- -

poneys dans une tête

-

ponies in 3 plural systems

-

@@ -80,4 +76,4 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/init.inc"; require_once $_SE - \ No newline at end of file + \ No newline at end of file diff --git a/pages/login.inc b/pages/login.inc index 8d71574..313be91 100644 --- a/pages/login.inc +++ b/pages/login.inc @@ -1,9 +1,25 @@ + +
@@ -36,4 +52,4 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.inc'; global $readOnl
- + diff --git a/pages/metadata.inc b/pages/metadata.inc index 9faefef..768f548 100644 --- a/pages/metadata.inc +++ b/pages/metadata.inc @@ -1,8 +1,8 @@ @@ -678,4 +678,4 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.inc'; - + diff --git a/pages/page.inc b/pages/page.inc index d35dba8..8446062 100644 --- a/pages/page.inc +++ b/pages/page.inc @@ -49,8 +49,8 @@ $systemID = $system === "cloudburst" ? "ynmuc" : ($system === $app["other"]["slu if ($member === null) { global $_SystemName; $_SystemName = $system; - $pageFile = $_SERVER['DOCUMENT_ROOT'] . '/includes/system.inc'; - require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/system.inc'; + $pageFile = $_SERVER['DOCUMENT_ROOT'] . '/includes/fragments/system.inc'; + require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/fragments/system.inc'; } else if ($member === "-" && isset($parts[2])) { if (file_exists($_SERVER['DOCUMENT_ROOT'] . '/includes/system/' . $parts[2] . '.inc')) { global $_SystemPage; @@ -112,8 +112,8 @@ if ($member === null) { global $_MemberName; $_MemberName = $member; - $pageFile = $_SERVER['DOCUMENT_ROOT'] . '/includes/member.inc'; - require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/member.inc'; + $pageFile = $_SERVER['DOCUMENT_ROOT'] . '/includes/fragments/member.inc'; + require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/fragments/member.inc'; } exit; \ No newline at end of file diff --git a/pages/ponytown.inc b/pages/ponytown.inc index d055c9c..7ad38f7 100644 --- a/pages/ponytown.inc +++ b/pages/ponytown.inc @@ -23,7 +23,7 @@ if ($isLowerLoggedIn && $member["_system"] !== $app["other"]["id"]) { $title = ($member["display_name"] ?? $member["name"]) . " · " . $title; -require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.inc'; +require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/components/header.inc'; $member = getMemberWithoutSystem($parts[2]); @@ -255,4 +255,4 @@ $member = getMemberWithoutSystem($parts[2]); - \ No newline at end of file + \ No newline at end of file diff --git a/pages/profiles.inc b/pages/profiles.inc index dd6df4b..41e5222 100644 --- a/pages/profiles.inc +++ b/pages/profiles.inc @@ -1,8 +1,8 @@ @@ -101,4 +101,4 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/profiles.inc'; - + diff --git a/pages/relations.inc b/pages/relations.inc index b66ab25..7a05def 100644 --- a/pages/relations.inc +++ b/pages/relations.inc @@ -1,7 +1,7 @@ @@ -102,4 +102,4 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.inc'; - + diff --git a/pages/rules.inc b/pages/rules.inc index ec007df..1238b7d 100644 --- a/pages/rules.inc +++ b/pages/rules.inc @@ -1,7 +1,7 @@ @@ -134,7 +134,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.inc';

>Rule #:

type="text" placeholder="Rule name" class="form-control" style="margin-bottom:15px;color:white;background:#111;border-color:#222;" name="payload[][name]" value="", ">", $rule["name"]))) ?>"> - +