diff options
author | Malf Furious <m@lfurio.us> | 2018-09-23 22:26:57 -0400 |
---|---|---|
committer | Malf Furious <m@lfurio.us> | 2018-09-23 22:26:57 -0400 |
commit | dd499f3b42e760ed26b0be180274422ea3941158 (patch) | |
tree | fafde13308204e1edf3e55fcd45f05580b4aa78e /app | |
parent | fd58becfca433f125df70531f9bece88c8f14b71 (diff) | |
download | scrott-dd499f3b42e760ed26b0be180274422ea3941158.tar.gz scrott-dd499f3b42e760ed26b0be180274422ea3941158.zip |
admin: Add empty admin panel
Diffstat (limited to 'app')
-rw-r--r-- | app/index.php | 9 | ||||
-rw-r--r-- | app/view/administration.php | 38 |
2 files changed, 47 insertions, 0 deletions
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> |