/** * Return Tools-Page as HTML-View (only Logout) */ public function getTools() { require 'classes/view.php'; $view = new view(); $view->setTemplate('admin/tools'); return $view->loadTemplate(new stdClass()); }
/** * Return Highscore-Page as HTML-View */ public function getMain() { require_once 'classes/person.php'; require_once 'classes/view.php'; person::startSession(); $view = new view(); return $view->loadTemplate($this->getModel()); }
/** * Returns Login-Page as HTML-View * @param unknown_type $succesLocation */ public function getMain($succesLocation = '') { require 'classes/view.php'; $view = new view(); $view->setTemplate('login'); $model = new stdClass(); $model->submitUrl = 'Admin'; return $view->loadTemplate($model); }
/** * Return Kategorien-Page as HTML-View */ public function getMain() { require 'classes/SQL.php'; require 'classes/view.php'; $model = new stdClass(); $model->template = 'admin/KategorieTable'; $sql = new SQL(); $sql->connect(); $model->data = $sql->get("SELECT * FROM quizCategories"); $view = new view(); return $view->loadTemplate($model); }
/** * Return QuestionTable-Page as HTML-View * parameters = POST: CategorieID */ public function getQuestionTable() { require 'classes/SQL.php'; require 'classes/view.php'; $categorie = htmlentities($_POST['katID']); $model = new stdClass(); $model->template = 'admin/QuestionTable'; $sql = new SQL(); $sql->connect(); $model->data = $sql->get("SELECT * FROM ViewQuestionQuote WHERE categorie='" . $categorie . "' ORDER BY question"); $view = new view(); return $view->loadTemplate($model); }
/** * Return Gamer-Main-Page as HTML-View */ public function getMain() { if (person::getPermissionName() != 'admin' && person::getPermissionName() != 'gameuser') { $login = Uri::getAction('Login'); header("Location: {$login}"); } else { require 'classes/view.php'; $model = new stdClass(); $model->template = 'game/main'; $model->hasFrage = isset($_SESSION['tmpFrage']['id']); $model->user = $_SESSION['username']; $model->points = 0; $model->message = $model->hasFrage ? 'Welcome back' : 'Welcome'; $view = new view(); return $view->loadTemplate($model); } }