table = 'support_question'; $this->className = 'Question'; $this->lang = true; $this->_section = AdminSupport::getCurrentSection(); parent::__construct(); } public function displayForm($isMainTab=TRUE) { global $currentIndex, $cookie; if(!$id_section = Tools::getValue('id_section')) { $this->_errors[] = Tools::displayError('at least one section have to be added.'); Tools::redirectAdmin($currentIndex.'&token='.Tools::getAdminTokenLite('AdminSupport')); } parent::displayForm(); $this->question = null; if($id = Tools::getValue('id')) { $this->question = new Question($id); if($this->question->id === null) { Tools::redirectAdmin($currentIndex.'&token='.Tools::getAdminTokenLite('AdminSupport')); } } $iso = Language::getIsoById((int)($cookie->id_lang)); $divLangName = 'title¤answer'; echo '
'; } public function displayList($token = null) { global $currentIndex, $cookie; $questions = Question::getQuestionsByIdSection($this->_section->id); echo ''; } public function display($token=null) { echo ' '.$this->l('Add a new question').''; echo '