Esempio n. 1
0
 public function ajaxUserRegistrationAction()
 {
     if (!$this->autenticacao(true)) {
         return;
     }
     if ($this->getRequest()->isPost()) {
         $model = new Admin_Model_EncontroParticipante();
         $this->view->num_participants = $model->getTotalUserRegistration();
         $this->view->ok = true;
     } else {
         $this->view->error = $this->t->_('Request could not be completed.');
     }
 }
Esempio n. 2
0
 public function ajaxInscricoesMunicipio15MaisAction()
 {
     if (!$this->autenticacao(true)) {
         return;
     }
     $config = new Zend_Config_Ini(APPLICATION_PATH . '/configs/application.ini', 'staging');
     $idEncontro = $config->encontro->codigo;
     $model = new Admin_Model_EncontroParticipante();
     try {
         $limit = 15;
         $rs = $model->relatorioInscricoesMunicipio($idEncontro, $limit);
         $this->view->size = count($rs);
         $this->view->array = array();
         $this->view->ok = true;
         foreach ($rs as $value) {
             $obj = new stdClass();
             $obj->municipio = "{$value['municipio']}";
             $obj->num = "{$value['num']}";
             $obj->confirmados = "{$value['confirmados']}";
             array_push($this->view->array, $obj);
         }
     } catch (Exception $e) {
         $this->view->error = "Ocorreu um erro inesperado.<br/>Detalhes: " . $e->getMessage();
         $this->view->ok = false;
     }
 }