From d1a804db47fe0437278c1a55e395971026b8c7f9 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Wed, 23 Apr 2025 01:19:10 +0500 Subject: feat: report system --- public/report/index.php | 112 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 public/report/index.php (limited to 'public/report/index.php') diff --git a/public/report/index.php b/public/report/index.php new file mode 100644 index 0000000..e040123 --- /dev/null +++ b/public/report/index.php @@ -0,0 +1,112 @@ +prepare("SELECT * FROM reports WHERE id = ? AND sender_id = ?"); + $stmt->execute([$report_id, $_SESSION["user_id"]]); + + if ($row = $stmt->fetch(PDO::FETCH_ASSOC)) { + $report = $row; + + if (CLIENT_REQUIRES_JSON) { + json_response([ + "status_code" => 201, + "message" => null, + "data" => $report + ], 201); + exit; + } + } else { + generate_alert("/report", "Report ID #" . $_GET["id"] . " not found or not accessable"); + exit; + } +} + +$contents = ""; + +if ($contents == "") { + if (isset($_GET["user_id"])) { + $contents = "Hi! I want to report user ID #" . $_GET["user_id"] . " because..."; + } else if (isset($_GET["emote_id"])) { + $contents = "Hi! I want to report emote ID #" . $_GET["emote_id"] . " because..."; + } +} +?> + + + + + <?php echo $report == null ? "Send a message to MODS" : "A message to MODS" ?> - alright.party + + + + +
+
+ + +
+ +
+ + +
+
+ + +
+
+
+ +
+
+
+

Reported ago

+

Status: + Unresolved" : "Resolved" ?> +

+
+ +
+ +
+ +
+
+ + +
+ +
+
+ + + \ No newline at end of file -- cgit v1.2.3