From e95b208af90cc386a7d8d1bcab426727cf4f0121 Mon Sep 17 00:00:00 2001 From: Minteck Date: Wed, 21 Sep 2022 22:42:33 +0200 Subject: Update time --- pages/actions.php | 6 +- pages/alphabet.php | 38 ++++++ pages/api.php | 4 +- pages/bitset.php | 50 ++++--- pages/byfront.php | 160 ++++++++++++++++++++++ pages/dashboard.php | 66 ++++++--- pages/debug.php | 7 +- pages/demo.php | 3 +- pages/disclaimers.php | 7 +- pages/docs.php | 361 +++++++++++++++++++++++++++++++++++++++++++++++++ pages/edit-private.php | 68 ++++++++++ pages/edit.php | 3 +- pages/emergency.php | 7 +- pages/fronting.php | 7 +- pages/home.php | 2 +- pages/login.php | 3 +- pages/nicknames.php | 6 +- pages/page.php | 2 +- pages/parser.php | 14 +- pages/pleasure.php | 7 +- pages/prefix.php | 7 +- pages/relations.php | 87 +++++++----- pages/rules.php | 7 +- pages/score.php | 22 ++- pages/splitting.php | 6 +- pages/terminology.php | 7 +- pages/together.php | 6 +- pages/toys.php | 30 ++-- pages/travelling.php | 9 +- pages/wakeup.php | 15 ++ 30 files changed, 870 insertions(+), 147 deletions(-) create mode 100644 pages/alphabet.php create mode 100644 pages/byfront.php create mode 100644 pages/docs.php create mode 100644 pages/edit-private.php create mode 100644 pages/wakeup.php (limited to 'pages') diff --git a/pages/actions.php b/pages/actions.php index 1fa998a..939ed7e 100644 --- a/pages/actions.php +++ b/pages/actions.php @@ -1,7 +1,6 @@ + +
+
+ +
+ + diff --git a/pages/api.php b/pages/api.php index a1f13d9..1d83985 100644 --- a/pages/api.php +++ b/pages/api.php @@ -11,5 +11,7 @@ $toplevel = explode("/", $pagename)[1]; if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/api/" . $toplevel . ".php")) { require_once $_SERVER['DOCUMENT_ROOT'] . "/api/" . $toplevel . ".php"; } else { - header("Location: /?error=Endpoint not found: " . strip_tags($toplevel)) and die(); + header("HTTP/1.1 500 Internal Server Error"); + echo("Endpoint not found"); + die(); } \ No newline at end of file diff --git a/pages/bitset.php b/pages/bitset.php index 8c63bc5..0d2d10e 100644 --- a/pages/bitset.php +++ b/pages/bitset.php @@ -1,9 +1,7 @@ @@ -25,8 +23,8 @@ $title = "Bitset calculator"; require_once $_SERVER['DOCUMENT_ROOT'] . '/include
0
0
0
-
0
-
0
+
0
+
0
0
0
0
@@ -40,12 +38,12 @@ $title = "Bitset calculator"; require_once $_SERVER['DOCUMENT_ROOT'] . '/include
0
0
0
-
0
-
0
+
0
+
0
0
0
0
-
0
+
0
0
0
0
@@ -64,7 +62,7 @@ $title = "Bitset calculator"; require_once $_SERVER['DOCUMENT_ROOT'] . '/include

- Input:
+ Input:
Output: 0b000000000000000000000000000000000000100000000000, 0x000008000000, 2048

