From 211c6949f9b90939020924a023d5ef75a8bea5b0 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Thu, 11 Dec 2025 00:04:34 +0500 Subject: upd: use alerts from php session --- 404.php | 9 +++++++-- 1 file 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); ?> -- cgit v1.2.3