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) --- includes/components/details.inc | 166 ++++++ includes/components/emergency.inc | 194 +++++++ includes/components/footer.inc | 42 ++ includes/components/fullbanner.inc | 28 + includes/components/header.inc | 220 ++++++++ includes/components/mobilenav.inc | 88 +++ includes/components/navigation.inc | 424 +++++++++++++++ includes/components/pane.inc | 129 +++++ includes/components/planner.inc | 1046 ++++++++++++++++++++++++++++++++++++ includes/components/search.inc | 534 ++++++++++++++++++ includes/components/sysbanner.inc | 96 ++++ includes/components/wakeup.inc | 114 ++++ 12 files changed, 3081 insertions(+) create mode 100644 includes/components/details.inc create mode 100644 includes/components/emergency.inc create mode 100644 includes/components/footer.inc create mode 100644 includes/components/fullbanner.inc create mode 100644 includes/components/header.inc create mode 100644 includes/components/mobilenav.inc create mode 100644 includes/components/navigation.inc create mode 100644 includes/components/pane.inc create mode 100644 includes/components/planner.inc create mode 100644 includes/components/search.inc create mode 100644 includes/components/sysbanner.inc create mode 100644 includes/components/wakeup.inc (limited to 'includes/components') diff --git a/includes/components/details.inc b/includes/components/details.inc new file mode 100644 index 0000000..b7d0ebe --- /dev/null +++ b/includes/components/details.inc @@ -0,0 +1,166 @@ + +
" style="grid-template-columns: repeat(4, 1fr); background-color: ; margin-left: -20px; margin-right: -20px;"> +
+
+ "" . $lang["details"]["food_states"][0] . "", + 1 => "" . $lang["details"]["food_states"][1] . "", + 2 => "" . $lang["details"]["food_states"][2] . "", + 3 => "" . $lang["details"]["food_states"][3] . "", + } ?> +
+
+
+ "" . $lang["details"]["memory_states"][0] . "", + 1 => "" . $lang["details"]["memory_states"][1] . "", + 2 => "" . $lang["details"]["memory_states"][2] . "", + } ?> +
+ +
+ Age:
+ 0): ?> + INF ?> + Eternal" ?> + + - + + " . $metadata["birth"]["age"] . "* years old" ?> + + Sliding " . explode("-", $metadata["birth"]["age"])[0] . " to " . explode("-", $metadata["birth"]["age"])[1] . "" ?> + + + + - + + + " . $age . " years old" ?> + + +
+ + +
+
+ + + + - + +
+
+ Primary interest:
+ + + + - + +
+ + +
+ + + +
; margin-left: -20px; margin-right: -20px;grid-template-columns: repeat(3, 1fr);"> + + = 16 && $metadata["little"] === 0) || (!isset($age) && $metadata["little"] === 0)) || $metadata["sexual_features"]): ?> + +
+ + Sexual consent:
+ + , however may ask to not have sex at the moment and such request must be honored." data-bs-toggle="tooltip">Preemptive + + ." data-bs-toggle="tooltip">Required + +
+ = 16 && $metadata["little"] === 0) || (!isset($age) && $metadata["little"] === 0))): ?> + + +
+ +
+ Sexual alignmentSex. algn.:
+ (poly) +
+ +
+ +
This member is too young to be in a sexual relationship.
+
+ +
+ Romantic alignmentRom. algn.:
+ (poly) +
+ +
+ Birthday:
+ + + + - + +
+ +
+ diff --git a/includes/components/emergency.inc b/includes/components/emergency.inc new file mode 100644 index 0000000..5490985 --- /dev/null +++ b/includes/components/emergency.inc @@ -0,0 +1,194 @@ +

Emergency alert +
+ + · +
+

+ +Turn ON + +

Sending next notification never

