From 209356b8ade1920b50d1d3a1a5e121c6623d167b Mon Sep 17 00:00:00 2001 From: Minteck Date: Fri, 11 Nov 2022 23:47:49 +0100 Subject: Update --- pages/rules-old.inc | 253 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 253 insertions(+) create mode 100644 pages/rules-old.inc (limited to 'pages/rules-old.inc') diff --git a/pages/rules-old.inc b/pages/rules-old.inc new file mode 100644 index 0000000..21ae7e6 --- /dev/null +++ b/pages/rules-old.inc @@ -0,0 +1,253 @@ + $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", utf8_encode(json_encode($_POST["payload"]))); + + header("Location: /-/rules"); + die(); +} + +require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.inc'; + +?> + +
+
+
+

Systems rules

+

Click on a rule to view additional details. Edit rules

+ + + +
    + +
  • +
    + + . + + 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 . +
    + +
    class="list-group-item"> + +
    +
    +
  • + +
+
+
+ + + + + + + + -- cgit