From dd499f3b42e760ed26b0be180274422ea3941158 Mon Sep 17 00:00:00 2001
From: Malf Furious <m@lfurio.us>
Date: Sun, 23 Sep 2018 22:26:57 -0400
Subject: admin:  Add empty admin panel

---
 app/index.php               |  9 +++++++++
 app/view/administration.php | 38 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 47 insertions(+)
 create mode 100644 app/view/administration.php

(limited to 'app')

diff --git a/app/index.php b/app/index.php
index 1b9b15a..13b6779 100644
--- a/app/index.php
+++ b/app/index.php
@@ -60,6 +60,15 @@ function main(array $argv) : void
                 location("/");
                 break;
 
+            case "admin":
+                /* check permissions */
+                if ($user->admin == 0)
+                    location("/");
+
+                setPageName("<i>Administration</i>");
+                require "view/administration.php";
+                break;
+
             case "deleteaccount":
                 setPageName("<i>Leaving Scrott</i>");
                 require "view/deleteaccount.php";
diff --git a/app/view/administration.php b/app/view/administration.php
new file mode 100644
index 0000000..0d2089e
--- /dev/null
+++ b/app/view/administration.php
@@ -0,0 +1,38 @@
+<?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( "Administration" )?>
+    </head>
+
+    <body>
+        <?=stdpage\top()?>
+        <?=stdpage\nav()?>
+
+        <div class="container">
+            <div class="jumbotron">
+                Welcome to the admin panel.  There is no content yet.
+            </div>
+        </div>
+
+        <?=stdpage\foot()?>
+    </body>
+</html>
-- 
cgit v1.2.3