summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMalf Furious <m@lfurio.us>2018-10-27 01:33:30 -0400
committerMalf Furious <m@lfurio.us>2018-10-27 01:33:30 -0400
commite43272a592c06719ad0d84f9dd5e5790e1331a96 (patch)
treec7a167a0d0b1fec6fb175c6b0705e019bf52475e
parentb9783160efe6ab1d6084113fa5c0fa982404be53 (diff)
parent07c3bb3169bbc41ab9dc8aca312cb4f36581ccd4 (diff)
downloadscrott-e43272a592c06719ad0d84f9dd5e5790e1331a96.tar.gz
scrott-e43272a592c06719ad0d84f9dd5e5790e1331a96.zip
Merge branch 'feature/404-page' into dev
Signed-off-by: Malf Furious <m@lfurio.us>
-rw-r--r--app/index.php6
-rw-r--r--app/view/404.php41
2 files changed, 47 insertions, 0 deletions
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 @@
+<?php
+
+/*
+ * SCROTT IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For more information, please refer to UNLICENSE
+ */
+
+require_once "view/stdpage.php";
+
+?>
+
+<!DOCTYPE html>
+
+<html lang="en">
+ <head>
+ <?=stdpage\head( "Page not found" )?>
+ </head>
+
+ <body>
+ <?=stdpage\top()?>
+
+ <div class="container">
+ <div class="jumbotron text-center">
+ <h1>Page not found</h1>
+
+ <a href="<?=ar()?>/" class="btn btn-primary btn-lg">
+ <span class="glyphicon glyphicon-pencil"></span> Go to Scrott Dashboard
+ </a>
+ </div>
+ </div>
+
+ <?=stdpage\foot()?>
+ </body>
+</html>