From 5103495a461ed90f23b5ec890dca73935bff0c68 Mon Sep 17 00:00:00 2001 From: RaindropsSys Date: Wed, 2 Aug 2023 14:08:08 +0200 Subject: Updated 19 files and added assets/icons/new/menu.svg (automated) --- pages/api/docs.php | 8 ++++---- pages/api/reauthenticate.php | 8 +++++--- pages/byfront.inc | 15 ++++++--------- pages/home.inc | 2 +- pages/login.inc | 2 +- pages/money.inc | 6 ++++++ pages/pair.inc | 4 +++- pages/ponytown.inc | 16 ++++++++-------- pages/sessions.inc | 13 +++++++++++-- 9 files changed, 45 insertions(+), 29 deletions(-) (limited to 'pages') diff --git a/pages/api/docs.php b/pages/api/docs.php index a60a6e6..31cd961 100644 --- a/pages/api/docs.php +++ b/pages/api/docs.php @@ -20,10 +20,10 @@ if (isset($select)) { die("Not set"); } -if ($json_object["content"]) $data["contents"] = $json_object["content"]; -if ($json_object["name"]) $data["name"] = $json_object["name"]; -if ($json_object["explicit"]) $data["nsfw"] = $json_object["explicit"]; -if ($json_object["category"]) $data["category"] = trim($json_object["category"]) !== "" && trim($json_object["category"]) !== "Unsorted" && trim($json_object["category"]) !== "unsorted" && trim($json_object["category"]) !== "/no" && trim($json_object["category"]) !== "Unsort" && trim($json_object["category"]) !== "unsort" ? $json_object["category"] : null; +if (isset($json_object["content"])) $data["contents"] = $json_object["content"]; +if (isset($json_object["name"])) $data["name"] = $json_object["name"]; +if (isset($json_object["explicit"])) $data["nsfw"] = $json_object["explicit"]; +if (isset($json_object["category"])) $data["category"] = trim($json_object["category"]) !== "" && trim($json_object["category"]) !== "Unsorted" && trim($json_object["category"]) !== "unsorted" && trim($json_object["category"]) !== "/no" && trim($json_object["category"]) !== "Unsort" && trim($json_object["category"]) !== "unsort" ? $json_object["category"] : null; $data["last"]["date"] = time(); $data["last"]["author"] = $_PROFILE['login']; diff --git a/pages/api/reauthenticate.php b/pages/api/reauthenticate.php index 2b5a8ca..b194098 100644 --- a/pages/api/reauthenticate.php +++ b/pages/api/reauthenticate.php @@ -26,9 +26,10 @@ if (isset($_COOKIE['PEH2_SESSION_TOKEN']) && $isLoggedIn) { $old["last"] = time(); $old["profile"] = $_PROFILE; - file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/tokens/" . $newToken, json_encode($old)); + file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/sessions/" . $newToken, json_encode($old)); + file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/tokens/" . $newToken, json_encode($_PROFILE)); } else if (isset($_COOKIE['PEH2_SESSION_TOKEN']) && $isLowerLoggedIn) { - $old = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/lowertokens/" . $_COOKIE['PEH2_SESSION_TOKEN']), true); + $old = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/sessions/" . $_COOKIE['PEH2_SESSION_TOKEN']), true); if (!isset($_GET["plain"])) { $old["name"] = base64_decode($_GET["name"] ?? "LQo="); @@ -41,7 +42,8 @@ if (isset($_COOKIE['PEH2_SESSION_TOKEN']) && $isLoggedIn) { $old["last"] = time(); $old["profile"] = $_PROFILE; - file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/lowertokens/" . $newToken, json_encode($old)); + file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/sessions/" . $newToken, json_encode($old)); + file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/lowertokens/" . $newToken, json_encode($_PROFILE)); } die($newToken); \ No newline at end of file diff --git a/pages/byfront.inc b/pages/byfront.inc index f845378..a8ff483 100644 --- a/pages/byfront.inc +++ b/pages/byfront.inc @@ -111,30 +111,27 @@ $travelling = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includ } if ((isset($age) && $age > 0 && time() > 1677628800) || time() <= 1677628800): ?> -
time() - (86400 * 21)): ?>rgba(128, 54, 54, .1) time() - (86400 * 37)): ?>rgba(255, 227, 0, 0.17)rgba(255, 255, 255, .1); time() - (86400 * 21)): ?>rgba(255, 255, 255, .1) time() - (86400 * 30)): ?>rgba(255, 227, 0, 0.17)rgba(255,55,55,0.17);;margin-bottom:10px;padding:10px;border-radius:10px;display:grid;grid-template-columns: 1fr 2fr max-content;opacity: 0.75;background-color:rgba(255, 255, 255, .1) !important;"> +
opacity: 0.75;"> "> " style="width:24px;">  - No + rounded-pill">Not fronting Less - Persecutor + rounded-pill">Persecutor - Punished + rounded-pill">Punished - Memory + rounded-pill">Memory - Travelling - - - Must front + rounded-pill">Travelling diff --git a/pages/home.inc b/pages/home.inc index 7485cfd..fcd04ab 100644 --- a/pages/home.inc +++ b/pages/home.inc @@ -13,7 +13,7 @@ function banner() { global $isLoggedIn; global $isLowerLoggedIn; $byColor = getM .png" style="width:128px;" class="old-ui">

- " style="height:32px;position:absolute;z-index:99;"> + " data-bs-toggle="tooltip" src="" style="height:32px;position:absolute;z-index:99;">

diff --git a/pages/login.inc b/pages/login.inc index 1522ab3..157794f 100644 --- a/pages/login.inc +++ b/pages/login.inc @@ -4,7 +4,7 @@ if (isset($_GET["return"])) { setcookie("PEH2_RETURN_PAGE", $_GET["return"], 0, "/"); } -if (isset($_GET["immediate"])) { +if (isset($_GET["immediate"]) || (isset($_COOKIE["new2023UI"]) && !isset($_GET["no2023"]))) { header("Location: /auth/init"); die(); } diff --git a/pages/money.inc b/pages/money.inc index aa2e57e..67a9a56 100644 --- a/pages/money.inc +++ b/pages/money.inc @@ -27,6 +27,12 @@ if (isset($parts[2])) { $systemID = $_PROFILE["login"] === "cloudburst" ? "ynmuc" : "gdapd"; $fronters = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . ($_PROFILE["login"] === "cloudburst" ? "ynmuc" : "gdapd") . "/fronters.json"), true)["members"]; +if (!isset($parts[2])) { + unset($systemID); +} else { + $systemID = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/money/" . $parts[2] . ".json"), true)["owner"] === "cloudburst" ? "ynmuc" : "gdapd"; +} + if (count($fronters) > 0) { $myId = $fronters[0]["id"]; } else { diff --git a/pages/pair.inc b/pages/pair.inc index 2fafc31..8b0bb09 100644 --- a/pages/pair.inc +++ b/pages/pair.inc @@ -60,6 +60,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/components/header.inc'; glob
diff --git a/pages/ponytown.inc b/pages/ponytown.inc index 08d71ea..08c3f27 100644 --- a/pages/ponytown.inc +++ b/pages/ponytown.inc @@ -73,15 +73,15 @@ $member = getMemberWithoutSystem($parts[2]);
  1. Open Pony Town [main, event, eventblue, eventgreen, breezy, building], login if needed, and select the right pony
  2. -
  3. Click on edit
  4. -
  5. Focus on Export and click on Image export zoom
  6. -
  7. In the menu, select 1x
  8. -
  9. Click on Image export settings and uncheck everything, like this:
    [all settings unchecked]
  10. -
  11. Click on PNG and download the file to your device
  12. +
  13. Click on edit
  14. +
  15. Focus on Export and click on Image export zoom
  16. +
  17. In the menu, select 1x
  18. +
  19. Click on Image export settings and uncheck everything, like this:
    [all settings unchecked]
  20. +
  21. Click on PNG and download the file to your device
  22. Upload this file here (yes this is a button):
  23. -
  24. Go back to Pony Town, click on Image export settings again
  25. -
  26. Check "Head only", and nothing else, like this:
    [Head only checked]
  27. -
  28. Click on PNG once again and download the file to your device
  29. +
  30. Go back to Pony Town, click on Image export settings again
  31. +
  32. Check "Head only", and nothing else, like this:
    [Head only checked]
  33. +
  34. Click on PNG once again and download the file to your device
  35. Upload this file (the second one) here (yes this is also a button):
  36. We will check if you used the correct settings and save it if everything is good.
diff --git a/pages/sessions.inc b/pages/sessions.inc index f324494..0e4e779 100644 --- a/pages/sessions.inc +++ b/pages/sessions.inc @@ -157,6 +157,7 @@ $verifiedNames = [ -- cgit