Exemple #1
0
 private function _enviarEmailConfirmacaoInscricao($idPessoa, $idEncontro)
 {
     $model = new Application_Model_Participante();
     $rs = $model->dadosTicketInscricao($idPessoa, $idEncontro);
     $pdf = new Sige_Pdf_Relatorio_TicketInscricao($rs);
     $binary = $pdf->obterPdf();
     $mail = new Application_Model_EmailConfirmacao();
     $mail->send($idPessoa, $idEncontro, Application_Model_EmailConfirmacao::MSG_CONFIRMACAO_REINSCRICAO, $binary);
 }
 public function sairAction()
 {
     $this->autenticacao();
     $this->_helper->layout()->disableLayout();
     $this->_helper->viewRenderer->setNoRender(true);
     $sessao = Zend_Auth::getInstance()->getIdentity();
     $cache = Zend_Registry::get('cache_common');
     $ps = $cache->load('prefsis');
     $idEncontro = (int) $ps->encontro["id_encontro"];
     $model = new Application_Model_Participante();
     try {
         $model->sairDaCaravana(array($idEncontro, $sessao["idPessoa"]));
         $this->_helper->flashMessenger->addMessage(array('success' => _('Participant was removed from this caravan successfully.')));
     } catch (Exception $e) {
         $this->_helper->flashMessenger->addMessage(array('danger' => _('An unexpected error ocurred.<br/> Details:&nbsp;') . $e->getMessage()));
     }
     $this->_helper->redirector->goToRoute(array('controller' => 'caravana', 'action' => 'index'), null, true);
 }
 public function ticketAction()
 {
     $this->autenticacao();
     $this->_helper->layout()->disableLayout();
     $this->_helper->viewRenderer->setNoRender(true);
     $sessao = Zend_Auth::getInstance()->getIdentity();
     $cache = Zend_Registry::get('cache_common');
     $ps = $cache->load('prefsis');
     $id_encontro = (int) $ps->encontro["id_encontro"];
     $id_pessoa = $sessao["idPessoa"];
     $model = new Application_Model_Participante();
     $rs = $model->dadosTicketInscricao($id_pessoa, $id_encontro);
     $pdf = new Sige_Pdf_Relatorio_TicketInscricao($rs);
     try {
         $pdf->gerarPdf();
     } catch (Exception $e) {
         $this->_helper->flashMessenger->addMessage(array('danger' => _('An unexpected error ocurred.<br/> Details:&nbsp;') . $e->getMessage()));
         return $this->_helper->redirector->goToRoute(array('controller' => 'participante', 'action' => 'ver'), 'default', true);
     }
 }
 public function ajaxBuscarParticipanteAction()
 {
     if (!$this->autenticacao(true)) {
         return;
     }
     $sessao = Zend_Auth::getInstance()->getIdentity();
     $cache = Zend_Registry::get('cache_common');
     $ps = $cache->load('prefsis');
     $id_encontro = (int) $ps->encontro["id_encontro"];
     $id_pessoa = $sessao["idPessoa"];
     $termo = $this->_request->getParam("termo", "");
     try {
         $model_participante = new Application_Model_Participante();
         $rs = $model_participante->buscarParticipantePorEmail($termo, $id_pessoa, $id_encontro);
         $this->view->size = count($rs);
         $this->view->results = $rs;
     } catch (Zend_Db_Exception $e) {
         $this->view->error = _('Error on fetching results.');
     }
 }