adminSections = new AdminSections();
$this->adminQuestions = new AdminQuestions();
parent::__construct();
}
public static function getCurrentSection()
{
return self::$_section;
}
public function postProcess()
{
if (Tools::isSubmit('submitSectionAdd') || Tools::isSubmit('submitSectionUpdate')) {
$this->adminSections->postProcess();
}
if (Tools::isSubmit('submitQuestionAdd') || Tools::isSubmit('submitQuestionUpdate')) {
$this->adminQuestions->postProcess();
}
}
public function display()
{
global $cookie, $currentIndex;
echo '
';
echo '';
if (((Tools::isSubmit('submitAddsection') OR Tools::isSubmit('submitAddsectionAndStay')) AND sizeof($this->adminSections->_errors)) OR isset($_GET['updatesection']) OR isset($_GET['addsection']))
{
$this->adminSections->displayForm($this->token);
echo '
'.$this->l('Back to list').'
';
}
elseif (((Tools::isSubmit('submitAddquestion') OR Tools::isSubmit('submitAddquestionAndPreview') OR Tools::isSubmit('submitAddquestionAndStay') AND sizeof($this->adminQuestions->_errors)) OR isset($_GET['updatequestion']) OR isset($_GET['addquestion'])))
{
$this->adminQuestions->displayForm($this->token);
echo '
'.$this->l('Back to list').'
';
}
elseif (isset($_GET['deletesection']))
{
$this->adminSections->deleteSection($this->token);
}
elseif (isset($_GET['deletequestion']))
{
$this->adminQuestions->deleteQuestion($this->token);
}
echo '