示例#1
0
 public function supportAction()
 {
     if (isset($_POST)) {
         $data = $this->getRequest()->getPost();
         $form = new Form_General_Support();
         if ($form->isValid($data)) {
             $modelSupport = new Model_Support();
             $modelSupport->saveSupportRequest($data);
             $notification = new Model_Notification();
             $notification->sendSupportNotifications($data);
             $this->_helper->FlashMessenger->addMessage(array('message' => 'Thank you. Your query has been received.'));
         } else {
             $this->_helper->FlashMessenger->addMessage(array('error' => 'Sorry your support mail could not be sent'));
         }
         if ($this->_getParam('referer')) {
             $this->_redirect($this->_getParam('referer'));
         } else {
             $this->_redirect('/wep/dashboard');
         }
     }
 }