public function execute($dataContainer) { //No direct access defined('_WEXEC') or die("Access denied"); $smarty = $dataContainer->getSmarty(); require_once PATH_ACCESS . '/GlobalSettingsManager.php'; require_once PATH_ACCESS . '/FitsManager.php'; $gsm = new GlobalSettingsManager(); $fm = new FitsManager(); $has_Fits = false; if (isset($_POST['fits_key'])) { try { if ($_POST['fits_key'] == $gsm->getFitsKey()) { $has_Fits = true; $fm->setFits($_SESSION['uid'], true, $gsm->getFitsYear()); } else { $smarty->display($this->smartyPath . 'quiz_error.tpl'); } } catch (Exception $e) { } } $smarty->assign('uid', $_SESSION['uid']); if ($has_Fits) { $smarty->display($this->smartyPath . 'quiz_success.tpl'); } else { $smarty->display($this->smartyPath . 'quiz.tpl'); } }
/** * show settings form */ function ShowForm() { $gsManager = new GlobalSettingsManager(); $key = $gsManager->getFitsKey(); $year = $gsManager->getFitsYear(); $class = $gsManager->getFitsClass(); $allClasses = $gsManager->getFitsAllClasses(); $this->fitsInterface->showEditForm($key, $year, $class, $allClasses); }