diff options
| author | George Halkiadakis <gchalkiadakis@sklavenitis.co.gr> | 2023-04-27 01:55:12 +0300 |
|---|---|---|
| committer | George Halkiadakis <gchalkiadakis@sklavenitis.co.gr> | 2023-04-27 01:55:12 +0300 |
| commit | 6e749800d8a9f6b77bf50be92a70b7916c2804f3 (patch) | |
| tree | 3d6ba2eb67fa11f228b756e0f84ef8ecb3f6ff34 /public/app/views/error | |
| parent | 546daa78721e6abdbc89afcecc158118c2239865 (diff) | |
| download | classroom-6e749800d8a9f6b77bf50be92a70b7916c2804f3.tar.gz classroom-6e749800d8a9f6b77bf50be92a70b7916c2804f3.tar.bz2 classroom-6e749800d8a9f6b77bf50be92a70b7916c2804f3.zip | |
hotfixes and optimizations
Diffstat (limited to 'public/app/views/error')
| -rw-r--r-- | public/app/views/error/404.php | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/public/app/views/error/404.php b/public/app/views/error/404.php index 4bbf083..a085830 100644 --- a/public/app/views/error/404.php +++ b/public/app/views/error/404.php @@ -1,3 +1,23 @@ +<?php +/** general error page + * + * defaults to 404 error but can be used for any other error code + * + * imported variables: + * + * optional @var $error_code (int) : error code + * optional @var $moto (string) : super-mini description text + * optional @var $message (string) + * + */ + + if (!isset($error_code)) { // if error code not set + $error_code = 404; // set default (404) + } + + http_response_code(403); + +?> <!DOCTYPE html> <html lang="en"> <head> @@ -32,8 +52,8 @@ <body> <div class='container'> <div class='content'> - <h3>4O4</h3> - Not found<br /> + <h3><?=$error_code?></h3> + <?= $moto ?? 'Not found' ?><br /> <!-- — <br /> |
