From a21e20b7a8db343129aa8713853358bdb77de939 Mon Sep 17 00:00:00 2001 From: Malf Furious Date: Sat, 2 Jan 2016 13:30:46 -0500 Subject: + Added model for new page master layer ("Common" MVC) --- app/model/common.mod.php | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 app/model/common.mod.php diff --git a/app/model/common.mod.php b/app/model/common.mod.php new file mode 100644 index 0000000..d4270d8 --- /dev/null +++ b/app/model/common.mod.php @@ -0,0 +1,9 @@ + -- cgit v1.2.3 From d9b61c6ab7124730e335a4b07474462cc0fe71e0 Mon Sep 17 00:00:00 2001 From: Malf Furious Date: Sat, 2 Jan 2016 14:27:40 -0500 Subject: + Adding initial view files for common MVC --- app/view/common/foot.view.php | 1 + app/view/common/head.view.php | 1 + app/view/common/topp.view.php | 1 + 3 files changed, 3 insertions(+) create mode 100644 app/view/common/foot.view.php create mode 100644 app/view/common/head.view.php create mode 100644 app/view/common/topp.view.php diff --git a/app/view/common/foot.view.php b/app/view/common/foot.view.php new file mode 100644 index 0000000..a24a145 --- /dev/null +++ b/app/view/common/foot.view.php @@ -0,0 +1 @@ + diff --git a/app/view/common/head.view.php b/app/view/common/head.view.php new file mode 100644 index 0000000..87cd37d --- /dev/null +++ b/app/view/common/head.view.php @@ -0,0 +1 @@ + diff --git a/app/view/common/topp.view.php b/app/view/common/topp.view.php new file mode 100644 index 0000000..40d9543 --- /dev/null +++ b/app/view/common/topp.view.php @@ -0,0 +1 @@ + -- cgit v1.2.3 From 5b9f9aa34f0fbfa4de741047c51d7ba46482b7e9 Mon Sep 17 00:00:00 2001 From: Malf Furious Date: Sun, 3 Jan 2016 12:21:43 -0500 Subject: + Added controller for new MVC "Auth" --- app/controller/auth.control.php | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 app/controller/auth.control.php diff --git a/app/controller/auth.control.php b/app/controller/auth.control.php new file mode 100644 index 0000000..00c71f6 --- /dev/null +++ b/app/controller/auth.control.php @@ -0,0 +1,33 @@ +action_default($mod); + break; + } + } + + function action_default($mod) + { + $mod->deflt(); + include "view/auth/default.view.php"; + } +} + +?> -- cgit v1.2.3 From 735230c9125314e5a185e82c57cac0ad2e11b996 Mon Sep 17 00:00:00 2001 From: Malf Furious Date: Sun, 3 Jan 2016 12:47:30 -0500 Subject: + Added model for Auth MVC --- app/model/auth.mod.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 app/model/auth.mod.php diff --git a/app/model/auth.mod.php b/app/model/auth.mod.php new file mode 100644 index 0000000..9c356e2 --- /dev/null +++ b/app/model/auth.mod.php @@ -0,0 +1,15 @@ + -- cgit v1.2.3 From abb659a2753054158e9f7ec26271740a64a07e7d Mon Sep 17 00:00:00 2001 From: Malf Furious Date: Sun, 3 Jan 2016 15:49:33 -0500 Subject: * Hooked the Auth MVC from the Root controller --- app/controller/root.control.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/controller/root.control.php b/app/controller/root.control.php index 437cae1..b44ad76 100644 --- a/app/controller/root.control.php +++ b/app/controller/root.control.php @@ -2,6 +2,7 @@ require_once "class/controller.class.php"; require_once "controller/sysconf.control.php"; +require_once "controller/auth.control.php"; /* * Root-level controller for Scrott app. This object will delegate the page request to the @@ -27,8 +28,12 @@ class Root extends Controller } /* TODO */ + /* TODO -- only auth if logged out */ else - echo "Configuration is present!"; + { + $ctrl = new Auth(); + $ctrl->handle($argv); + } } /* -- cgit v1.2.3 From 9dc4095be9da030a40ecdc7528bcb02843037a05 Mon Sep 17 00:00:00 2001 From: Malf Furious Date: Sun, 3 Jan 2016 15:53:46 -0500 Subject: + Adding default view for Auth MVC --- app/view/auth/default.view.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 app/view/auth/default.view.php diff --git a/app/view/auth/default.view.php b/app/view/auth/default.view.php new file mode 100644 index 0000000..8769aa2 --- /dev/null +++ b/app/view/auth/default.view.php @@ -0,0 +1,13 @@ + + + + + + Scrott - Login + + + + + + + -- cgit v1.2.3 From e0162feea3e4f7df36fdad5a6cf83fd37972aba9 Mon Sep 17 00:00:00 2001 From: Malf Furious Date: Sun, 3 Jan 2016 18:29:45 -0500 Subject: * Start of application navbar * Digested some example code --- app/view/common/head.view.php | 7 +++++++ app/view/common/topp.view.php | 20 ++++++++++++++++++++ examples/example.html | 22 +--------------------- 3 files changed, 28 insertions(+), 21 deletions(-) diff --git a/app/view/common/head.view.php b/app/view/common/head.view.php index 87cd37d..b23ec18 100644 --- a/app/view/common/head.view.php +++ b/app/view/common/head.view.php @@ -1 +1,8 @@ + + diff --git a/app/view/common/topp.view.php b/app/view/common/topp.view.php index 40d9543..05e4862 100644 --- a/app/view/common/topp.view.php +++ b/app/view/common/topp.view.php @@ -1 +1,21 @@ + + diff --git a/examples/example.html b/examples/example.html index 44c91f2..7f1ac2a 100644 --- a/examples/example.html +++ b/examples/example.html @@ -1,31 +1,11 @@ - - Scrott - Save the World - - - -