Galera, estou precisando da ajuda dos Sr's novamente...
Estive pensando atualmente o meu "sisteminha" está tranquilo, poucas informações mas futuramente vai se tornar grande e com isso o meu campo de "BUSCA" com certeza ficará extensa, para evitar isso, gostaria de adicionar uma forma de paginar minha busca procurei no google porem as que encontrei não consegui adicionar em meu site, então recorri até vocês.
Pergunta
crazySerk
Galera, estou precisando da ajuda dos Sr's novamente...
Estive pensando atualmente o meu "sisteminha" está tranquilo, poucas informações mas futuramente vai se tornar grande e com isso o meu campo de "BUSCA" com certeza ficará extensa, para evitar isso, gostaria de adicionar uma forma de paginar minha busca procurei no google porem as que encontrei não consegui adicionar em meu site, então recorri até vocês.
Bom o meu script de busca está abaixo:
<?php include("conexao/config.php"); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Pesquisar</title> <style type="text/css"> <!-- .style5 {font-family: Tahoma; font-size: 12px; font-weight: bold; } .style7 {font-size: 12px} .style10 {font-size: 12px; font-weight: bold; } .style17 {font-family: Tahoma; font-size: 12px; font-weight: bold; color: #FFFFFF; } .style18 { font-size: 11px; font-family: Tahoma; font-weight: bold; color: #FF0000; } .style21 {font-weight: bold; font-family: Tahoma;} .style23 {color: #000000} .style24 { font-size: 11px; color: #000000; } .style25 {font-size: 11px} .style29 {font-family: Tahoma; font-size: 12px; font-weight: bold; color: #000000; } --> </style> <script type="text/javascript" src="scripts/mascara_dados.js" charset="utf-8"> </script> <script language="JavaScript"> function abrir(URL) { var width = 810; var height = 500; var left = 130; var top = 99; window.open(URL,'janela', 'width='+width+', height='+height+', top='+top+', left='+left+', scrollbars=yes, status=no, toolbar=no, location=no, directories=no, menubar=no, resizable=no, fullscreen=no'); } </script> </head> <? if($contagem != 1) { session_destroy(); include("login.php"); }else{ ?> <body> <table width="792" height="139" border="1" align="center" bordercolor="#000000"> <tr> <td width="714"> <form id="rm_presquisa" name="rm_presquisa" method="post" action="?page=pesquisar_proposta"> <span class="style5">Digite o NOME do seu Cliente <label></label> : <label> </label> </span> <span class="style10"> <label> </label> </span><span class="style7"><label></label> </span> <label> <input name="cliente_nome" type="text" id="cliente_nome" size="35" maxlength="14" /> </label> <label> <input type="submit" name="pesquisar" id="pesquisar" value="Pesquisar" /> </label> </form> <table width="777" height="67" border="1" align="center" bordercolor="#000000"> <tr> <td width="74"><div align="center" class="style23 style25"><span class="style21">N° Proposta</span></div></td> <td width="220"><div align="center" class="style23 style25"><span class="style21">Cliente</span></div></td> <td width="95"><div align="center" class="style23 style25"><span class="style21">Status</span></div></td> <td width="199"><div align="center" class="style17 style23 style25"> <div align="center">OBS Proposta</div> </div> <div align="center" class="style23 style25"></div></td> <td width="77"><div align="center" class="style24"><span class="style21">Anexar Docs</span></div></td> <td width="51"><div align="center"><span class="style17 style23 style25">Editar</span></div></td> </tr> <?php include ("conexao/config.php"); if ($_POST["pesquisar"]){ //$pesquisar = ""; //} else { $vendedor = $_SESSION["usuario"]; $pesquisar = $_POST["cliente_nome"]; $sql_pesquisa = "SELECT * FROM propostas_digitadas WHERE cliente_nome LIKE '".$pesquisar."%' AND vendedor = '$vendedor' ORDER BY cliente_nome"; $result = mysql_query($sql_pesquisa); while($registro = mysql_fetch_array($result)) { ?> <tr> <td height="45"><div align="center"><span class="style29"><? echo $registro["cod_proposta"]; ?></span></div></td> <td><span class="style29"><? echo $registro["cliente_nome"]; ?></span></td> <td><div align="center" class="style23"> <? if($registro["status_dig"] == "0") { echo "<img src='images/st_enviado.png' alt='Enviado' width='34' height='30' />"; } else if ($registro["status_dig"]==1){ echo "<img src='images/st_analisando.png' alt='Analisando' width='34' height='30' />"; } else if ($registro["status_dig"]==2){ echo "<img src='images/st_pendente.png' alt='Pendente' width='34' height='30' />"; } else if ($registro["status_dig"]==3){ echo "<img src='images/st_aprovado.png' alt='Aprovado' width='34' height='30' />"; } else if ($registro["status_dig"]==4){ echo "<img src='images/st_reprovado.png' alt='Reprovado' width='34' height='30' />"; } ?> </div></td> <td><div align="center"><span class="style18"><? echo $registro["obs_proposta"]; ?></span></div> <div align="center"></div></td> <td><div align="center"><a href="java script:abrir('anexar_doc.php?cod_proposta=<? echo $registro["cod_proposta"]; ?>');"><img src="images/scanner.png" alt="Anexar Documentos" width="40" height="40" /></a></div></td> <td><div align="center"><a href="java script:abrir('editar_pessoafisica.php?cod_proposta=<? echo $registro["cod_proposta"]; ?>');"><img src="images/editar.png" width="40" height="40" alt="Editar Proposta" /></a></div></td> </tr> <? } } ?> </table> </td> </tr> </table> <br /> <table width="100" border="0" align="left"> <tr> <td colspan="2"><div align="left" class="style29"> <div align="center">Legenda</div> </div></td> </tr> <tr> <td width="43"><img src="images/st_enviado.png" alt="Enviado" width="34" height="30" /></td> <td width="47"><span class="style5 style23">Enviado</span></td> </tr> <tr> <td><img src="images/st_analisando.png" alt="Analisando" width="34" height="30" /></td> <td><span class="style5 style23">Analisando</span></td> </tr> <tr> <td><img src="images/st_pendente.png" alt="Pendente" width="34" height="30" /></td> <td><span class="style5 style23">Pendente</span></td> </tr> <tr> <td><img src="images/st_reprovado.png" alt="Reprovado" width="34" height="30" /></td> <td><span class="style5 style23">Reprovado</span></td> </tr> <tr> <td><img src="images/st_aprovado.png" alt="Aprovado" width="34" height="30" /></td> <td><span class="style5 style23">Aprovado</span></td> </tr> </table> <br /> </body> <? } ?> </html>AGRADEÇO A TODOS :)
Link para o comentário
Compartilhar em outros sites
1 resposta a esta questão
Posts Recomendados
Participe da discussão
Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.