-
+
-
+
" data-bs-toggle="tooltip">
-
Actions
+
-
+
" data-bs-toggle="tooltip">
-
Rules
+
-
+
" data-bs-toggle="tooltip"> + +
+
+
+
+
+
+
" data-bs-toggle="tooltip">
-
Nicknames
+
-
+
" data-bs-toggle="tooltip">
-
Watch Together
+
-
+
" data-bs-toggle="tooltip">
-
Splits
+
-
+
" data-bs-toggle="tooltip"> + +
+
+
+
+
+
+
" data-bs-toggle="tooltip">
-
Bitset
+
-
+
" data-bs-toggle="tooltip">
-
Toys
+
@@ -167,9 +181,13 @@ $viewingPonyHasSex = in_array($fronter, $poniesHavingSex) || isset($_GET['toys']
Fronters today
    - $id): $member = getSystemMember($_PROFILE["login"] === "raindrops" ? "gdapd" : "ynmuc", $id); ?> + $id): $member = getMemberWithoutSystem($id); ?>
  • + + Merged members + .png" style="width:24px; height: 24px; vertical-align: middle;"> + with .png" style="width:24px; height: 24px; vertical-align: middle;">
  • @@ -179,7 +197,11 @@ $viewingPonyHasSex = in_array($fronter, $poniesHavingSex) || isset($_GET['toys']
      $id): $member = getSystemMember($_PROFILE["login"] === "raindrops" ? "gdapd" : "ynmuc", $id); ?>
    • + + Merged members + .png" style="width:24px; height: 24px; vertical-align: middle;"> + with .png" style="width:24px; height: 24px; vertical-align: middle;">
    • @@ -252,7 +274,7 @@ $viewingPonyHasSex = in_array($fronter, $poniesHavingSex) || isset($_GET['toys'] + +
+

Documents

+
+ substr($i, 0, -5), + ...(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/docs/" . $i), true) ?? []) + ]; + }, array_filter(scandir($_SERVER['DOCUMENT_ROOT'] . "/includes/data/docs"), function ($i) { + return !str_starts_with($i, ".") && str_ends_with($i, ".json"); + })); + + $deletable = array_values(array_filter($documents, function ($i) { + return strip_tags($i["contents"]) === "/delete"; + })); + $unsorted_pre = array_values(array_filter($documents, function ($i) { + return strip_tags($i["contents"]) !== "/delete"; + })); + + $unsorted = []; + $categories = []; + foreach ($unsorted_pre as $item) { + if (isset($item["category"])) { + $existing_categories = array_keys($categories); + $matched_category = null; + + foreach ($existing_categories as $existing_category) { + if (levenshtein($item["category"], $existing_category) < 3) { + $matched_category = $existing_category; + } + } + + $selected_category = $matched_category ?? $item["category"]; + if (!isset($categories[$selected_category])) $categories[$selected_category] = []; + $categories[$selected_category][] = $item; + } else { + $unsorted[] = $item; + } + } + + uasort($unsorted, function ($a, $b) { + return $b["last"]["date"] - $a["last"]["date"]; + }); + + uasort($deletable, function ($a, $b) { + return $b["last"]["date"] - $a["last"]["date"]; + }); + + ?> + + $items): ?> +

+
+ + +

Unsorted

+ +
+

Marked for deletion

+
+ +
+ + +
+
+ + + + + diff --git a/pages/edit-private.php b/pages/edit-private.php new file mode 100644 index 0000000..ac93e06 --- /dev/null +++ b/pages/edit-private.php @@ -0,0 +1,68 @@ + diff --git a/pages/fronting.php b/pages/fronting.php index 261cf03..3e613c6 100644 --- a/pages/fronting.php +++ b/pages/fronting.php @@ -1,4 +1,9 @@ - +
diff --git a/pages/home.php b/pages/home.php index 340df44..a2fe0c3 100644 --- a/pages/home.php +++ b/pages/home.php @@ -1,4 +1,4 @@ - +
diff --git a/pages/login.php b/pages/login.php index 8611f5f..ebae1ae 100644 --- a/pages/login.php +++ b/pages/login.php @@ -1,6 +1,7 @@ diff --git a/pages/nicknames.php b/pages/nicknames.php index 050c275..4c06818 100644 --- a/pages/nicknames.php +++ b/pages/nicknames.php @@ -1,9 +1,7 @@ +
@@ -57,7 +62,7 @@
- The entered message does not contain a prefix/suffix corresponding to a member of the selected system(s); therefore, the host was selected as a fallback. We assume that the host is talking when there is no prefix/suffix in the current message. + The entered message does not contain a prefix/suffix corresponding to a member of the selected system(s); therefore, the most common fronter was selected as a fallback. While the most common fronter is supposed to use their prefix too, we assume they are talking when there is no prefix/suffix in the current message.