public function indexAction()
 {
     $flag = true;
     $captcha = new Zendda_Captcha_Image();
     //9.Truyen gia tri cua CAPTCHA ra VIEW
     $this->view->captcha = $captcha->render($this->view);
     $this->view->captcha_id = $captcha->getId();
     if ($this->_request->isPost()) {
         $captchaID = $this->_arrParam['captchaID'];
         $valueCaptcha = $this->_arrParam['captcha'];
         $validatorForm = new Donga_Form_ValidateContact($this->_arrParam);
         if ($validatorForm->isError() == true) {
             $flag = false;
             $this->view->messageErrorForm = $validatorForm->getMessageError();
         }
         $validatorCaptcha = new Zendda_Validate_Captcha($captchaID);
         if (!$validatorCaptcha->isValid($valueCaptcha)) {
             $flag = false;
             $errors = $validatorCaptcha->getMessages();
             $this->view->messageErrorCaptcha = $errors;
         }
         $captcha->removeImg($captchaID);
         if ($flag == true) {
             $tbl_qa = new Donga_Model_QuestionAnswer();
             $tbl_qa->saveItem($validatorForm->getData(), array('task' => 'admin-add'));
         } else {
             $this->view->dataRight = $validatorForm->getData();
         }
     }
 }
 public function editAction()
 {
     $this->view->Title = 'Chuyên mục :: Hỏi - Đáp :: Sửa';
     $this->view->headTitle($this->view->Title, true);
     $tblItem = new Donga_Model_QuestionAnswer();
     $this->view->item = $tblItem->getItem($this->_arrParams, array('task' => 'admin-edit'));
     if ($this->_request->isPost()) {
         $tblItem = new Donga_Model_QuestionAnswer();
         $tblItem->saveItem($this->_arrParams, array('task' => 'admin-edit'));
         $this->sendMail($this->_arrParams);
         $this->_redirect($this->_mainAction);
     }
 }