public function analisedeconteudoAction()
 {
     $this->intTamPag = 1;
     $params = $this->getRequest()->getParams();
     $idPronac = $params['idpronac'];
     $this->view->idpronac = $idPronac;
     //DEFINE PARAMETROS DE ORDENACAO / QTDE. REG POR PAG. / PAGINACAO
     if ($this->_request->getParam("qtde")) {
         $this->intTamPag = $this->_request->getParam("qtde");
     }
     $order = array();
     //==== parametro de ordenacao  ======//
     if ($this->_request->getParam("ordem")) {
         $ordem = $this->_request->getParam("ordem");
         if ($ordem == "ASC") {
             $novaOrdem = "DESC";
         } else {
             $novaOrdem = "ASC";
         }
     } else {
         $ordem = "ASC";
         $novaOrdem = "ASC";
     }
     //==== campo de ordenacao  ======//
     if ($this->_request->getParam("campo")) {
         $campo = $this->_request->getParam("campo");
         $order = array($campo . " " . $ordem);
         $ordenacao = "&campo=" . $campo . "&ordem=" . $ordem;
     } else {
         $campo = null;
         $order = array('stPrincipal');
         //                $order = array('ordenacao');
         //                $order = array(1);
         $ordenacao = null;
     }
     $pag = 1;
     $get = Zend_Registry::get('get');
     if (isset($get->pag)) {
         $pag = $get->pag;
     }
     $inicio = $pag > 1 ? ($pag - 1) * $this->intTamPag : 0;
     /* ================== PAGINACAO ======================*/
     $projetos = new Projetos();
     $tbPlanilhaAprovacao = new PlanilhaAprovacao();
     $tbAnaliseAprovacao = new AnaliseAprovacao();
     $rsProjeto = $projetos->buscar(array('IdPRONAC = ?' => $idPronac))->current()->toArray();
     //define tipo de planilha a ser utilizada baseado na ultima planilha criada
     $rsPlanilhaAtual = $tbPlanilhaAprovacao->buscar(array('IdPRONAC = ?' => $idPronac), array('dtPlanilha DESC'))->current();
     if (!empty($rsPlanilhaAtual) && $rsPlanilhaAtual->tpPlanilha == 'SE') {
         $tpPlanilha = 'SE';
     } else {
         $tpPlanilha = 'CO';
     }
     $where = array();
     $where['aa.tpAnalise = ?'] = $tpPlanilha;
     $where['aa.idPronac = ?'] = $idPronac;
     $where['PDP.stPlanoDistribuicaoProduto = ?'] = 1;
     $total = $tbAnaliseAprovacao->buscarAnalises($where, $order, null, null, true);
     $fim = $inicio + $this->intTamPag;
     $totalPag = (int) ($total % $this->intTamPag == 0 ? $total / $this->intTamPag : $total / $this->intTamPag + 1);
     $tamanho = $fim > $total ? $total - $inicio : $this->intTamPag;
     $busca = $tbAnaliseAprovacao->buscarAnalises($where, $order, $tamanho, $inicio);
     $paginacao = array("pag" => $pag, "qtde" => $this->intTamPag, "campo" => $campo, "ordem" => $ordem, "ordenacao" => $ordenacao, "novaOrdem" => $novaOrdem, "total" => $total, "inicio" => $inicio + 1, "fim" => $fim, "totalPag" => $totalPag, "Itenspag" => $this->intTamPag, "tamanho" => $tamanho);
     $auth = Zend_Auth::getInstance();
     // pega a autenticao
     $Usuario = new Usuario();
     // objeto usuario
     $idagente = $Usuario->getIdUsuario($auth->getIdentity()->usu_codigo);
     $idagente = $idagente['idAgente'];
     $reuniao = new Reuniao();
     $ConsultaReuniaoAberta = $reuniao->buscar(array("stEstado = ?" => 0));
     if ($ConsultaReuniaoAberta->count() > 0) {
         $this->view->dadosReuniaoPlenariaAtual = $ConsultaReuniaoAberta;
         $this->view->usu_codigo = $auth->getIdentity()->usu_codigo;
         $ConsultaReuniaoAberta = $ConsultaReuniaoAberta->current()->toArray();
         $this->view->plenariaatual = $ConsultaReuniaoAberta['idNrReuniao'];
         $this->view->dadosReuniaoPlenariaAtual = $ConsultaReuniaoAberta;
         //---------------------------------------------------------------------------------------------------------------
         $votantes = new Votante();
         $exibirVotantes = $votantes->selecionarvotantes($ConsultaReuniaoAberta['idNrReuniao']);
         if (count($exibirVotantes) > 0) {
             foreach ($exibirVotantes as $votantes) {
                 $dadosVotante[] = $votantes->idAgente;
             }
             if (count($dadosVotante) > 0) {
                 if (in_array($idagente, $dadosVotante)) {
                     $this->view->votante = true;
                 } else {
                     $this->view->votante = false;
                 }
             }
         }
     }
     $this->view->paginacao = $paginacao;
     $this->view->qtdRegistros = $total;
     $this->view->dados = $busca;
     $this->view->intTamPag = $this->intTamPag;
     $this->view->dadosprojeto = $rsProjeto;
 }