diff options
| -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> | 
