summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2025-12-11 00:04:34 +0500
committerilotterytea <iltsu@alright.party>2025-12-11 00:04:34 +0500
commit211c6949f9b90939020924a023d5ef75a8bea5b0 (patch)
treecfac40fdaa03c40012364aac7c56c3038b9599a1
parentd52f035dc0138375506c49c20a92fe566761af3a (diff)
upd: use alerts from php session
-rw-r--r--404.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/404.php b/404.php
index 7d49c8b..7d272d3 100644
--- a/404.php
+++ b/404.php
@@ -6,10 +6,15 @@ include_once "{$_SERVER['DOCUMENT_ROOT']}/lib/accounts.php";
authorize_user();
-$status = intval($_GET["error_status"] ?? "404");
+$alert = $_SESSION['alert'] ?? [
+ 'code' => '404',
+ 'reason' => 'Not found'
+];
+
+$status = intval($alert['code']);
http_response_code($status);
-$reason = str_safe($_GET["error_reason"] ?? "Not found", 200);
+$reason = str_safe($alert['reason'], 200);
?>
<html>