This commit is contained in:
Bashy 2026-05-03 20:56:15 +03:00
commit 60ca58f5ba
80 changed files with 9458 additions and 0 deletions

24
views/error.php Normal file
View file

@ -0,0 +1,24 @@
<?php
$status = http_response_code() ?: 404;
$messages = [404 => 'Page not found', 403 => 'Forbidden', 500 => 'Server error'];
$msg = $messages[$status] ?? 'Something went wrong';
if (Auth::check()):
$page_title = $status;
$nav_active = '';
include ROOT . '/views/_header.php';
?>
<div class="text-center py-5">
<p class="display-3 fw-bold text-muted"><?= $status ?></p>
<p class="lead mb-4"><?= htmlspecialchars($msg) ?></p>
<a href="/" class="btn btn-primary">Go home</a>
</div>
<?php
include ROOT . '/views/_footer.php';
else:
?>
<!DOCTYPE html>
<html lang="en" data-bs-theme="dark">
<head><meta charset="UTF-8"><title><?= $status ?></title></head>
<body class="text-center pt-5"><?= $status ?> <?= htmlspecialchars($msg) ?></body>
</html>
<?php endif; ?>