Ir para conteúdo
Fórum Script Brasil
  • 0

Urgente...


Guest derick.guitar

Pergunta

Guest derick.guitar

Olá galera, alguém poderia colocar um codigo de paginacao nesta pagina pra mim...se quiser pode mandar pro meu e-mail derick.guitar@bol.com.br

<%

Dim strURL

Dim cnnSearch

Dim rstSearch

Dim strDBPath

Dim strSQL

Dim strSearch

inicio = Timer

function TiraAcento(StrAcento)

for i = 1 to len(StrAcento)

Letra = mid(StrAcento, i, 1)

Select Case Letra

Case "á","Á","à","À","ã","Ã","â","Â","â","ä","Ä"

Letra = "A"

Case "é","É","ê","Ê","Ë","ë","È","è"

Letra = "E"

Case "í","Í","ï","Ï","Ì","ì"

Letra = "I"

Case "ó","Ó","ô","Ô","õ","Õ","ö","Ö","ò","Ò"

Letra = "O"

Case "ú","Ú","Ù","ù","ú","û","ü","Ü","Û"

Letra = "U"

Case "ç","Ç"

Letra = "C"

Case "não"

Letra = "N"

End Select

texto = texto & Letra

next

TiraAcento = texto

end function

strURL = Request.ServerVariables("URL")

strSearch = Request.QueryString("Pesquisa")

%>

<html>

<head>

</head><body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

<table width="779" cellspacing="0" cellpadding="0"></table>

<table>

<tr>

<td valign="top"><div align="left"></div>

<table width="210" height="19" align="center" cellpadding="0" cellspacing="0">

<tr>

<td width="232" height="19" valign="top"><div align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Busca</strong></font></div></td>

</tr>

</table>

<table width="779" border="0" align="center">

<tr>

<td width="147" height="311" valign="top"></td>

<td width="622" valign="top">

<div align="left"> <br>

<div align="left"></div>

<table width="547" border="0" align="left" cellpadding="0" cellspacing="0" bgcolor="#F2FFF2">

<tr>

<td bgcolor="#99ccff"><table width="100%" border="0" cellspacing="2" cellpadding="2">

<tr>

<td bgcolor="#FFFFFF"> <form action="<%= strURL %>" method="get">

<div align="left"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<select name="Tipo" class="unnamed1" id="Tipo">

<option>Usuario Ouro</option>

<option>Usuario Normal</option>

</select>

&nbsp; </font>

<input name="Pesquisa" class="unnamed1" value="<%= strSearch %>" size="30" maxlength="45" />

&nbsp;

<input name="Acao" type="submit" class="unnamed1" value="Pesquisar" />

</div>

</form>

<p align="center">

<% dim tipo

tipo = (request.QueryString("Tipo"))

if strSearch <> "" then

strDBPath = Server.MapPath("Usuarios.mdb")

Const adUseClient = 3

Set cnnSearch = Server.CreateObject("ADODB.Connection")

cnnSearch.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDBPath & ";"

cnnSearch.CursorLocation = adUseClient

if tipo = "Usuario Ouro" then

strSQL = "SELECT * " _

& "FROM Usu_Ouro " _

& "WHERE Nome LIKE '%" & TiraAcento(Replace(strSearch, "'", "''")) & "%' " _

& "ORDER BY Nome;"

end if

if tipo = "Usuario Normal" then

strSQL = "SELECT * " _

& "FROM Usu_Normal " _

& "WHERE Nome LIKE '%" & TiraAcento(Replace(strSearch, "'", "''")) & "%' " _

& "ORDER BY Nome;"

end if

Set rstSearch = cnnSearch.Execute(strSQL)

intContador = rstSearch.RecordCount

%>

<div align="left"><br>

<font size="1" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[

Foram encontradas&nbsp;<b><%=intContador%></b> ocorrências

] <br>

<br>

</font> </div>

<p></p></td>

</tr>

</table>

<%

Do While Not rstSearch.EOF

%>

<div align="center">

<table width="510" height="22" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#FFFFFF">

<tr bgcolor="#FF6600">

<td width="506" height="20" bgcolor="#FFFFFF">&nbsp;

<% response.Write "<font face='Verdana' size='1'><a target='_blank' href=links.asp?ID=" & rstSearch.fields("ID") & ">" & rstSearch.fields("Nome").value%>&nbsp;-&nbsp;</td>

</tr>

</table>

<%

rstSearch.MoveNext

Loop

%>

<div align="left"><br>

<font size="1" face="Verdana, Arial, Helvetica, sans-serif">

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sua

busca foi processada em

<%response.write FormatNumber( Timer - inicio, 2 )%>

segundos.</font> <br>

<%

rstSearch.Close

Set rstSearch = Nothing

cnnSearch.Close

Set cnnSearch = Nothing

end if

%>

</div>

</div></td>

</tr>

</table>

<p>&nbsp;</p>

</div>

</td>

</tr>

</table>

</td>

</tr>

<table width="779" height="45" border="0" align="center">

<tr>

<td height="45" valign="bottom"><div align="center"></div></td>

</tr>

</table>

<table width="779" border="0">

<tr> </tr>

</table>

</body>

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.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152,2k
    • Posts
      652k
×
×
  • Criar Novo...