SetTitulo( "{$this->_instituicao} Emails!" ); $this->processoAp = "86"; } } class indice extends clsListagem { function Gerar() { $this->titulo = "Emails"; $this->addBanner( "imagens/nvp_top_intranet.jpg", "imagens/nvp_vert_intranet.jpg", "Intranet"); $nome = @$_GET['nome']; $email = @$_GET['email']; $this->campoTexto( "nome", "Nome", $nome, "50", "250", true ); $this->campoTexto( "email", "Email", $email, "50", "250", true ); $where = ""; $whereand = "WHERE "; if($nome) { $where = "$whereand nm_pessoa LIKE '%{$nome}%'"; $whereand = " and "; } if($email) { $where = "$whereand email LIKE '%{$email}%'"; } $this->addCabecalhos( array( "Nome", "Email")); $db = new clsBanco(); // Recurso Utilizado pelo Paginador $db->Consulta( "SELECT count(*) FROM mailling_email {$where}" ); $db->ProximoRegistro(); list ($total) = $db->Tupla(); $total_tmp = $total; $iniciolimit = (@$_GET['iniciolimit']) ? @$_GET['iniciolimit'] : "0"; $limite = 10; if ($total > $limite) { $iniciolimit_ = $iniciolimit * $limite; $limit = " LIMIT {$iniciolimit_}, $limite"; } $db->Consulta( "SELECT cod_mailling_email,nm_pessoa, email FROM mailling_email {$where} ORDER BY nm_pessoa ASC {$limit}" ); while ($db->ProximoRegistro()) { list ($cod_email, $nome, $email) = $db->Tupla(); $this->addLinhas( array("  $nome", "$email") ); } $this->paginador("mailling_email_lst.php?", $total_tmp,$limite,@$_GET['pos_atual']); $this->acao = "go(\"mailling_email_cad.php\")"; $this->nome_acao = "Novo"; $this->largura = "100%"; } } $pagina = new clsIndex(); $miolo = new indice(); $pagina->addForm( $miolo ); $pagina->MakeAll(); ?>