From 07c3bb3169bbc41ab9dc8aca312cb4f36581ccd4 Mon Sep 17 00:00:00 2001 From: Malf Furious Date: Sat, 27 Oct 2018 01:22:15 -0400 Subject: Add 404 Page not found view Previously, when the app was asked for non-existant paths, no content was returned and a blank page was presented to the user. Now a canned message stating that the requested page does not exist is shown, along with a helpful link back to the Dashboard page. Signed-off-by: Malf Furious --- app/index.php | 6 ++++++ app/view/404.php | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 app/view/404.php diff --git a/app/index.php b/app/index.php index 44c2de9..21f3036 100644 --- a/app/index.php +++ b/app/index.php @@ -115,6 +115,12 @@ function main(array $argv) : void break; } } + + /* page not found */ + else + { + require "view/404.php"; + } } } diff --git a/app/view/404.php b/app/view/404.php new file mode 100644 index 0000000..95f4835 --- /dev/null +++ b/app/view/404.php @@ -0,0 +1,41 @@ + + + + + + + + + + + + +
+
+

Page not found

+ + + Go to Scrott Dashboard + +
+
+ + + + -- cgit v1.2.3