diff --git a/application/controllers/Test.php b/application/controllers/Test.php new file mode 100644 index 000000000..497f12f85 --- /dev/null +++ b/application/controllers/Test.php @@ -0,0 +1,63 @@ + 'dashboard/benutzer:r', + 'db' => 'dashboard/benutzer:r', + 'admin' => 'dashboard/admin:r', + ) + ); + + $this->load->library('AuthLib'); + + $this->_setAuthUID(); // sets property uid + + $this->setControllerId(); // sets the controller id + } + + // ----------------------------------------------------------------------------------------------------------------- + // Public methods + public function index() + { + $this->load->view('test/Test.php', ['dashboard' => 'CIS']); + } + + // Public methods + public function db($dashboard) + { + $this->load->view('test/Test.php', ['dashboard' => $dashboard]); + } + + public function admin() + { + $this->load->view('test/Admin.php', []); + } + + // ----------------------------------------------------------------------------------------------------------------- + // Private methods + + /** + * Retrieve the UID of the logged user and checks if it is valid + */ + private function _setAuthUID() + { + $this->_uid = getAuthUID(); + + if (!$this->_uid) show_error('User authentification failed'); + } + +} diff --git a/application/views/test/Admin.php b/application/views/test/Admin.php new file mode 100644 index 000000000..837f6411b --- /dev/null +++ b/application/views/test/Admin.php @@ -0,0 +1,32 @@ +load->view('templates/FHC-Header', + array( + 'title' => 'FH-Complete', + 'bootstrap5' => true, + 'fontawesome6' => true, + 'axios027' => true, + 'restclient' => true, + 'vue3' => true, + 'customJSModules' => ['public/js/apps/Test.js'], + 'customCSSs' => [ + 'public/css/components/dashboard.css' + ], + 'navigationcomponent' => true + ) +); +?> + +