public function indexAction()
 {
     $this->autenticacao();
     $sessao = Zend_Auth::getInstance()->getIdentity();
     $cache = Zend_Registry::get('cache_common');
     $ps = $cache->load('prefsis');
     $idEncontro = (int) $ps->encontro["id_encontro"];
     $idPessoa = $sessao["idPessoa"];
     $eventoDemanda = new Application_Model_EventoDemanda();
     $eventoParticipante = $eventoDemanda->listar(array($idEncontro, $idPessoa));
     $this->view->listaParticipanteEventoTabela = $eventoParticipante;
 }
Example #2
0
 public function ajaxDesfazerInteresseAction()
 {
     if (!$this->autenticacao(true)) {
         return;
     }
     if ($this->getRequest()->isPost()) {
         $sessao = Zend_Auth::getInstance()->getIdentity();
         $idPessoa = $sessao["idPessoa"];
         $model = new Application_Model_EventoDemanda();
         $id = (int) $this->getRequest()->getPost('id_evento');
         try {
             $where = array("evento = ?" => $id, "id_pessoa = ?" => $idPessoa);
             $model->delete($where);
             $this->view->ok = true;
             $this->view->msg = _('Bookmark successfully removed.');
         } catch (Exception $e) {
             $this->view->ok = false;
             $this->view->error = _('An unexpected error ocurred.<br/> Details:&nbsp;') . $e->getMessage();
         }
     } else {
         $this->view->ok = false;
         $this->view->error = _("The request can not be completed.");
     }
 }