@@ -41,8 +49,7 @@ $body = <<
`;
- $("#message-container").html(parseHtml(html, 1000, jsonData, "No logged chats"));
+ $("#message-container").html(parseHtml(html, 1000, jsonData, "No logged chats"));
});
}
-function closeReport()
-{
- alert("will close");
+function closeReport() {
+ getJSONCDS("https://www.alphaland.cc/MCP/reports/data/close?id="+getparam)
+ .done(function(jsonData) {
+ var alert = jsonData.alert;
+ if(jsonData.alert == "Closed Report") {
+ window.location.href = "/MCP/reports/";
+ } else {
+ $("#error_alert").text(alert);
+ $("#error_alert").show();
+ window.scrollTo({top: 0, behavior: "smooth"});
+ setTimeout(function() {
+ $("#error_alert").hide();
+ }, 2000);
+ }
+ });
}
populateReport();
diff --git a/html_api/moderation/AbuseReport/InGameChatHandler.php b/html_api/moderation/AbuseReport/InGameChatHandler.php
index c6e0f89..93b555f 100644
--- a/html_api/moderation/AbuseReport/InGameChatHandler.php
+++ b/html_api/moderation/AbuseReport/InGameChatHandler.php
@@ -1,3 +1,23 @@
prepare("INSERT INTO `user_reports`(`report`, `whenReported`) VALUES(:report, UNIX_TIMESTAMP())");
+ $report->bindParam(":report", $xml, PDO::PARAM_STR);
+ $report->execute();
+}
\ No newline at end of file