Example #1
0
 public function ajaxInteresseAction()
 {
     if (!$this->autenticacao(true)) {
         return;
     }
     $sessao = Zend_Auth::getInstance()->getIdentity();
     $idPessoa = $sessao["idPessoa"];
     try {
         $eventoDemanda = new Application_Model_EventoDemanda();
         $data = array('evento' => intval($this->_request->getParam("id")), 'id_pessoa' => $idPessoa);
         $eventoDemanda->insert($data);
         $this->view->ok = true;
     } catch (Zend_Db_Exception $ex) {
         $this->view->ok = false;
         $this->view->erro = _("An unexpected error ocurred while bookmarking the event.<br/> Details:&nbsp;") . $ex->getMessage();
     }
 }