From 475c5731bf3362b6ac8d2dc5d5b43e4b4a6117bd Mon Sep 17 00:00:00 2001 From: RaindropsSys Date: Tue, 21 Mar 2023 16:21:21 +0100 Subject: Updated 26 files and added 1074 files (automated) --- pages/api/chrome.php | 2 +- pages/api/desktop.php | 3 + pages/api/me.php | 28 +- pages/api/menu.php | 168 +++++++++++ pages/api/pleasure-real.php | 35 +++ pages/api/pleasure.php | 35 +++ pages/computers.inc | 23 +- pages/login.inc | 21 +- pages/pleasure.inc | 15 + pages/schedules.inc | 213 +++++++++++++ pages/toys.inc | 720 ++++++++++++++++++++++++++++++++++++++++++++ 11 files changed, 1233 insertions(+), 30 deletions(-) create mode 100644 pages/api/desktop.php create mode 100644 pages/api/menu.php create mode 100644 pages/api/pleasure-real.php create mode 100644 pages/api/pleasure.php create mode 100644 pages/pleasure.inc create mode 100644 pages/schedules.inc create mode 100644 pages/toys.inc (limited to 'pages') diff --git a/pages/api/chrome.php b/pages/api/chrome.php index 3b49ec7..c50599a 100644 --- a/pages/api/chrome.php +++ b/pages/api/chrome.php @@ -4,7 +4,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/session.inc"; global $i if (isset($_GET["e"])) { - header("Access-Control-Allow-Origin: chrome-extension://klenhenmabddpffgdaijdkjmfkkafbno"); + header("Access-Control-Allow-Origin: chrome-extension://foioekefbipjjonpgpbjahmplcealhhg"); } else { header("Access-Control-Allow-Origin: *"); } diff --git a/pages/api/desktop.php b/pages/api/desktop.php new file mode 100644 index 0000000..5d79440 --- /dev/null +++ b/pages/api/desktop.php @@ -0,0 +1,3 @@ + true, + "name" => "Raindrops System", + "id" => "raindrops", + "pluralkit" => "gdapd", + "avatar" => getAsset("gdapd"), + "email" => $_PROFILE["profile"]["email"]["email"] + ])); } else if ($_PROFILE["login"] === "cloudburst") { - die('{"name": "Cloudburst System", "id": "cloudburst", "pluralkit": "ynmuc"}'); + die(json_encode([ + "valid" => true, + "name" => "Cloudburst System", + "id" => "cloudburst", + "pluralkit" => "ynmuc", + "avatar" => getAsset("ynmuc"), + "email" => $_PROFILE["profile"]["email"]["email"] + ])); } else { die(json_encode([ + "valid" => true, "name" => $app["other"]["name"], "id" => $app["other"]["slug"], - "pluralkit" => $app["other"]["id"] + "pluralkit" => $app["other"]["id"], + "avatar" => getAsset($app["other"]["id"]), + "email" => $_PROFILE["profile"]["email"]["email"] ])); } \ No newline at end of file diff --git a/pages/api/menu.php b/pages/api/menu.php new file mode 100644 index 0000000..10214d8 --- /dev/null +++ b/pages/api/menu.php @@ -0,0 +1,168 @@ + "Cold Haze", + "items" => [ + [ + "title" => "Front planner", + "link" => "coldhaze://-/fronting", + "show" => $available["coldHaze"], + "icon" => "icons://planner" + ], + [ + "title" => "Profile scores", + "link" => "coldhaze://-/profiles", + "show" => $available["coldHaze"], + "icon" => "icons://scores" + ], + [ + "title" => "Money tracker", + "link" => "coldhaze://-/money", + "show" => $available["coldHaze"] && $isLoggedIn, + "icon" => "icons://money" + ], + [ + "title" => "Rules", + "link" => "coldhaze://-/rules", + "show" => $available["coldHaze"] && $isLoggedIn, + "icon" => "icons://rules" + ], + [ + "title" => "Toys database", + "link" => "coldhaze://-/toys", + "show" => $available["coldHaze"] && $isLoggedIn && $isSexual, + "icon" => "icons://toys" + ], + [ + "title" => "Documents", + "link" => "coldhaze://-/docs", + "show" => $available["coldHaze"] && $isLoggedIn, + "icon" => "icons://documents" + ], + [ + "title" => "Devices", + "link" => "coldhaze://-/computers", + "show" => $available["coldHaze"] && $isLoggedIn, + "icon" => "icons://computers" + ], + [ + "title" => "System travelling", + "link" => "coldhaze://-/travelling", + "show" => $available["coldHaze"], + "icon" => "icons://travelling" + ] + ] + ], + [ + "title" => "Utilities", + "items" => [ + [ + "title" => "Backup viewer", + "link" => "local://backup", + "show" => true, + "icon" => "icons://backup" + ], + [ + "title" => "SSH client", + "link" => "local://ssh", + "show" => true, + "icon" => "icons://ssh" + ] + ] + ], + [ + "title" => "Booru", + "items" => [ + [ + "title" => "Home", + "link" => "booru://home/", + "show" => $available["booru"], + "icon" => "icons://home" + ], + [ + "title" => "Search", + "link" => "booru://search/", + "show" => $available["booru"], + "icon" => "icons://search" + ], + [ + "title" => "Followed tags", + "link" => "booru://followed/", + "show" => $available["booru"], + "icon" => "icons://followed" + ], + [ + "title" => "Saved images", + "link" => "booru://saved/", + "show" => $available["booru"], + "icon" => "icons://saved" + ], + [ + "title" => "Explicit gallery", + "link" => "booru://nsfw/g/", + "show" => $available["booru"] && $isSexual, + "icon" => "icons://nsfw" + ], + [ + "title" => "Genitalia", + "link" => "booru://nsfw/sp2/", + "show" => $available["booru"] && $isSexual, + "icon" => "https://booru.equestria.dev/nsfw/icon/" + ] + ] + ], + [ + "title" => "Other apps", + "items" => [ + [ + "title" => "Ponycon.info", + "link" => "ponycon://", + "show" => $available["ponycon"], + "icon" => "icons://ponycon" + ], + [ + "title" => "Delta", + "link" => "delta://", + "show" => $available["delta"], + "icon" => "icons://delta" + ], + [ + "title" => "Gitea", + "link" => "gitea://equestria.dev", + "show" => $available["gitea"], + "icon" => "icons://gitea" + ], + [ + "title" => "JetBrains Hub", + "link" => "hub://hub/projects", + "show" => true, + "icon" => "icons://hub" + ], + [ + "title" => "YouTrack", + "link" => "youtrack://", + "show" => $available["youtrack"], + "icon" => "icons://youtrack" + ], + [ + "title" => "Plex", + "link" => "https://plex.equestria.dev", + "show" => true, + "icon" => "icons://plex" + ], + [ + "title" => "Proxmox", + "link" => "https://admin.equestria.dev", + "show" => true, + "icon" => "icons://proxmox" + ] + ] + ] +])); \ No newline at end of file diff --git a/pages/api/pleasure-real.php b/pages/api/pleasure-real.php new file mode 100644 index 0000000..2d631ff --- /dev/null +++ b/pages/api/pleasure-real.php @@ -0,0 +1,35 @@ + [ + 'method' => 'POST', + 'header' => + "Content-Type: text/plain\r\n" . + "Title: ๐Ÿฉ $pony wants to play for a bit\r\n" . + "Priority: high\r\n" . + "Tags: pleasure\r\n" . + "Authorization: Basic " . base64_encode($ntfy["user"] . ":" . $ntfy["password"]), + 'content' => "Hey, $pony wants to play and have fun for a bit, get up!" + ] +])); + +die(); \ No newline at end of file diff --git a/pages/api/pleasure.php b/pages/api/pleasure.php new file mode 100644 index 0000000..b300a70 --- /dev/null +++ b/pages/api/pleasure.php @@ -0,0 +1,35 @@ + [ + 'method' => 'POST', + 'header' => + "Content-Type: text/plain\r\n" . + "Title: [Test] ๐Ÿฉ $pony wants to play for a bit\r\n" . + "Priority: high\r\n" . + "Tags: pleasure\r\n" . + "Authorization: Basic " . base64_encode($ntfy["user"] . ":" . $ntfy["password"]), + 'content' => "[This is a test] Hey, $pony wants to play and have fun for a bit, get up!" + ] +])); + +die(); \ No newline at end of file diff --git a/pages/computers.inc b/pages/computers.inc index d2b9cbd..67cb6ef 100644 --- a/pages/computers.inc +++ b/pages/computers.inc @@ -68,9 +68,9 @@ if (str_ends_with($computer["os"], "unknown")) {
-

