diff options
| author | ilotterytea <iltsu@alright.party> | 2025-04-20 16:44:17 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-04-20 16:44:17 +0500 |
| commit | 4add65a71cbf5993ddc298511f46e701d2de091f (patch) | |
| tree | cb22ef7e84df8d5d11b46accad7271ad267fe679 | |
| parent | 5fc857449011f76ed7677aad40576790310d23e1 (diff) | |
feat: 404 page
| -rw-r--r-- | public/404.php | 27 | ||||
| -rw-r--r-- | public/emotes/index.php | 2 | ||||
| -rw-r--r-- | public/static/img/404/1.webp | bin | 0 -> 279856 bytes |
3 files changed, 28 insertions, 1 deletions
diff --git a/public/404.php b/public/404.php new file mode 100644 index 0000000..5646c46 --- /dev/null +++ b/public/404.php @@ -0,0 +1,27 @@ +<?php +http_response_code(404); +?> +<html> + +<head> + <title>Not found - alright.party</title> + <link rel="stylesheet" href="/static/style.css"> +</head> + +<body> + <div class="container"> + <div class="wrapper center"> + <section class="box center big-gap" style="display: flex;flex-direction:column; padding: 16px;"> + <h1 style="color: red;">404 Not Found</h1> + <img src="/static/img/404/<?php + $files = scandir("static/img/404"); + $count = count($files) - 2; + echo random_int(1, $count); + ?>.webp"> + <a href=" /">Back to home</a> + </section> + </div> + </div> +</body> + +</html>
\ No newline at end of file diff --git a/public/emotes/index.php b/public/emotes/index.php index b981a26..ea47834 100644 --- a/public/emotes/index.php +++ b/public/emotes/index.php @@ -50,7 +50,7 @@ function display_emote(int $id) } if ($emote == null) { - echo "not found"; + header("Location: /404.php"); exit; } diff --git a/public/static/img/404/1.webp b/public/static/img/404/1.webp Binary files differnew file mode 100644 index 0000000..7fc04a8 --- /dev/null +++ b/public/static/img/404/1.webp |