+ + + + + + + + \ No newline at end of file diff --git a/includes/components/footer.inc b/includes/components/footer.inc new file mode 100644 index 0000000..2cef58f --- /dev/null +++ b/includes/components/footer.inc @@ -0,0 +1,42 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/includes/components/fullbanner.inc b/includes/components/fullbanner.inc new file mode 100644 index 0000000..ddd59df --- /dev/null +++ b/includes/components/fullbanner.inc @@ -0,0 +1,28 @@ + + + +
+
+ +
+ +
+ + + + + +
+
+ . +
+
+ +
+
+ is on a trip to Equestria. . +
+
+ \ No newline at end of file diff --git a/includes/components/header.inc b/includes/components/header.inc new file mode 100644 index 0000000..7c4cfc8 --- /dev/null +++ b/includes/components/header.inc @@ -0,0 +1,220 @@ +"> +
+ Error ' . $errno . ': ' . $errstr . ' [' . $file . ':' . $line . '] +
'); + } +} + +if (isset($_GET['errors'])) { + ini_set('display_errors', '1'); + ini_set('display_startup_errors', '1'); + error_reporting(E_ALL); + set_error_handler("error", E_ALL); +} + +global $_MemberName; +global $_MemberPage; +global $_SystemName; +global $_SystemPage; +global $toplevel; + +$pages = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/pages.json"), true); +$page = $pages[$toplevel] ?? [ + "rail" => false +]; + +require_once $_SERVER["DOCUMENT_ROOT"] . "/includes/util/travelling.inc"; global $travelling; +require_once $_SERVER["DOCUMENT_ROOT"] . "/includes/util/score.inc"; +require_once $_SERVER["DOCUMENT_ROOT"] . "/includes/util/pronouns.inc"; +require_once $_SERVER["DOCUMENT_ROOT"] . "/includes/util/bitset.inc"; +require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/banner.inc"; +require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/rainbow.inc"; +require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/functions.inc"; + +?> + + + + + + + + + <?= $title && $title !== "-" ? $title . " · " : "" ?>Cold Haze + .png" type="image/png"> + + id="admin-page"> + + + +
+ + + + + + + + + diff --git a/includes/components/mobilenav.inc b/includes/components/mobilenav.inc new file mode 100644 index 0000000..646738c --- /dev/null +++ b/includes/components/mobilenav.inc @@ -0,0 +1,88 @@ + + + + + + + + \ No newline at end of file diff --git a/includes/components/navigation.inc b/includes/components/navigation.inc new file mode 100644 index 0000000..beb92bb --- /dev/null +++ b/includes/components/navigation.inc @@ -0,0 +1,424 @@ + true, + "name" => "Private utilities", + "icon" => "/assets/icons/admin.svg", + "invert" => true, + "items" => [ + "alerts" => [ + "name" => null, + "minimal" => true, + "items" => [ + [ + "name" => $pages["emergency"]["name"][$lang["_name"]], + "icon" => "/assets/icons/emergency.svg", + "invert" => false, + "link" => "/-/emergency", + "stepped" => "rgb(220,53,69)", + "private" => false + ], + [ + "name" => $pages["wakeup"]["name"][$lang["_name"]], + "icon" => "/assets/icons/wakeup.svg", + "invert" => false, + "link" => "/-/wakeup", + "stepped" => "rgb(13,202,240)", + "private" => false + ] + ] + ], + "apps" => [ + "name" => $lang["navigation"]["apps"], + "minimal" => false, + "items" => [ + [ + "name" => $pages["fronting"]["name"][$lang["_name"]], + "icon" => "/assets/icons/fronting.svg", + "invert" => true, + "link" => "/-/fronting", + "stepped" => null, + "private" => false + ], + [ + "name" => $pages["profiles"]["name"][$lang["_name"]], + "icon" => "/assets/icons/profiles.svg", + "invert" => true, + "link" => "/-/profiles", + "stepped" => null, + "private" => false + ], + [ + "name" => $pages["money"]["name"][$lang["_name"]], + "icon" => "/assets/icons/money.svg", + "invert" => true, + "link" => "/-/money", + "stepped" => null, + "private" => true + ], + [ + "name" => $pages["rules"]["name"][$lang["_name"]], + "icon" => "/assets/icons/rules.svg", + "invert" => true, + "link" => "/-/rules", + "stepped" => null, + "private" => true + ], + [ + "name" => $pages["docs"]["name"][$lang["_name"]], + "icon" => "/assets/icons/docs.svg", + "invert" => true, + "link" => "/-/docs", + "stepped" => null, + "private" => true + ], + [ + "name" => $pages["computers"]["name"][$lang["_name"]], + "icon" => "/assets/icons/computers.svg", + "invert" => true, + "link" => "/-/computers", + "stepped" => null, + "private" => true + ], + [ + "name" => $pages["travelling"]["name"][$lang["_name"]], + "icon" => "/assets/icons/travelling.svg", + "invert" => true, + "link" => "/-/travelling", + "stepped" => null, + "private" => false + ], + [ + "name" => $pages["stats"]["name"][$lang["_name"]], + "icon" => "/assets/icons/stats.svg", + "invert" => true, + "link" => "/-/stats", + "stepped" => null, + "private" => true + ], + [ + "name" => $pages["logout"]["name"][$lang["_name"]], + "icon" => "/assets/icons/logout.svg", + "invert" => true, + "link" => "/-/logout", + "stepped" => null, + "private" => false + ] + ] + ], + "sort" => [ + "name" => "Sorted members lists", + "minimal" => false, + "items" => [ + [ + "name" => $pages["splitting"]["name"][$lang["_name"]], + "icon" => "/assets/icons/splitting.svg", + "invert" => true, + "link" => "/-/splitting", + "stepped" => null, + "private" => false + ], + [ + "name" => $pages["byfront"]["name"][$lang["_name"]], + "icon" => "/assets/icons/byfront.svg", + "invert" => true, + "link" => "/-/byfront", + "stepped" => null, + "private" => false + ], + [ + "name" => $pages["alphabet"]["name"][$lang["_name"]], + "icon" => "/assets/icons/alphabet.svg", + "invert" => true, + "link" => "/-/alphabet", + "stepped" => null, + "private" => false + ], + [ + "name" => $pages["s:species"]["name"][$lang["_name"]], + "icon" => "/assets/icons/species.svg", + "invert" => true, + "link" => "/-/byspecies", + "stepped" => null, + "private" => false + ], + ] + ], + /*"debug" => [ + "name" => $lang["navigation"]["debug"], + "minimal" => false, + "items" => [ + [ + "name" => $pages["debug"]["name"][$lang["_name"]], + "icon" => "/assets/icons/debug.svg", + "invert" => true, + "link" => "/-/debug", + "stepped" => null + ], + [ + "name" => $pages["bitset"]["name"][$lang["_name"]], + "icon" => "/assets/icons/bitset.svg", + "invert" => true, + "link" => "/-/bitset", + "stepped" => null + ], + [ + "name" => $pages["score"]["name"][$lang["_name"]], + "icon" => "/assets/icons/score.svg", + "invert" => true, + "link" => "/-/score", + "stepped" => null + ], + [ + "name" => $pages["logout"]["name"][$lang["_name"]], + "icon" => "/assets/icons/logout.svg", + "invert" => true, + "link" => "/-/logout", + "stepped" => null + ] + ] + ]*/ + ] +]; +$navigation_global = [ + "admin" => false, + "name" => $lang["navigation"]["general"], + "icon" => "/assets/icons/global.svg", + "invert" => true, + "items" => [ + "main" => [ + "name" => null, + "minimal" => false, + "items" => [ + [ + "name" => $pages["home"]["name"][$lang["_name"]], + "icon" => "/assets/icons/home.svg", + "invert" => true, + "link" => "/", + "stepped" => null, + "private" => false + ], + [ + "name" => $pages["relations"]["name"][$lang["_name"]], + "icon" => "/assets/icons/relations.svg", + "invert" => true, + "link" => "/-/relations", + "stepped" => null, + "private" => false + ], + [ + "name" => $pages["terminology"]["name"][$lang["_name"]], + "icon" => "/assets/icons/terminology.svg", + "invert" => true, + "link" => "/-/terminology", + "stepped" => null, + "private" => false + ] + ] + ] + ] +]; +$navigation_cloudburst = [ + "admin" => false, + "name" => "Cloudburst System", + "icon" => getAsset("ynmuc"), + "invert" => false, + "items" => [ + "header" => [ + "name" => null, + "minimal" => false, + "items" => [ + [ + "name" => $lang["navigation"]["about"], + "icon" => "/assets/icons/about.svg", + "invert" => true, + "link" => "/cloudburst", + "stepped" => null, + "private" => false + ], + [ + "name" => $pages["s:history"]["name"][$lang["_name"]], + "icon" => "/assets/icons/history.svg", + "invert" => true, + "link" => "/cloudburst/-/history", + "stepped" => null, + "private" => false + ], + [ + "name" => $pages["s:compare"]["name"][$lang["_name"]], + "icon" => "/assets/icons/compare.svg", + "invert" => true, + "link" => "/cloudburst/-/compare", + "stepped" => null, + "private" => false + ] + ] + ], + "members" => [ + "name" => $lang["navigation"]["members"], + "minimal" => false, + "items" => array_map(function ($member) { + return [ + "name" => $member['display_name'] ?? $member['name'], + "icon" => getAsset($member["system"], $member["id"], "heads"), + "invert" => false, + "link" => "/$member[name]", + "stepped" => null, + "private" => false + ]; + }, array_filter(scoreOrder(withTravelers(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/ynmuc/members.json"), true), "ynmuc"), "ynmuc"), function ($member) { + return $member['name'] !== "unknown" && $member['name'] !== "fusion" && $member['name'] !== "new"; + })) + ] + ] +]; +$navigation_other = [ + "admin" => true, + "name" => $app["other"]["name"], + "icon" => getAsset($app["other"]["id"]), + "invert" => false, + "items" => [ + "header" => [ + "name" => null, + "minimal" => false, + "items" => [ + [ + "name" => $lang["navigation"]["about"], + "icon" => "/assets/icons/about.svg", + "invert" => true, + "link" => "/" . $app["other"]["slug"], + "stepped" => null, + "private" => false + ], + [ + "name" => $pages["s:history"]["name"][$lang["_name"]], + "icon" => "/assets/icons/history.svg", + "invert" => true, + "link" => "/" . $app["other"]["slug"] . "/-/history", + "stepped" => null, + "private" => false + ], + [ + "name" => $pages["s:compare"]["name"][$lang["_name"]], + "icon" => "/assets/icons/compare.svg", + "invert" => true, + "link" => "/" . $app["other"]["slug"] . "/-/compare", + "stepped" => null, + "private" => false + ] + ] + ], + "members" => [ + "name" => $lang["navigation"]["members"], + "minimal" => false, + "items" => array_map(function ($member) { + return [ + "name" => $member['display_name'] ?? $member['name'], + "icon" => getAsset($member["system"], $member["id"], "heads"), + "invert" => false, + "link" => "/$member[name]", + "stepped" => null, + "private" => false + ]; + }, array_filter(scoreOrder(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/other/members.json"), true), $app["other"]["id"]), function ($member) { + return $member['name'] !== "unknown" && $member['name'] !== "fusion" && $member['name'] !== "new"; + })) + ] + ] +]; +$navigation_raindrops = [ + "admin" => false, + "name" => "Raindrops System", + "icon" => getAsset("gdapd"), + "invert" => false, + "items" => [ + "header" => [ + "name" => null, + "minimal" => false, + "items" => [ + [ + "name" => $lang["navigation"]["about"], + "icon" => "/assets/icons/about.svg", + "invert" => true, + "link" => "/raindrops", + "stepped" => null, + "private" => false + ], + [ + "name" => $pages["s:history"]["name"][$lang["_name"]], + "icon" => "/assets/icons/history.svg", + "invert" => true, + "link" => "/raindrops/-/history", + "stepped" => null, + "private" => false + ], + [ + "name" => $pages["s:compare"]["name"][$lang["_name"]], + "icon" => "/assets/icons/compare.svg", + "invert" => true, + "link" => "/raindrops/-/compare", + "stepped" => null, + "private" => false + ] + ] + ], + "members" => [ + "name" => $lang["navigation"]["members"], + "minimal" => false, + "items" => array_map(function ($member) { + return [ + "name" => $member['display_name'] ?? $member['name'], + "icon" => getAsset($member["system"], $member["id"], "heads"), + "invert" => false, + "link" => "/$member[name]", + "stepped" => null, + "private" => false + ]; + }, array_filter(scoreOrder(withTravelers(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/gdapd/members.json"), true), "gdapd"), "gdapd"), function ($member) { + return $member['name'] !== "unknown" && $member['name'] !== "fusion" && $member['name'] !== "new"; + })) + ] + ] +]; + +global $parts; + +if (isset($parts) && isset($parts[0]) && $parts[0] === $app["other"]["slug"]) { + $navigation = [ + "other" => $navigation_other, + "cloudburst" => $navigation_cloudburst, + "raindrops" => $navigation_raindrops, + "admin" => $navigation_admin, + "global" => $navigation_global + ]; +} elseif (isset($parts) && isset($parts[0]) && $parts[0] === "cloudburst") { + $navigation = [ + "cloudburst" => $navigation_cloudburst, + "raindrops" => $navigation_raindrops, + "other" => $navigation_other, + "admin" => $navigation_admin, + "global" => $navigation_global + ]; +} elseif (isset($parts) && isset($parts[0]) && $parts[0] === "raindrops") { + $navigation = [ + "raindrops" => $navigation_raindrops, + "cloudburst" => $navigation_cloudburst, + "other" => $navigation_other, + "admin" => $navigation_admin, + "global" => $navigation_global + ]; +} else { + $navigation = [ + "admin" => $navigation_admin, + "global" => $navigation_global, + "cloudburst" => $navigation_cloudburst, + "raindrops" => $navigation_raindrops, + "other" => $navigation_other, + ]; +} \ No newline at end of file diff --git a/includes/components/pane.inc b/includes/components/pane.inc new file mode 100644 index 0000000..28ccd71 --- /dev/null +++ b/includes/components/pane.inc @@ -0,0 +1,129 @@ + + + + + + + + + + + $item): if (!$item["admin"] || $isLoggedIn || $isLowerLoggedIn): ?> + +
+
+ " class="dropdown-icon" alt="" style=" border-radius: 2px;width:24px;vertical-align: middle;"> + +
+ + + + +
+ + + + \ No newline at end of file diff --git a/includes/components/planner.inc b/includes/components/planner.inc new file mode 100644 index 0000000..a7ec44f --- /dev/null +++ b/includes/components/planner.inc @@ -0,0 +1,1046 @@ +"; + } + + return ""; +} + +foreach ($cloudburst as $id => $day) { + foreach ($day as $index => $fronter) { + if (is_string($fronter)) { + $cloudburst[$id][$index] = [$fronter]; + } else if (is_array($fronter)) { + if (count($fronter) < 2) { + if (!isset($cloudburst[$id][$index][0])) $cloudburst[$id][$index][0] = null; + $cloudburst[$id][$index][1] = null; + } else if (count($fronter) > 2) { + $array = []; + + if (isset($cloudburst[$id][$index][0])) { + $array[0] = $cloudburst[$id][$index][0]; + } else { + $array[0] = null; + } + + if (isset($cloudburst[$id][$index][1])) { + $array[1] = $cloudburst[$id][$index][1]; + } else { + $array[1] = null; + } + + $cloudburst[$id][$index] = $array; + } + } + } +} + +foreach ($raindrops as $id => $day) { + foreach ($day as $index => $fronter) { + if (is_string($fronter)) { + $raindrops[$id][$index] = [$fronter]; + } else if (is_array($fronter)) { + if (count($fronter) < 2) { + if (!isset($raindrops[$id][$index][0])) $raindrops[$id][$index][0] = null; + $raindrops[$id][$index][1] = null; + } else if (count($fronter) > 2) { + $array = []; + + if (isset($raindrops[$id][$index][0])) { + $array[0] = $raindrops[$id][$index][0]; + } else { + $array[0] = null; + } + + if (isset($raindrops[$id][$index][1])) { + $array[1] = $raindrops[$id][$index][1]; + } else { + $array[1] = null; + } + + $raindrops[$id][$index] = $array; + } + } + } +} + +$school = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/school.json"), true); + +function formatTime($time) { + if ($time === "0:00") return "midnight"; + if ($time === "12:00") return "noon"; + + $parts = explode(":", $time); + $hours = (int)$parts[0]; + $ampm = ""; + + if ($hours === 0 || $hours === 12) { + $ampm = ($hours === 0 ? "am" : "pm"); + $hours = 12; + } else { + if ($hours > 12) { + $ampm = "pm"; + $hours = $hours - 12; + } else { + $ampm = "am"; + } + } + + if ((int)$parts[1] > 0) { + return $hours . ":" . $parts[1] . $ampm; + } else { + return $hours . $ampm; + } +} + +function school($time, $first = false) { + global $school; + global $_PROFILE; + global $isLowerLoggedIn; + + $day = date('Y-m-d', $time); + $parts = []; + + if (isset($school[$day])) { + if (isset($school[$day]["wakeUp"]["timestamp"])) { + $parts[] = "waking up at " . formatTime($school[$day]["wakeUp"][$_PROFILE["login"]]) . " (your time)"; + } + + if (isset($school[$day]["sleep"]["timestamp"])) { + $parts[] = "sleeping at " . formatTime($school[$day]["sleep"][$_PROFILE["login"]]) . " (your time)"; + } + } + + if ($isLowerLoggedIn) $parts = []; + + if (count($parts) > 0) { + if ($first) { + return ucfirst(implode(", ", $parts)); + } else { + return " · " . implode(", ", $parts); + } + } else { + if ($first) { + return "-"; + } else { + return ""; + } + } +} + +function day($display, $diff): void { if ($diff < 0) $disabled = true; else $disabled = false; global $cloudburst; global $raindrops; global $isLowerLoggedIn; ?> + + style="opacity: .75; pointer-events: none;"> + +
+ + + + style="opacity: .75; pointer-events: none;"> + Cloudburst System + Raindrops System + + + style="opacity: .75; pointer-events: none;"> + + + + + colspan="3" colspan="2"> + + + Multiple merged members + + Other/unknown/fallback pony + + " style="width:24px;"> + + + + + + + + + + + + + Multiple merged members + + Other/unknown/fallback pony + + " style="width:24px;"> + + + + + + + + + + + + + + + + + + colspan="3" colspan="2"> + + Multiple merged members + + Other/unknown/fallback pony + + " style="width:24px;"> + + + + + + + + + + + + + Multiple merged members + + Other/unknown/fallback pony + + " style="width:24px;"> + + + + + + + + + + + + + + + style="opacity: .75; pointer-events: none;"> + +
+ 0 && count($dayRaindrops) > 0): ?> + will sleep with + + + +
+ + + + + +

Front planner

+ + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/includes/components/search.inc b/includes/components/search.inc new file mode 100644 index 0000000..278ec41 --- /dev/null +++ b/includes/components/search.inc @@ -0,0 +1,534 @@ + + + + + + + + + + \ No newline at end of file diff --git a/includes/components/sysbanner.inc b/includes/components/sysbanner.inc new file mode 100644 index 0000000..8819617 --- /dev/null +++ b/includes/components/sysbanner.inc @@ -0,0 +1,96 @@ + + + + + \ No newline at end of file diff --git a/includes/components/wakeup.inc b/includes/components/wakeup.inc new file mode 100644 index 0000000..587e705 --- /dev/null +++ b/includes/components/wakeup.inc @@ -0,0 +1,114 @@ +

Wake-up alert +
+ + · +
+

+ +Turn ON + +

Sending next notification never

+ + + + + + \ No newline at end of file -- cgit