From 23563c7188e089929b60f9e10721c6fc43a220ff Mon Sep 17 00:00:00 2001 From: RaindropsSys Date: Thu, 22 Jun 2023 23:06:12 +0200 Subject: Updated 15 files, added includes/maintenance/deleteUnusedAssets.php and deleted 4944 files (automated) --- pages/rules.inc | 289 -------------------------------------------------------- 1 file changed, 289 deletions(-) delete mode 100644 pages/rules.inc (limited to 'pages/rules.inc') diff --git a/pages/rules.inc b/pages/rules.inc deleted file mode 100644 index 0c57819..0000000 --- a/pages/rules.inc +++ /dev/null @@ -1,289 +0,0 @@ -= 1682985600) { - peh_error("Page not found: rules", 404); -} - -require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/functions.inc"; -require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/init.inc"; global $title; global $isLoggedIn; global $lang; global $pages; -require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/Parsedown.php"; $Parsedown = new Parsedown(); - -if (isset($_POST["updateRules"])) { - header("Content-Type: text/plain"); - - if (!isset($_POST['payload'])) { - header("Location: /-/rules"); - die(); - } - - foreach ($_POST['payload'] as $index => $rule) { - if (!isset($rule["name"]) || !isset($rule["content"]) && !is_numeric($index)) { - header("Location: /-/rules"); - die(); - } - - if (trim($rule["name"]) === "") { - unset($_POST["payload"][$index]); - continue; - } - - if (!isset($rule["approved"])) $rule["approved"] = []; - if (isset($rule["approved"][0])) $rule["approved"][0] = true; else $rule["approved"][0] = false; - if (isset($rule["approved"][1])) $rule["approved"][1] = true; else $rule["approved"][1] = false; - - $_POST["payload"][$index] = $rule; - } - - file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/rules/rules.json", json_encode($_POST["payload"])); - file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/cache/rules.json", "{}"); - createJob("RefreshCache", []); - - header("Location: /-/rules"); - die(); -} - -require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/components/header.inc'; -if (!file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/cache/rules.json")) file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/cache/rules.json", "{}"); -$cache = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/cache/rules.json"), true); - -?> - -
-
-
-

Rules

-

Edit rules

- -
- The rules system will be removed on May 2nd 2023 at midnight UTC. This page will not be accessible anymore. If there is any data you want to keep, ask Raindrops System for a copy of the rules database. -
- - - - $rule): $index++; ?> -

- Rule : ", ">", $rule["name"])) ?> - - Unapproved - -

- -
- This rule has not yet been approved. All rules need to be approved by the leaders from both systems. This rule is still missing approval from $item) { - echo($item); - if ($index < count($list) - 2) { - echo(", "); - } else if ($index < count($list) - 1) { - echo(" and "); - } - } - - ?>. -
- -
-

text(str_replace("<", "<", str_replace(">", ">", $rule["content"]))) ?>

-
- - -
-
- - - - - - - - - - -- cgit