diff options
| author | ilotterytea <iltsu@alright.party> | 2025-12-11 00:04:34 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-12-11 00:04:34 +0500 |
| commit | 211c6949f9b90939020924a023d5ef75a8bea5b0 (patch) | |
| tree | cfac40fdaa03c40012364aac7c56c3038b9599a1 | |
| parent | d52f035dc0138375506c49c20a92fe566761af3a (diff) | |
upd: use alerts from php session
| -rw-r--r-- | 404.php | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -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> |
