summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorMalf Furious <m@lfurio.us>2018-02-08 00:33:43 -0500
committerMalf Furious <m@lfurio.us>2018-02-08 00:33:43 -0500
commit7e136fa30f3e1f5d47acf2e825e527e7d7123238 (patch)
treedc318d04bbc1bd1709c0670c0c2da3469d92a7c7 /examples
parent0dd76669c58d1ae62d761d8f7c815b464963ca4a (diff)
downloadscrott-7e136fa30f3e1f5d47acf2e825e527e7d7123238.tar.gz
scrott-7e136fa30f3e1f5d47acf2e825e527e7d7123238.zip
Remove old content
Diffstat (limited to 'examples')
-rw-r--r--examples/controller/auth.control.php67
-rw-r--r--examples/controller/dashboard.control.php41
-rw-r--r--examples/controller/deauth.control.php40
-rw-r--r--examples/controller/deleteacct.control.php58
-rw-r--r--examples/controller/except.control.php41
-rw-r--r--examples/controller/sysconf.control.php57
-rw-r--r--examples/form.class.php243
-rw-r--r--examples/index.php30
-rw-r--r--examples/model/sysconf.mod.php93
-rw-r--r--examples/view/auth/default.view.php127
-rw-r--r--examples/view/common/foot.view.php19
-rw-r--r--examples/view/common/head.view.php26
-rw-r--r--examples/view/sysconf/default.view.php138
-rw-r--r--examples/view/sysconf/group.modal.view.php49
-rw-r--r--examples/view/sysconf/issue.modal.view.php52
-rw-r--r--examples/view/sysconf/message.modal.view.php55
-rw-r--r--examples/view/sysconf/pad.modal.view.php68
-rw-r--r--examples/view/sysconf/stage.modal.view.php52
-rw-r--r--examples/view/sysconf/user.modal.view.php48
19 files changed, 0 insertions, 1304 deletions
diff --git a/examples/controller/auth.control.php b/examples/controller/auth.control.php
deleted file mode 100644
index 5be1e4b..0000000
--- a/examples/controller/auth.control.php
+++ /dev/null
@@ -1,67 +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/auth.mod.php";
-
-/*
- * Auth is used to login or register new user accounts
- */
-class Auth extends Controller
-{
- /*
- * Controller implementation
- */
- function handle($argv)
- {
- $mod = new AuthModel();
-
- switch ($_REQUEST['input']['action'])
- {
- case "signup":
- $this->action_signup($mod);
- break;
-
- case "login":
- $this->action_login($mod);
- break;
-
- default:
- $this->action_default($mod);
- break;
- }
- }
-
- function action_default($mod)
- {
- $mod->deflt();
- include "view/auth/default.view.php";
- }
-
- function action_signup($mod)
- {
- $mod->signup($_REQUEST['input']);
- $this->action_default($mod);
- }
-
- function action_login($mod)
- {
- $mod->login($_REQUEST['input']);
- $this->action_default($mod);
- }
-}
-
-?>
diff --git a/examples/controller/dashboard.control.php b/examples/controller/dashboard.control.php
deleted file mode 100644
index 40d3678..0000000
--- a/examples/controller/dashboard.control.php
+++ /dev/null
@@ -1,41 +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/dashboard.mod.php";
-
-/*
- * Main page, Dashboard -- Overview information for user, groups, and pads
- */
-class Dashboard extends Controller
-{
- /*
- * Controller implementation
- */
- function handle($argv)
- {
- $mod = new DashboardModel();
- $this->action_default($mod);
- }
-
- function action_default($mod)
- {
- $mod->deflt();
- include "view/dashboard/default.view.php";
- }
-}
-
-?>
diff --git a/examples/controller/deauth.control.php b/examples/controller/deauth.control.php
deleted file mode 100644
index 5867168..0000000
--- a/examples/controller/deauth.control.php
+++ /dev/null
@@ -1,40 +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/deauth.mod.php";
-
-/*
- * Deauth is used to terminate the current session (logout)
- */
-class Deauth extends Controller
-{
- /*
- * Controller implementation
- */
- function handle($argv)
- {
- $mod = new DeauthModel();
- $this->action_default($mod);
- }
-
- function action_default($mod)
- {
- $mod->deflt();
- }
-}
-
-?>
diff --git a/examples/controller/deleteacct.control.php b/examples/controller/deleteacct.control.php
deleted file mode 100644
index 5dc91b5..0000000
--- a/examples/controller/deleteacct.control.php
+++ /dev/null
@@ -1,58 +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/deleteacct.mod.php";
-
-/*
- * Deleteacct is used to delete user accounts, requiring all requests to
- * correctly enter the user's password
- */
-class Deleteacct extends Controller
-{
- /*
- * Controller implementation
- */
- function handle($argv)
- {
- $mod = new DeleteacctModel();
-
- switch ($_REQUEST['input']['action'])
- {
- case "delete":
- $this->action_delete($mod);
- break;
-
- default:
- $this->action_default($mod);
- break;
- }
- }
-
- function action_default($mod)
- {
- $mod->deflt();
- include "view/deleteacct/default.view.php";
- }
-
- function action_delete($mod)
- {
- $mod->del($_REQUEST['input']);
- $this->action_default($mod);
- }
-}
-
-?>
diff --git a/examples/controller/except.control.php b/examples/controller/except.control.php
deleted file mode 100644
index 8b5e1b5..0000000
--- a/examples/controller/except.control.php
+++ /dev/null
@@ -1,41 +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/except.mod.php";
-
-/*
- * Display application Exceptions
- */
-class Except extends Controller
-{
- /*
- * Controller implementation
- */
- function handle($message)
- {
- $mod = new ExceptModel();
- $this->action_default($mod, $message);
- }
-
- function action_default($mod, $message)
- {
- $mod->deflt($message);
- include "view/except/default.view.php";
- }
-}
-
-?>
diff --git a/examples/controller/sysconf.control.php b/examples/controller/sysconf.control.php
deleted file mode 100644
index 6379d42..0000000
--- a/examples/controller/sysconf.control.php
+++ /dev/null
@@ -1,57 +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/sysconf.mod.php";
-
-/*
- * SysConf is the interface for creating an install's "scrott.conf.php" file if it doesn't exist
- */
-class Sysconf extends Controller
-{
- /*
- * Controller implementation
- */
- function handle($argv)
- {
- $mod = new SysconfModel();
-
- switch ($_REQUEST['input']['action'])
- {
- case "save":
- $this->action_save($mod);
- break;
-
- default:
- $this->action_default($mod);
- break;
- }
- }
-
- function action_default($mod)
- {
- $mod->deflt();
- include "view/sysconf/default.view.php";
- }
-
- function action_save($mod)
- {
- $mod->save($_REQUEST['input']);
- $this->action_default($mod);
- }
-}
-
-?>
diff --git a/examples/form.class.php b/examples/form.class.php
deleted file mode 100644
index 8bb6506..0000000
--- a/examples/form.class.php
+++ /dev/null
@@ -1,243 +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.
- */
-
-/*
- * Model web-forms and simplify the process of accepting, validating, and sanitizing input
- */
-class Form
-{
- /*
- * Constructor
- */
- function __construct()
- {
- $this->textFields = array();
- $this->numbFields = array();
- $this->enumFields = array();
-
- $this->errorlist = array();
- }
-
- /*
- * Log an error
- */
- function logError($str)
- {
- $this->errorlist[] = $str;
- }
-
- /*
- * Add new text field to the form
- */
- function field_text($name, $deflt = null, $req = true)
- {
- if ($req !== true)
- $req = false;
-
- $this->textFields[] = array(
- 'name' => $name,
- 'deflt' => $deflt,
- 'req' => $req
- );
- }
-
- /*
- * Add new numeric field to the form
- */
- function field_numeric($name, $min = null, $max = null, $deflt = null, $integer = true, $req = true)
- {
- if ($req !== true)
- $req = false;
-
- if ($integer !== true)
- $integer = false;
-
- $this->numbFields[] = array(
- 'name' => $name,
- 'min' => $min,
- 'max' => $max,
- 'deflt' => $deflt,
- 'int' => $integer,
- 'req' => $req
- );
- }
-
- /*
- * Add new enumeration field to the form
- */
- function field_enum($name, $values, $deflt = null, $req = true)
- {
- if ($req !== true)
- $req = false;
-
- $this->enumFields[] = array(
- 'name' => $name,
- 'vals' => $values,
- 'deflt' => $deflt,
- 'req' => $req
- );
- }
-
- /*
- * Add new boolean field to the form
- */
- function field_bool($name)
- {
- $this->field_enum($name, array("1", "0"), "0");
- }
-
- /*
- * Populate the form with input data from web page
- */
- function populate($input)
- {
- /* detect duplicate names */
- $names = array();
- foreach ($this->textFields as $fld)
- $names[] = $fld['name'];
- foreach ($this->numbFields as $fld)
- $names[] = $fld['name'];
- foreach ($this->enumFields as $fld)
- $names[] = $fld['name'];
-
- if (count(array_unique($names)) != count($names))
- {
- $this->logError("Internal error: Duplicate field names defined in form");
- return false;
- }
-
- /* init text fields */
- foreach ($this->textFields as $fld)
- {
- if (isset($input[$fld['name']]) && $input[$fld['name']] != "")
- $this->{$fld['name']} = htmlEntities($input[$fld['name']], ENT_QUOTES);
-
- else if (!is_null($fld['deflt']))
- $this->{$fld['name']} = $fld['deflt'];
-
- else if ($fld['req'])
- $this->logError($fld['name'] . " is required");
- }
-
- /* init numeric fields */
- foreach ($this->numbFields as $fld)
- {
- if (isset($input[$fld['name']]) && $input[$fld['name']] != "")
- {
- if (!is_numeric($input[$fld['name']]))
- {
- $this->logError($fld['name'] . " must be numeric");
- continue;
- }
-
- if ($fld['int'] && (floor($input[$fld['name']]) != $input[$fld['name']]))
- {
- $this->logError($fld['name'] . " must be an integer");
- continue;
- }
-
- if (!is_null($fld['min']) && ($input[$fld['name']] < $fld['min']))
- {
- $this->logError($fld['name'] . " must be no less than " . $fld['min']);
- continue;
- }
-
- if (!is_null($fld['max']) && ($input[$fld['name']] > $fld['max']))
- {
- $this->logError($fld['name'] . " must be no more than " . $fld['max']);
- continue;
- }
-
- $this->{$fld['name']} = $input[$fld['name']];
- }
-
- else if (!is_null($fld['deflt']))
- $this->{$fld['name']} = $fld['deflt'];
-
- else if ($fld['req'])
- $this->logError($fld['name'] . " is required");
- }
-
- /* init enum fields */
- foreach ($this->enumFields as $fld)
- {
- if (isset($input[$fld['name']]) && $input[$fld['name']] != "")
- {
- if (array_search($input[$fld['name']], $fld['vals']) === false)
- {
- $this->logError($fld['name'] . " is not an appropriate value");
- continue;
- }
-
- $this->{$fld['name']} = $input[$fld['name']];
- }
-
- else if (!is_null($fld['deflt']))
- $this->{$fld['name']} = $fld['deflt'];
-
- else if ($fld['req'])
- $this->logError($fld['name'] . " is required");
- }
-
- /* return */
- return count($this->errorlist) == 0;
- }
-
- /*
- * Handle an uploaded file
- */
- function saveFile($file, $maxsize, $allowed_mime, $path, $req = false)
- {
- if (isset($file) && !is_null($file))
- {
- if ($file['error'] > 0)
- {
- if ($file['error'] != UPLOAD_ERR_NO_FILE)
- $this->logError("An unknown error occurred");
-
- return false;
- }
-
- if ($file['size'] > $maxsize)
- {
- $this->logError("File must be no larger than " . $maxsize . " bytes");
- return false;
- }
-
- if (is_array($allowed_mime) && array_search($file['type'], $allowed_mime) === false)
- {
- $this->logError("File type is not supported");
- return false;
- }
-
- if (!move_uploaded_file($file['tmp_name'], $path))
- {
- $this->logError("Error saving uploaded file");
- return false;
- }
- }
-
- else if ($req)
- {
- $this->logError("File upload is required");
- return false;
- }
-
- return true;
- }
-}
-
-?>
diff --git a/examples/index.php b/examples/index.php
deleted file mode 100644
index 692756c..0000000
--- a/examples/index.php
+++ /dev/null
@@ -1,30 +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 "controller/root.control.php";
-
-/*
- * Entry-point to app. Grab the requested path and pass it to the root app controller.
- */
-function main($argv)
-{
- $app = new Root();
- $app->handle($argv);
-}
-
-main(explode("/", $_REQUEST['path'])); // Start rendering web page for the requested path.
-
-?>
diff --git a/examples/model/sysconf.mod.php b/examples/model/sysconf.mod.php
deleted file mode 100644
index cfbed42..0000000
--- a/examples/model/sysconf.mod.php
+++ /dev/null
@@ -1,93 +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 "model/master.mod.php";
-require_once "class/form.class.php";
-
-class SysconfModel extends MasterModel
-{
- var $CONF_FILE = "scrott.conf.php";
-
- /*
- * Default action
- */
- function deflt()
- {
- }
-
- /*
- * Save the submitted data to the config file
- */
- function save($input)
- {
- global $_SCROTT;
-
- $form = new Form();
- $form->field_text("dbAddress");
- $form->field_text("dbName");
- $form->field_text("dbUser");
- $form->field_text("dbPass", null, false);
- $form->field_enum("settSSL", array("force", "neither", "forbid"));
-
- if (!$form->populate($input))
- {
- $this->logFormErrors($form);
- return;
- }
-
- /* test database connection (set global vars and try to get a db object) */
- $_SCROTT['conf'] = 'conf';
- $_SCROTT['dbEngine'] = 'mysql';
- $_SCROTT['dbAddress'] = $form->dbAddress;
- $_SCROTT['dbName'] = $form->dbName;
- $_SCROTT['dbUser'] = $form->dbUser;
- $_SCROTT['dbPass'] = $form->dbPass;
-
- try
- {
- $db = $this->getDbConnection();
- }
- catch (Exception $e)
- {
- $this->logError($e->getMessage());
- return;
- }
-
- /* write file */
- $f = fopen($this->CONF_FILE, "w");
-
- if (!$f)
- {
- $this->logError("Can not create configuration file");
- return;
- }
-
- fwrite($f, "<?php\n");
- fwrite($f, "\$_SCROTT['conf'] = 'conf';\n");
- fwrite($f, "\$_SCROTT['dbEngine'] = 'mysql';\n");
- fwrite($f, "\$_SCROTT['dbAddress'] = '" . $form->dbAddress . "';\n");
- fwrite($f, "\$_SCROTT['dbName'] = '" . $form->dbName . "';\n");
- fwrite($f, "\$_SCROTT['dbUser'] = '" . $form->dbUser . "';\n");
- fwrite($f, "\$_SCROTT['dbPass'] = '" . $form->dbPass . "';\n");
- fwrite($f, "\$_SCROTT['settSSL'] = '" . $form->settSSL . "';\n");
- fwrite($f, "?>\n");
-
- fclose($f);
- $this->redirectTo($this->ar() . "/");
- }
-}
-
-?>
diff --git a/examples/view/auth/default.view.php b/examples/view/auth/default.view.php
deleted file mode 100644
index 9d4c9b4..0000000
--- a/examples/view/auth/default.view.php
+++ /dev/null
@@ -1,127 +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 - Not logged in</title>
- </head>
-
- <body>
- <?php include "view/common/topp.view.php"; ?>
-
- <div class="container">
- <?php if (isset($mod->noaccounts)) { ?>
- <div class="jumbotron">
- <h1>Almost there....</h1>
- <p class="text-center">Scrott's configuration is working, but no user accounts exist.<br />Use the form below to signup as an admin.</p>
- <h5 class="text-center">It is presumed that you are the administrator for this Scrott install.<br />There is a security risk involved with exposing this page to the public!</h5>
- </div>
- <?php } ?>
-
- <div class="tab-content">
- <div class="tab-pane fade <?=$mod->activeTab['login']?>" id="loginTab">
- <div class="row">
- <div class="col-md-4"></div>
-
- <div class="col-md-4">
- <div class="panel panel-default">
- <div class="panel-body text-center">
- <form method="post" action="<?=$mod->ap()?>">
- <input type="hidden" name="input[action]" value="login" />
- <h1>Login</h1>
-
- <div class="form-group">
- <label>Username</label>
- <input type="text" name="input[username]" class="form-control" required="true" autofocus />
- </div>
-
- <div class="form-group">
- <label>Password</label>
- <input type="password" name="input[password]" class="form-control" />
- </div>
-
- <div class="btn-group pull-right">
- <?php if ($mod->tabSwap) { ?>
- <a href="#signupTab" class="btn btn-default" aria-controls="signup" data-toggle="tab">
- Signup <span class="glyphicon glyphicon-user"></span>
- </a>
- <?php } ?>
-
- <button type="submit" class="btn btn-success">
- Login <span class="glyphicon glyphicon-log-in"></span>
- </button>
- </div>
- </form>
- </div>
- </div>
- </div>
-
- <div class="col-md-4"></div>
- </div>
- </div>
-
- <div class="tab-pane fade <?=$mod->activeTab['signup']?>" id="signupTab">
- <div class="row">
- <div class="col-md-3"></div>
-
- <div class="col-md-6">
- <div class="panel panel-default">
- <div class="panel-body">
- <form method="post" action="<?=$mod->ap()?>">
- <input type="hidden" name="input[action]" value="signup" />
- <h1 class="text-center">Signup for Scrott</h1>
-
- <div class="form-group">
- <label>Username</label>
- <input type="text" name="input[username]" class="form-control" required="true" maxlength="50" />
- </div>
-
- <div class="form-group">
- <label>Password</label>
- <input type="password" name="input[password]" class="form-control" />
- </div>
-
- <div class="form-group">
- <label>Confirm Password</label>
- <input type="password" name="input[cPassword]" class="form-control" />
- </div>
-
- <div class="btn-group pull-right">
- <?php if ($mod->tabSwap) { ?>
- <a href="#loginTab" class="btn btn-default" aria-controls="login" data-toggle="tab">
- Cancel <span class="glyphicon glyphicon-remove"></span>
- </a>
- <?php } ?>
-
- <button type="submit" class="btn btn-success">
- Signup <span class="glyphicon glyphicon-user"></span>
- </button>
- </div>
- </form>
- </div>
- </div>
- </div>
-
- <div class="col-md-3"></div>
- </div>
- </div>
- </div>
- </div>
-
- <?php include "view/common/foot.view.php"; ?>
- </body>
-</html>
diff --git a/examples/view/common/foot.view.php b/examples/view/common/foot.view.php
deleted file mode 100644
index 977ac04..0000000
--- a/examples/view/common/foot.view.php
+++ /dev/null
@@ -1,19 +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/foot.view.php"; ?>
diff --git a/examples/view/common/head.view.php b/examples/view/common/head.view.php
deleted file mode 100644
index 76880a6..0000000
--- a/examples/view/common/head.view.php
+++ /dev/null
@@ -1,26 +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/head.view.php"; ?>
-
-<style type="text/css">
- body
- {
- padding-top: 70px;
- }
-</style>
diff --git a/examples/view/sysconf/default.view.php b/examples/view/sysconf/default.view.php
deleted file mode 100644
index 90e5441..0000000
--- a/examples/view/sysconf/default.view.php
+++ /dev/null
@@ -1,138 +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/master/head.view.php"; ?>
- <title>Scrott - System-level configuration missing</title>
-
- <style type="text/css">
- body { padding-top: 50px; }
- a { color: inherit; }
- </style>
- </head>
-
- <body>
- <?php include "view/master/topp.view.php"; ?>
-
- <?php include "view/sysconf/user.modal.view.php"; ?>
- <?php include "view/sysconf/group.modal.view.php"; ?>
- <?php include "view/sysconf/pad.modal.view.php"; ?>
- <?php include "view/sysconf/stage.modal.view.php"; ?>
- <?php include "view/sysconf/issue.modal.view.php"; ?>
- <?php include "view/sysconf/message.modal.view.php"; ?>
-
- <div class="container">
- <div class="jumbotron">
- <h2 class="text-center">
- <a href="#" data-toggle="modal" data-target="#userModal"><span class="glyphicon glyphicon-user"></span></a>&nbsp;&nbsp;&nbsp;
- <a href="#" data-toggle="modal" data-target="#groupModal"><span class="glyphicon glyphicon-th"></span></a>&nbsp;&nbsp;&nbsp;
- <a href="#" data-toggle="modal" data-target="#padModal"><span class="glyphicon glyphicon-edit"></span></a>&nbsp;&nbsp;&nbsp;
- <a href="#" data-toggle="modal" data-target="#stageModal"><span class="glyphicon glyphicon-tasks"></span></a>&nbsp;&nbsp;&nbsp;
- <a href="#" data-toggle="modal" data-target="#issueModal"><span class="glyphicon glyphicon-inbox"></span></a>&nbsp;&nbsp;&nbsp;
- <a href="#" data-toggle="modal" data-target="#messageModal"><span class="glyphicon glyphicon-envelope"></span></a>
- </h2>
-
- <h1 class="text-center">Welcome to Scrott!</h1>
- <hr />
-
- <p class="text-center">You're seeing this page because the file "scrott.conf.php" is missing.<br />Please fill out the form below to create a config automatically!</p>
- <p class="text-center">Click the icons above to learn more about core Scrott features and constructs!</p>
- <hr />
-
- <p class="text-center">This form will initialize Scrott's system-level configuration.<br />These are things the app needs before it can begin functioning at all!</p>
- <h5 class="text-center">It is presumed that you are the administrator for this Scrott install.<br />There is a security risk involved with exposing this page to the public!</h5>
-
- <div class="row">
- <div class="col-md-2"></div>
-
- <div class="col-md-8">
- <div class="panel panel-default">
- <div class="panel-body">
- <form method="post" action="<?=$mod->ap()?>">
- <input type="hidden" name="input[action]" value="save" />
- <legend>Database Connection</legend>
- <div class="form-group">
- <label>Engine</label>
- <input type="text" class="form-control" value="Mysql" disabled />
- </div>
-
- <div class="form-group">
- <label>Server Address</label>
- <input type="text" name="input[dbAddress]" class="form-control" placeholder="localhost" required="true" />
- </div>
-
- <div class="form-group">
- <label>Database Name</label>
- <input type="text" name="input[dbName]" class="form-control" placeholder="db_scrott" required="true" />
- </div>
-
- <div class="form-group">
- <label>Username</label>
- <input type="text" name="input[dbUser]" class="form-control" placeholder="root" required="true" />
- </div>
-
- <div class="form-group">
- <label>Password</label>
- <input type="password" name="input[dbPass]" class="form-control" />
- </div>
-
- <legend>Application Installation</legend>
- <div class="form-group">
- <label>Install Location</label>
- <input type="text" class="form-control" value="<?=$mod->ar()?>/" disabled />
- <h6 class="pull-right">Detected from location of files in web document root</h6>
- </div>
-
- <legend>Settings</legend>
- <div class="form-group">
- <label>HTTP(S)</label>
- <div class="radio">
- <label>
- <input type="radio" name="input[settSSL]" value="force" />
- Always Force SSL
- </label>
- </div>
-
- <div class="radio">
- <label>
- <input type="radio" name="input[settSSL]" value="neither" checked />
- Neither (Application can override)
- </label>
- </div>
-
- <div class="radio">
- <label>
- <input type="radio" name="input[settSSL]" value="forbid" />
- Always Forbid SSL
- </label>
- </div>
- </div>
-
- <button type="submit" class="btn btn-primary pull-right">Use these settings</button>
- </form>
- </div>
- </div>
- </div>
-
- <div class="col-md-2"></div>
- </div>
- </div>
- </div>
-
- <?php include "view/master/foot.view.php"; ?>
- </body>
-</html>
diff --git a/examples/view/sysconf/group.modal.view.php b/examples/view/sysconf/group.modal.view.php
deleted file mode 100644
index c0641d9..0000000
--- a/examples/view/sysconf/group.modal.view.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.
- */
-
-?>
-
-<div id="groupModal" class="modal fade" tabindex="-1" role="dialog">
- <div class="modal-dialog" role="document">
- <div class="modal-content">
- <div class="modal-header">
-
- <button type="button" class="close" data-dismiss="modal">
- <span aria-hidden="true">&times;</span>
- </button>
-
- <h4 class="modal-title">User Groups</h4>
-
- </div>
-
- <div class="modal-body">
- <p>Groups make sharing objects and collaborating easier. Instead of creating your
- own pad and adding each of your team members to it individualy, create a
- group-owned pad. With the appropriate permissions set, all group members will be
- able to use the pad. This also solves issues where a shared pad is owned by a
- single user whose account gets closed. Instead pads and other objects are safe as
- long as the group exists. Groups are owned and managed by a single user, who must
- stick around or transfer ownership for the group to continue functioning.</p>
- </div>
-
- <div class="modal-footer">
- <button type="button" class="btn btn-primary" data-dismiss="modal">
- Close
- </button>
- </div>
- </div>
- </div>
-</div>
diff --git a/examples/view/sysconf/issue.modal.view.php b/examples/view/sysconf/issue.modal.view.php
deleted file mode 100644
index 694dd47..0000000
--- a/examples/view/sysconf/issue.modal.view.php
+++ /dev/null
@@ -1,52 +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.
- */
-
-?>
-
-<div id="issueModal" class="modal fade" tabindex="-1" role="dialog">
- <div class="modal-dialog" role="document">
- <div class="modal-content">
- <div class="modal-header">
-
- <button type="button" class="close" data-dismiss="modal">
- <span aria-hidden="true">&times;</span>
- </button>
-
- <h4 class="modal-title">Issues</h4>
-
- </div>
-
- <div class="modal-body">
- <p>Issues represent work. This work could be anything from a software project's bug
- needing fixed or a new feature to implement to a record of needing to order more
- celing panels for the new home office build. Work is done by someone, for someone,
- and this is reflected in Scrott's internal data structures. Every issues has a
- distinct owner (someone requesting work be done) and assignee (someone who needs to
- do the work). If others are interested in the work or have valuable input on the
- work, they may be included (cc'd) on the issue to receive updates on it or to be able
- to post their own updates. Scrott tracks issues using pads which are representative
- of a high-level project or some similar effort. So related issues are tracked
- together.</p>
- </div>
-
- <div class="modal-footer">
- <button type="button" class="btn btn-primary" data-dismiss="modal">
- Close
- </button>
- </div>
- </div>
- </div>
-</div>
diff --git a/examples/view/sysconf/message.modal.view.php b/examples/view/sysconf/message.modal.view.php
deleted file mode 100644
index 14cca2d..0000000
--- a/examples/view/sysconf/message.modal.view.php
+++ /dev/null
@@ -1,55 +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.
- */
-
-?>
-
-<div id="messageModal" class="modal fade" tabindex="-1" role="dialog">
- <div class="modal-dialog" role="document">
- <div class="modal-content">
- <div class="modal-header">
-
- <button type="button" class="close" data-dismiss="modal">
- <span aria-hidden="true">&times;</span>
- </button>
-
- <h4 class="modal-title">Messages</h4>
-
- </div>
-
- <div class="modal-body">
- <p>Although Scrott is formost an issue-tracking tool, it can also be a useful
- communication tool for team and client relationships. Scrott includes a lightweight
- messaging system that is aparent:</p>
- <ul>
- <li>In pads: where users can start new general discussion threads and post
- replys</li>
- <li>In issues: where users can post comments or updates on work status</li>
- <li>In general: where users can send other users direct private messages</li>
- </ul>
- <p>With email integration, Scrott also allows communication with non-scrott user
- clients or owners of issues.</p>
- <p>Scrott's built-in logging system utilizes this messaging framework and is used
- by object owners and site administrators to monitor usage and activity on Scrott</p>
- </div>
-
- <div class="modal-footer">
- <button type="button" class="btn btn-primary" data-dismiss="modal">
- Close
- </button>
- </div>
- </div>
- </div>
-</div>
diff --git a/examples/view/sysconf/pad.modal.view.php b/examples/view/sysconf/pad.modal.view.php
deleted file mode 100644
index 2fbf26b..0000000
--- a/examples/view/sysconf/pad.modal.view.php
+++ /dev/null
@@ -1,68 +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.
- */
-
-?>
-
-<div id="padModal" class="modal fade" tabindex="-1" role="dialog">
- <div class="modal-dialog" role="document">
- <div class="modal-content">
- <div class="modal-header">
-
- <button type="button" class="close" data-dismiss="modal">
- <span aria-hidden="true">&times;</span>
- </button>
-
- <h4 class="modal-title">Pads</h4>
-
- </div>
-
- <div class="modal-body">
- <p>Use pads to track tasks, issues, bugs, client tickets, etc. Within Scrott, these
- are collectively referred to as 'issues'. Use a pad to track your progress on a
- project's completion, to manage user issues for a help-desk, to keep a shopping list,
- bucket list, lists to track your progress on a television series (or series you'd
- like to start), or books to read, or anything inbetween.</p>
-
- <p>In addition to issue tracking, pads enable users to communicate with one another.
- Each pad consists of a lightweight message board (forum) and users can also post
- messages directly to issues if they are relevant. With email integration, even
- non-scrott users may be clued in to the progress of their open issues. Pads even
- allow for message threads to be converted (elevated) to a new open issue if need be.
- (for example: Imagine you started a thread to discuss a potential new website design.
- Once your team had arrived at something the majority liked, the thread can be elevated
- to a new issue (preserving all messaging history), assigned to one of the team
- members, and tracked just like all of your other issues.)</p>
-
- <p>If you would like to allow the public to open issues in your pad (ie: if your pad
- is allowing bug reports/feature requests from users of your project or if your pad
- is the issue tracker for a help-desk), you can enable an issue portal for your pad.
- A portal is a page accessible to the public where anonymous internet users (with a
- verified email address) may submit new issues to your pad. Their email address
- becomes the issue owner so the requester is still able to receive updates on the
- issue as well as respond with their own messages.</p>
-
- <p>Pads can be used by a single user or many; and pads can be owned by a user or a
- user group</p>
- </div>
-
- <div class="modal-footer">
- <button type="button" class="btn btn-primary" data-dismiss="modal">
- Close
- </button>
- </div>
- </div>
- </div>
-</div>
diff --git a/examples/view/sysconf/stage.modal.view.php b/examples/view/sysconf/stage.modal.view.php
deleted file mode 100644
index 11e517f..0000000
--- a/examples/view/sysconf/stage.modal.view.php
+++ /dev/null
@@ -1,52 +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.
- */
-
-?>
-
-<div id="stageModal" class="modal fade" tabindex="-1" role="dialog">
- <div class="modal-dialog" role="document">
- <div class="modal-content">
- <div class="modal-header">
-
- <button type="button" class="close" data-dismiss="modal">
- <span aria-hidden="true">&times;</span>
- </button>
-
- <h4 class="modal-title">Pad Stages</h4>
-
- </div>
-
- <div class="modal-body">
- <p>The issue-tracking aspect of pads is divided up using pad stages. A stage is
- representative of the level of completion or high-level status of an issue. For
- example, a pad may have an initial stage named "To Do", an intermediate stage named
- "In Progress", and another stage "In Review". Stages form a sequence in practice.
- When the appropriate amount of work has been done on an issue, it is advanced to the
- next stage in the pipeline. This allows other pad members and the issue's owner to
- at a glance get an idea of the high-level progress of the issue.</p>
-
- <p>Once an issue is closed, it is removed from this stage pipeline, but retained in
- the pad itself for archival purposes and for generating reports.</p>
- </div>
-
- <div class="modal-footer">
- <button type="button" class="btn btn-primary" data-dismiss="modal">
- Close
- </button>
- </div>
- </div>
- </div>
-</div>
diff --git a/examples/view/sysconf/user.modal.view.php b/examples/view/sysconf/user.modal.view.php
deleted file mode 100644
index 034dc04..0000000
--- a/examples/view/sysconf/user.modal.view.php
+++ /dev/null
@@ -1,48 +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.
- */
-
-?>
-
-<div id="userModal" class="modal fade" tabindex="-1" role="dialog">
- <div class="modal-dialog" role="document">
- <div class="modal-content">
- <div class="modal-header">
-
- <button type="button" class="close" data-dismiss="modal">
- <span aria-hidden="true">&times;</span>
- </button>
-
- <h4 class="modal-title">User Accounts</h4>
-
- </div>
-
- <div class="modal-body">
- <p>Scrott implements a very flexible permissions and access-control system. It all
- starts with users' accounts. Users can create and maintain objects and share them
- with other users if they choose. This is done with a mechanism similar to unix
- file permission modes. Scrott objects form a hierarchy, so permissions from 'higher'
- objects will cascade down. This means that a non-trusted user may control an issue
- in your pad, but have no access to the pad itself.</p>
- </div>
-
- <div class="modal-footer">
- <button type="button" class="btn btn-primary" data-dismiss="modal">
- Close
- </button>
- </div>
- </div>
- </div>
-</div>