public function indexAction() { $a = new Agentes(); Zend_Layout::startMvc(array('layout' => 'layout_proponente')); $this->view->saudacao = Data::saudacao() . "! " . Data::mostraData() . "."; $verificarvinculo = $a->buscarAgenteVinculoResponsavel(array('vr.idAgenteProponente = ?' => $this->idAgente, 'vprp.siVinculoProposta = ?' => 0))->count(); // $verificarvinculo = $v->buscar(array('idAgenteProponente = ?'=>$this->idAgente, 'siVinculo = ?'=>'0'))->count(); if ($verificarvinculo > 0) { $this->view->vinculos = true; } else { $this->view->vinculos = false; } // Comunicados $tbComunicados = new tbComunicados(); $where['stEstado = ?'] = 1; $where['stOpcao = ?'] = 1; $ordem = array(); $rs = $tbComunicados->listarComunicados($where, $ordem); $this->view->comunicados = $rs; }
public function mostraresponsavelAction() { $this->_helper->layout->disableLayout(); $ag = new Agentes(); if ($_POST) { $cnpjcpf = $_POST['cnpjcpf']; $nome = $_POST['nome']; $stVinculo = $_POST['stVinculo']; if ($cnpjcpf != '') { $where['ag.CNPJCPF = ?'] = Mascara::delMaskCPFCNPJ($cnpjcpf); } if ($nome != '') { $where["nm.Descricao like (?)"] = "%" . $nome . "%"; } if ($stVinculo != '') { $where['vprp.siVinculoProposta = ?'] = $stVinculo; } } else { $where['vr.idAgenteProponente = ?'] = $this->idAgente; $where['vprp.idPreProjeto is not null'] = ''; } $buscarVinculo = $ag->buscarAgenteVinculoResponsavel($where); // xd($buscarVinculo); $this->view->vinculo = $buscarVinculo; }