We are unable to give you access to this computer.

-

This computer is running xsion 1.0.0. This version of Luna is considered malware because of inconspicuous behavior and is therefore not usable anymore and has been disabled. This means you cannot access this computer at the moment.

- Update this computer to run Luna 1.1.0 or newer and try again. +

We are unable to give you access to this device.

+

This computer is running Luna version 1.0.0. This version of Luna is considered malware because of inconspicuous behavior and is therefore not usable anymore and has been disabled. This means you cannot access this computer at the moment.

+ Update this device to run Luna 1.1.0 or newer and try again.

Overview

@@ -266,7 +266,7 @@ if (str_ends_with($computer["os"], "unknown")) { Remaining capacity: / (designed for 0): ?>, % left) - This computer does not contain a battery.This operating system does not support reporting battery info. + This device does not contain a battery.This operating system does not support reporting battery info.

Operating system

@@ -304,6 +304,9 @@ if (str_ends_with($computer["os"], "unknown")) { + 0): ?>

Software versions

@@ -345,15 +348,15 @@ if (str_ends_with($computer["os"], "unknown")) { ?>: - +

Remote control

- You can remotely control this computer. Open remote control.
- Note: The user of this computer will need to approve your connection request before you can see and control their screen. + You can remotely control this device. Open remote device.
+ Note: The user of this device will need to approve your connection request before you can see and control their screen.

@@ -864,8 +867,8 @@ if (str_ends_with($computer["os"], "unknown")) {
-

Computers

-

Click on a computer to view information about it (open windows, installed apps, ...).

+

Devices

+

Click on a device to view information about it

diff --git a/pages/login.inc b/pages/login.inc index 313be91..1522ab3 100644 --- a/pages/login.inc +++ b/pages/login.inc @@ -1,25 +1,18 @@ - -
diff --git a/pages/pleasure.inc b/pages/pleasure.inc new file mode 100644 index 0000000..ec468d5 --- /dev/null +++ b/pages/pleasure.inc @@ -0,0 +1,15 @@ + + +
+
+
+ +
+
+ + diff --git a/pages/schedules.inc b/pages/schedules.inc new file mode 100644 index 0000000..bfdaf6e --- /dev/null +++ b/pages/schedules.inc @@ -0,0 +1,213 @@ + + + + +
+
+

Schedules

+ +
+
+
+
+

--:--

+
+ + format("H|i")); + $now = ((int)$parts[0] * 3600) + ((int)$parts[1] * 60); + + if ($start < $now && $now < $end) { + echo('

๐Ÿ—„๏ธ  Currently at work

Started ' . timeAgo($now - $start, false, true, true) . '
Finishing ' . timeIn($end - $now, true) . '
'); + } elseif ($now > $end) { + echo('
๐ŸŽ‰  Finally off work!
'); + } elseif ($now < $start) { + echo('

๐Ÿ—„๏ธ  There\'s work today

Starting ' . timeIn($start - $now, true) . '
Working for ' . timeAgo($end - $start, false, true, true, false) . '
'); + } + } else { + echo('
๐ŸŽ‰  No work today!
'); + } + + ?> + +
    +
  • Anchorage: --:--
  • +
  • Vancouver: --:--
  • +
+ + +
+ +
+
+ Cloudburst System
+

--:--

+
+ + parseFile($_SERVER['DOCUMENT_ROOT'] . "/includes/data/calendar.ics"); + + $college = array_values(array_filter((array)$calendar->getEvents()->sorted(), function ($i) { + return strtotime(((array)$i["DTEND"])["date"]) > time() && date('Y-m-d', strtotime(((array)$i["DTEND"])["date"])) === date('Y-m-d') && trim(strtolower($i["SUMMARY"])) === "(cloudburst) college"; + })); + + if (count($college) > 0) { + $start = strtotime(((array)$college[0]["DTSTART"])["date"]); + $end = strtotime(((array)$college[0]["DTEND"])["date"]); + $now = time(); + + if ($start < $now && $now < $end) { + echo('

๐Ÿซ๏ธ  Currently in college

Started ' . timeAgo($now - $start, false, true, true) . '
Finishing ' . timeIn($end - $now, true) . '
'); + } elseif ($now > $end) { + echo('
๐ŸŽ‰  Finally out of college!
'); + } elseif ($now < $start) { + echo('

๐Ÿซ๏ธ  Getting ready for college

Starting ' . timeIn($start - $now, true) . '
In college for ' . timeAgo($end - $start, false, true, true, false) . '
'); + } + } else { + echo('
๐ŸŽ‰  No college today!
'); + } + + ?> + + +
+ +
+
+ Raindrops System
+

--:--

+
+ + 0) { + $start = $today["firstClass"]["timestamp"] / 1000; + $end = strtotime($today["end"]); + $now = time(); + + if ($start < $now && $now < $end) { + echo('

๐ŸŽ“๏ธ  Currently in school

Started ' . timeAgo($now - $start, false, true, true) . '
Finishing ' . timeIn($end - $now, true) . '
'); + } elseif ($now > $end) { + echo('
๐ŸŽ‰  Finally out of school!
'); + } elseif ($now < $start) { + echo('

๐ŸŽ“๏ธ  Getting ready for school

Starting ' . timeIn($start - $now, true) . '
In school for ' . timeAgo($end - $start, false, true, true, false) . '
'); + } + } else { + echo('
๐ŸŽ‰  No school today!
'); + } + } + + ?> + + +
+
+
+ + + + diff --git a/pages/toys.inc b/pages/toys.inc new file mode 100644 index 0000000..afcd5ef --- /dev/null +++ b/pages/toys.inc @@ -0,0 +1,720 @@ + $item) { + if ($item["id"] === $id) { + $selectedIndex = $index; + $selected = $item; + break; + } + } + + if ($selected === null) { + header("Location: /-/toys"); + die(); + } + + unset($data[$selectedIndex]); + file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/toys/toys.json", utf8_encode(json_encode($data))); + header("Location: /-/toys/?d&id=" . $id); + die(); +} + +if (isset($_POST['updateAction'])) { + $data = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/toys/toys.json"), true); + + $selected = null; + $selectedIndex = -1; + $id = $_POST['action']; + + foreach ($data as $index => $item) { + if ($item["id"] === $id) { + $selectedIndex = $index; + $selected = $item; + break; + } + } + + if ($selected === null) { + header("Location: /-/toys"); + die(); + } + + if (isset($_POST["sexual"])) { + $selected["sexual"] = true; + } else { + $selected["sexual"] = false; + } + + if (isset($_POST["name"])) $selected["name"] = strip_tags(trim($_POST["name"])); + if (isset($_POST["usage"])) $selected["usage"] = strip_tags(trim($_POST["usage"])); + if (isset($_POST["irl"])) $selected["irl"] = strip_tags(trim($_POST["irl"])); + if (isset($_POST["image"])) $selected["image"] = strip_tags(trim($_POST["image"])); + if (isset($_POST["usage_img"])) $selected["usage_img"] = strip_tags(trim($_POST["usage_img"])); + if (isset($_POST["keywords"])) $selected["keywords"] = array_map(function ($i) { + return trim($i); + }, explode(",", strip_tags(trim($_POST["keywords"])))); + if (isset($_POST["description"])) $selected["description"] = strip_tags(trim($_POST["description"])); + if (isset($_POST["water"])) $selected["water"] = match ($_POST["water"]) { + "0" => "out", + "1" => "in", + "2" => "both", + "3" => "playground" + }; + + if (isset($_POST["relations"])) { + $ponies = []; + + foreach ($_POST["relations"] as $relation => $d) { + $ponies[] = [ + "members" => explode("-", $relation), + "deprecated" => isset($d["deprecated"]), + "sexual" => isset($d["sexual"]) + ]; + } + + $selected["ponies"] = $ponies; + } + + global $_PROFILE; + if ($_PROFILE['login'] === "raindrops" && isset($_POST["verified"])) { + $selected["verified"] = true; + } else { + unset($selected["verified"]); + } + + if (isset($_POST["untested"])) { + $selected["untested"] = true; + } else { + unset($selected["untested"]); + } + + $data[$selectedIndex] = $selected; + file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/toys/toys.json", utf8_encode(json_encode($data))); + + header("Location: /-/toys/" . $id); + die(); +} + +if (isset($_POST['createAction'])) { + require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/random.inc"; + $data = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/toys/toys.json"), true); + + if (!isset($_POST["name"]) || !isset($_POST["water"])) { + header("Location: /-/toys"); + die(); + } + if (trim($_POST["name"]) === "" || !is_numeric($_POST["water"])) { + header("Location: /-/toys"); + die(); + } + + $water = match ($_POST["water"]) { + "0" => "out", + "1" => "in", + "2" => "both", + "3" => "playground" + }; + $name = strip_tags(trim($_POST["name"])); + $id = random(); + + $ponies = []; + + if (isset($_POST["relations"])) { + foreach ($_POST["relations"] as $relation => $_) { + $ponies[] = [ + "members" => explode("-", $relation), + "deprecated" => false + ]; + } + } + + if (isset($_POST["sexual"])) { + $sexual = true; + } else { + $sexual = false; + } + + $data[] = [ + "id" => $id, + "name" => $name, + "water" => $water, + "description" => null, + "ponies" => $ponies, + "usage" => null, + "irl" => null, + "image" => "", + "usage_img" => "", + "keywords" => [], + "sexual" => $sexual + ]; + + file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/toys/toys.json", utf8_encode(json_encode($data))); + header("Location: /-/toys/" . $id); + die(); +} + +global $pagename; +$parts = explode("/", $pagename); +$data = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/toys/toys.json"), true); + +$selected = null; + +if (isset($parts[1])) { + $id = $parts[1]; + + foreach ($data as $item) { + if ($item["id"] === $id) { + $selected = $item; + break; + } + } + + if ($selected === null) { + header("Location: /-/toys/?nf&id=" . $id); + die(); + } else { + $title = $selected["name"] . " ยท " . $title; + } +} + +require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/components/header.inc'; +require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/util/keywords.inc'; + +if (!file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/toys/toys.json")) file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/toys/toys.json", "[]"); + +global $_PROFILE; +global $pagename; +$parts = explode("/", $pagename); + +?> + + + + + +
+
+
"> + +
+ + Error: The requested toy () was not found, it may have been deleted or has never existed. +
+ + + +
+ + Success: The toy with ID has been successfully deleted. +
+ + + + +

+ + Back +

+ +

+ Edit ยท + Unverified + + Underwater + + Outside of water + + Underwater + Outside of water + +

+ +
2fr !important; grid-gap: 20px;"> + +
+ " style="width: 100%; max-height: 100vh;"> +
+ +
+ + + ", strip_tags($selected["description"]))); ?> + +

No description provided for this toy. Enter edit mode to add a description to this toy.

+ + +
+ +
+ +
3fr 1fr6fr 1fr !important; grid-gap: 20px;">
+ Usage:
+ + 1) echo("
    "); + + foreach ($lines as $line) { + if (count($lines) > 1) echo("
  • "); + + $parts = explode(":", $line); + + if (count($parts) > 1 && strlen($parts[0]) < 30) { + $p0 = $parts[0]; array_shift($parts); + echo(replaceKeyWords("" . $p0 . ":" . implode(":", $parts))); + } else { + echo(replaceKeyWords(implode(":", $parts))); + } + + if (count($lines) > 1) echo("
  • "); + } + + if (count($lines) > 1) echo("
"); + + ?> + +

No usage provided for this toy. Enter edit mode to add usage information to this toy.

+ +
+ + Instructions to obtain in real life:
+ + + +

This toy is obtainable in real life, but no instructions are provided.This toy is not obtainable in real life.

+ + +
+ +
+ " style="width: 100%; max-height: 100vh;"> +
+ +
+ + +
+ +

Similar toys

+
+ $action["id"], + "water" => $action["water"], + "ponies" => $action["ponies"], + "sexual" => $action["sexual"], + "description" => $action["description"] + ]; + } + + foreach ($names as $name => $data) { + $namesByDistance[] = [ + "name" => $name, + "distance" => levenshtein($currentName, $name), + "id" => $data["id"], + "description" => $data["description"], + "water" => $data["water"], + "ponies" => $data["ponies"], + "sexual" => $data["sexual"] + ]; + } + + uasort($namesByDistance, function ($a, $b) use ($selected) { + return $a["distance"] - $b["distance"]; + }); + + foreach ($namesByDistance as $item) { + echo(""); + } + + $index = 0; + foreach ($namesByDistance as $item): if ($index < 3): + ?> + + +
+ + +
+ + + +

Toys database

+ +

toys 0): ?> ( incomplete)

+ + + + + +
+ +
+
+

Not finding what you are looking for? Add a toy.

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