diff options
-rw-r--r-- | examples/default.view.php | 51 | ||||
-rw-r--r-- | examples/obj.control.php | 49 | ||||
-rw-r--r-- | examples/root.control.php | 14 | ||||
-rw-r--r-- | examples/scrott.js | 22 | ||||
-rw-r--r-- | examples/topp.view.php | 83 |
5 files changed, 0 insertions, 219 deletions
diff --git a/examples/default.view.php b/examples/default.view.php deleted file mode 100644 index 852a37e..0000000 --- a/examples/default.view.php +++ /dev/null @@ -1,51 +0,0 @@ -<!-- - * SCROTT Copyright (C) 2016 Malf Furious - * - * Scrott is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published - * by the Free Software Foundation, either version 3 of the License, - * or (at your option) any later version. - * - * Scrott is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. ---> - -<!DOCTYPE html> - -<html lang="en"> - <head> - <?php include "view/common/head.view.php"; ?> - <title>Scrott - Delete user account</title> - </head> - - <body> - <?php include "view/common/topp.view.php"; ?> - - <div class="container"> - <div class="panel panel-danger"> - <div class="panel-heading">Warning: Deleting your user account!</div> - - <div class="panel-body text-center"> - <form method="post" action="<?=$mod->ap()?>"> - <input type="hidden" name="input[action]" value="delete" /> - <h1>Are you sure?!</h1> - <h4>Please confirm you want to delete your Scrott account. Type your current password in the box below and click the confirm button</h4> - - <div class="form-group"> - <label>Password</label> - <input type="password" name="input[password]" class="form-control" autofocus /> - </div> - - <button type="submit" class="btn btn-danger btn-lg"> - <span class="glyphicon glyphicon-trash"></span> Confirm Delete Account - </button> - </form> - </div> - </div> - </div> - - <?php include "view/common/foot.view.php"; ?> - </body> -</html> diff --git a/examples/obj.control.php b/examples/obj.control.php deleted file mode 100644 index 2154d16..0000000 --- a/examples/obj.control.php +++ /dev/null @@ -1,49 +0,0 @@ -<?php - -/* - * SCROTT Copyright (C) 2016 Malf Furious - * - * Scrott is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published - * by the Free Software Foundation, either version 3 of the License, - * or (at your option) any later version. - * - * Scrott is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - */ - -require_once "class/controller.class.php"; -require_once "model/obj.mod.php"; - -/* - * Object viewer, Used to view groups, pads, and more! - */ -class Obj extends Controller -{ - /* - * Controller implementation - */ - function handle($argv) - { - $mod = new ObjModel($argv[0]); - - if (!$mod->obj->canAccess($this->getCurrentUser())) - throw new Exception("You do not have permission to access this object"); - - switch ($mod->obj->type) - { - case "group": - $this->action_group($mod); - break; - } - } - - function action_group($mod) - { - include "view/obj/group.view.php"; - } -} - -?> diff --git a/examples/root.control.php b/examples/root.control.php deleted file mode 100644 index 614ab33..0000000 --- a/examples/root.control.php +++ /dev/null @@ -1,14 +0,0 @@ - case "deleteaccount": $ctrl = new Deleteacct(); break; - default: - /* Check if arg is an object guid */ - $obj = new DBObject(); - - if ($obj->isGUID($argv[0])) - { - $ctrl = new Obj(); - break; - } - - /* No page to show for requested path */ - throw new Exception("The requested path is not valid."); - break; diff --git a/examples/scrott.js b/examples/scrott.js deleted file mode 100644 index c376117..0000000 --- a/examples/scrott.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * SCROTT Copyright (C) 2016 Malf Furious - * - * Scrott is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published - * by the Free Software Foundation, either version 3 of the License, - * or (at your option) any later version. - * - * Scrott is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - */ - -/* - * Common Javascript logic for the Scrott application - */ - -function assertConfirm() -{ - return confirm("Are you sure?"); -} diff --git a/examples/topp.view.php b/examples/topp.view.php deleted file mode 100644 index d9e0df0..0000000 --- a/examples/topp.view.php +++ /dev/null @@ -1,83 +0,0 @@ -<?php - -/* - * SCROTT Copyright (C) 2016 Malf Furious - * - * Scrott is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published - * by the Free Software Foundation, either version 3 of the License, - * or (at your option) any later version. - * - * Scrott is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - */ - -?> - -<?php include "view/master/topp.view.php"; ?> - -<?php if ($mod->getCurrentUser()) { ?> - <?php include "view/common/setting.modal.view.php"; ?> - <?php include "view/common/newgroup.modal.view.php"; ?> -<?php } ?> - -<nav class="navbar navbar-inverse navbar-fixed-top"> - <div class="container-fluid"> - - <div class="navbar-header"> - <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#scrottnav" aria-expanded="false"> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - </button> - - <a href="<?=$mod->ar()?>/" class="navbar-brand"><span class="glyphicon glyphicon-pencil"></span> Scrott</a> - </div> - - <div class="collapse navbar-collapse" id="scrottnav"> - <?php if (!$mod->getCurrentUser()) { ?> - <p class="navbar-text navbar-right"><i>Not Logged In </i></p> - <?php } else { ?> - <ul class="nav navbar-nav"> - <li><a href="<?=$mod->ap()?>"><span class="glyphicon glyphicon-refresh"></span></a></li> - - <li class="dropdown"> - <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"> - <?=(isset($mod->obj) ? $mod->obj->name : "<i>Dashboard</i>")?> <span class="caret"></span> - </a> - - <ul class="dropdown-menu"> - <?php foreach ($mod->getCurrentUser()->getGroups() as $group) { ?> - <li><a href="<?=$mod->ar()?>/<?=$group->guid?>"><?=$group->name?></a></li> - <?php } ?> - </ul> - </li> - - <li class="dropdown"> - <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"> - <span class="glyphicon glyphicon-plus"></span> <span class="caret"></span> - </a> - <ul class="dropdown-menu"> - <li><a href="#" data-toggle="modal" data-target="#newgroupModal">New Group</a></li> - </ul> - </li> - </ul> - - <ul class="nav navbar-nav navbar-right"> - <li class="dropdown"> - <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"> - <span class="<?=$mod->getCurrentUser()->getGlyphicon()?>"></span> <?=$mod->getCurrentUser()->getDisplayName()?> <span class="caret"></span> - </a> - <ul class="dropdown-menu"> - <li><a href="#" data-toggle="modal" data-target="#settingModal">Settings</a></li> - <li><a href="<?=$mod->ar()?>/logout">Log out</a></li> - </ul> - </li> - </ul> - <?php } ?> - </div> - - </div> -</nav> |