Jump to content
Fórum Script Brasil
  • 0

Chacal Downloads


Guest --Flavio --
 Share

Question

Guest --Flavio --

eu to usando o chacal donwloads e ta me dando um erro. quando eu faço a busca, e coloco pra abri a pagina 2 ("pagina(s):1 2") ele abre outra fez pra buacar.

<!--#include file="conectar.asp"-->
<html>
<head>
<title>CCC</title>
<style>
input {
background-color: #0688B9;
font-family: Verdana;
font-size: 9pt;
color: #FFFFFF;
border: 1px solid #FFFFFF;
vertical-align: middle
}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head>
<body bgcolor="#FFFFFF" link="#000000" vlink="#000000" alink="#73BCF2">
<font face="Verdana" size="2">
<font size="1">
<font color="#000000">
<script language="JavaScript">
function abrejanela(sURL){
newwindow=open(sURL,"ver","scrollbars=no,toolbar=no,directories=no,menubar=no,resizable=no,status=no,width=320,height=60");
}
//
</script>
<% AbreConexao
If Request.querystring("a") = "1" Then
s=request.querystring("s")
regs=5
pag=request.querystring("pagina")

If pag = "" then
pag = 1
End if

Sql = "SELECT * FROM download WHERE nome LIKE '%"&s&"%' OR descricao LIKE '%"&s&"%' "

Set rs = Createobject("ADODB.recordset")
set Rs.ActiveConnection = Conexao
rs.cursortype = 3 
rs.pagesize = regs
rs.Open SQL
if rs.EOF then%>
Nenhum arquivo encontrado, na busca pela palavra <b><%=s%></b></font></font><font color="#000000" size="1" face="verdana">
<% else
rs.Absolutepage = pag
contador = 0 %>
Foram encontrados <%=rs.recordcount%> arquivos, na busca pela palavra <b><%=s%></b><BR>
<BR>
</font><font face="Verdana" size="2"><font color="#000000"><font face="Verdana" size="2">
<% Do While Not rs.EOF AND contador < rs.Pagesize
nome=replace(rs("nome"), ""&s&"", "<font color=red><b>"&s&"</font></b>")
nome=replace(rs("nome"), ""&s&"", "<b><font color=red>"&s&"</b></font>")
contador = contador +1 %>
</font></font></font>
<div align="center">  
  <table width="547" border="1" cellpadding="3" cellspacing="0" bordercolor="#2FFF2F" bordercolorlight="#FFFFFF">
    <tr bordercolor="#FFFFFF">
      <td height="20" colspan="3" background="img/x1.jpg"><font color="#000000" size="1" face="verdana"><a href="download.asp?id=<%=rs("id")%>"><%=rs("nome")%></a></font>
        <div align="center"></div>        <div align="center">
          <div align="left"><font size="1"><font face="verdana"><font face="verdana"><font face="verdana"><font face="verdana"></font></font></font></font></font></div>
        </div>
      </td>
    </tr>
    <tr>
      <td height="116" colspan="3" bgcolor="#FFFFFF"><table width="100%" height="108">
          <tr bordercolor="#CCCCCC">
            <td width="21%" height="102"><div align="center"><font color="#000000"><img src="<%=rs("foto") %>" width="95" height="95" border="0"></font></div>
            </td>
            <td width="79%"><p><font color="#000000" size="1" face="verdana"><%=rs("descricao")%></font> </p>
                <p>&nbsp;</p>
                <p>&nbsp;</p>
                <div align="center"> </div>
            </td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td bgcolor="#FFFFFF"><font color="#000000" size="1" face="verdana">Tamanho: <%=rs("tamanho")%></font></td>
      <td colspan="2" bgcolor="#FFFFFF"><font color="#A8E6FD" size="1"><font size="1" color="#FFFFFF"><font color="#A8E6FD" size="1"><font size="1" color="#FFFFFF"><font color="#000000" size="1" face="verdana">Licença: <%=rs("licenca")%> </font><font color="#000000" face="Verdana, Arial, Helvetica, sans-serif"><font size="1" face="verdana">&nbsp;&nbsp;&nbsp;&nbsp;</font></font></font></font></font></font></td>
    </tr>
    <tr>
      <td bgcolor="#FFFFFF"><font color="#000000" size="1" face="verdana">Adicionado
          em: <%=rs("adicionado")%></font></td>
      <td colspan="2" bgcolor="#FFFFFF"><font color="#000000" size="1" face="verdana">Sistema</font><font color="#000000" size="1" face="verdana">: <%=rs("idioma")%></font><font color="#A8E6FD" size="1"><font size="1" color="#FFFFFF"><font color="#A8E6FD" size="1"><font size="1" color="#FFFFFF"></font></font></font></font></td>
    </tr>
    <tr>
      <td width="251" height="26" background="img/x2.jpg" bgcolor="#FFFFFF"><font color="#A8E6FD" size="1"><font size="1" color="#FFFFFF"><font color="#A8E6FD" size="1"><font size="1" color="#FFFFFF"> </font></font></font></font><font color="#A8E6FD" size="1"><font size="1" color="#FFFFFF"><font color="#A8E6FD" size="1"><font size="1" color="#FFFFFF"><font color="#000000" face="Verdana, Arial, Helvetica, sans-serif"><font size="1" face="verdana">Média
                    de votos: <%=rs("media")%> <a href="java script:abrejanela('voto.asp?id=<%=rs("id")%>')">Avaliar</a></font></font></font></font></font></font></td>
      <td colspan="2" background="img/x2.jpg" bgcolor="#FFFFFF">
        <div align="left">
          <div align="left"><font size="1" face="verdana"><font color="#000000">Cliques: </font></font><font color="#A8E6FD" size="1" face="verdana"><%=rs("cliques")%></font></div>
        </div>
      </td>
    </tr>
  </table>
  <font color="#000000"><font color="#000000" size="1" face="verdana"><BR>
  <% rs.MoveNext
Loop %>

  <br>
  <font size="1" face="Verdana">Página(s):
  <% For i = 1 To rs.PageCount
If i = cint(pag) Then
Response.Write i
Else
pagina=request.querystring("pagina")  
Response.Write "<a href='" & request.servervariables("script_name") & "?pagina="&pagina&"&pagina=" & i & "'>" & i & "</a> "
End If

Next

End if %>
</font></font></div>
</font>
<form method="GET" action="busca.asp">
  <div align="right"><font color="#000000" size="2" face="Verdana">    <div align="center">
      <input type="hidden" name="a" value="1">
      <input type="text" name="s" size="15" value="Buscar por"> 
      <input type="submit" value="Buscar">
    </div>
  </font>
  </div>
</form>
<font face="Verdana" size="2"><font color="#000000" size="1" face="verdana">
<% Else %>
</font><font face="verdana"><form method="GET" action="busca.asp">
  <font color="#000000">  <font size="1">  <font face="verdana">  <input type="hidden" name="a" value="1">
  <input type="text" name="s" size="30" value="Buscar por"> 
  <input type="submit" value="Buscar">
  </font></font></font>
</form>
<font color="#000000" size="1" face="verdana">
<% End If %>
</font></font></font>
<p><font color="#000000" size="1" face="verdana">
<font face="Verdana"></font>
  <center>
  </center>

</body>
</html>

Está aí o codigo se alguém pode ajuda, Agradeço muito

Link to comment
Share on other sites

11 answers to this question

Recommended Posts

  • 0

experimente neste trecho mudar de

For i = 1 To rs.PageCount
If i = cint(pag) Then
Response.Write i
Else
pagina=request.querystring("pagina")  
Response.Write "<a href='" & request.servervariables("script_name") & "?pagina="&pagina&"&pagina=" & i & "'>" & i & "</a> "
End If

Next
para
For i = 1 To rs.PageCount
If i = cint(pag) Then
Response.Write i
Else
pagina=request.querystring("pagina")  
Response.Write "<a href='" & request.servervariables("script_name") & "?pagina="&pag&"&s="&s&"&a="&request.querystring("a")&"&pagina=" & i & "'>" & i & "</a> "
End If

Next

Link to comment
Share on other sites

  • 0
Guest Visitante

eu tentei o que você disse deu esse erro:

Provider error '80020005' 

Type mismatch. 

/scripts/xdown/busca.asp, line 46
line 46:
45 - <% else
46 - rs.Absolutepage = pag
47 - contador = 0 %>
48 - Foram encontrados <%=rs.recordcount%> arquivos, na busca pela palavra <b><%=s%></b><BR>
49 - <BR>

Link to comment
Share on other sites

  • 0
Guest --Flavio --

esse e o exibir.asp > as pagina(s): 1 2 3 elas abre.

<!--#include file="conectar.asp"-->
<html>
<head>
<title>Chacal</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head>
<body text="#000000" link="#000000" vlink="#000000" alink="#000000">
&lt;script language="JavaScript">
function abrejanela(sURL){
newwindow=open(sURL,"ver","scrollbars=no,toolbar=no,directories=no,menubar=no,resizable=no,status=no,width=320,height=60");
}
//
</script>
<font face="Verdana">
<% AbreConexao
cat = request.querystring("cat")
If cat = "" Then 
%>
<div align="center">
  <table border="1" cellpadding="3" cellspacing="0" width="421" bordercolorlight="#FFFFFF">
    <tr>
      <td height="20" background="img/n5.PNG" bgcolor="#FF9900">
        <p align="center"><font color="#000000" size="1" face="verdana">Escolha a categoria</font></p>
      </td>
    </tr>
        <tr>
        <td width="411" bgcolor="#FFFFFF"><font size="1" face="verdana"><font color="#000000">
<%Sql = "SELECT * FROM categorias ORDER BY id"
Set rs = Conexao.Execute(Sql)
If rs.EOF Then %>
Nenhuma categoria encontrada!
<% Else
While not rs.EOF %>
        <a href="exibir.asp?cat=<%=rs("id")%>"><%=rs("nome")%></a><BR>
        <% rs.MoveNext
Wend
rs.close
End If
Set rs = nothing %>
        </font></td>
    </tr>
  </table>
</div>

<font color="#000000" size="1" face="verdana">
<% else %>
<% regs = 5
pag = request.querystring("pagina")
If pag = "" Then
   pag = 1
End If %>

<% Set rs = Createobject("ADODB.recordset")
set Rs.ActiveConnection = Conexao
rs.cursortype = 3 
rs.pagesize = regs
Sql = "SELECT * FROM download WHERE categoria = "& cat &" ORDER BY nome"
rs.Open SQL
if rs.EOF then%>
<font color="#FF0000">Nenhum arquivo encontrado nessa categoria! Aguarde...</font>
<% else
rs.Absolutepage = pag
contador = 0

Do While Not rs.EOF AND contador < rs.Pagesize
contador = contador +1 %>
</font>
<div align="center">
  <table width="547" border="1" cellpadding="3" cellspacing="0" bordercolor="#2FFF2F" bordercolorlight="#FFFFFF">
    <tr bordercolor="#2FFF2F">
      <td height="20" colspan="3" background="img/x1.jpg"><div align="left"><font color="#000000" size="1" face="verdana"><a href="download.asp?id=<%=rs("id")%>"><%=rs("nome")%></a></font></div>        <div align="center">
          <div align="left"><font size="1"><font face="verdana"><font face="verdana"><font face="verdana"><font face="verdana"></font></font></font></font></font></div>
        </div></td>
    </tr>
    <tr>
      <td height="111" colspan="3" bgcolor="#FFFFFF"><table width="100%" height="101">
        <tr bordercolor="#CCCCCC">
          <td width="21%" height="97"><div align="center"><font color="#000000"><img src="<%=rs("foto") %>" width="95" height="95" border="0"></font></div></td>
          <td width="79%"><p><font color="#000000" size="1" face="verdana"><%=rs("descricao")%></font></p>
            <p> </p>
            <div align="center"> </div></td>
        </tr>
      </table></td>
    </tr>
    <tr>
      <td bgcolor="#FFFFFF"><font color="#000000" size="1" face="verdana">Tamanho: <%=rs("tamanho")%></font></td>
      <td width="270" colspan="2" bgcolor="#FFFFFF"><font color="#A8E6FD" size="1"><font size="1" color="#FFFFFF"><font color="#A8E6FD" size="1"><font size="1" color="#FFFFFF"><font color="#000000" size="1" face="verdana">Licença: <%=rs("licenca")%> </font><font color="#000000" face="Verdana, Arial, Helvetica, sans-serif"><font size="1" face="verdana">    </font></font></font></font></font></font></td>
    </tr>
    <tr>
      <td bgcolor="#FFFFFF"><font color="#000000" size="1" face="verdana">Adicionado
      em: <%=rs("adicionado")%></font></td>
      <td colspan="2" bgcolor="#FFFFFF"><font color="#000000" size="1" face="verdana">Sistema</font><font color="#000000" size="1" face="verdana">: <%=rs("idioma")%></font><font color="#A8E6FD" size="1"><font size="1" color="#FFFFFF"><font color="#A8E6FD" size="1"><font size="1" color="#FFFFFF"></font></font></font></font></td>
    </tr>
    <tr>
      <td width="259" height="26" background="img/x2.jpg" bgcolor="#FFFFFF"><font color="#A8E6FD" size="1"><font size="1" color="#FFFFFF"><font color="#A8E6FD" size="1"><font size="1" color="#FFFFFF"> </font></font></font></font><font color="#A8E6FD" size="1"><font size="1" color="#FFFFFF"><font color="#A8E6FD" size="1"><font size="1" color="#FFFFFF"><font color="#000000" face="Verdana, Arial, Helvetica, sans-serif"><font size="1" face="verdana">Média
      de votos: <%=rs("media")%> <a href="java script:abrejanela('voto.asp?id=<%=rs("id")%>')">Avaliar</a></font></font></font></font></font></font></td>
      <td colspan="2" background="img/x2.jpg" bgcolor="#FFFFFF">      <div align="left">
        <div align="left"><font size="1" face="verdana"><font color="#000000">Cliques: </font></font><font color="#A8E6FD" size="1" face="verdana"><%=rs("cliques")%></font></div>
      </div></td>
    </tr>
  </table>
</div>
<center>
<p><font color="#000000"><% rs.MoveNext
Loop %>
  <br>
  <font size="1" face="Verdana">Página(s):
  <% For i = 1 To rs.PageCount
If i = cint(pag) Then
Response.Write i
Else
cat=request.querystring("cat")
Response.Write "<a href='" & request.servervariables("script_name") & "?cat="&cat&"&pagina=" & i & "'>" & i & "</a> "
End If

Next

rs.close
FechaConexao
Set rs = nothing 
end if
end if%>
  </font></font></p>
<p> </p>
</center>
</body>
</html>

Link to comment
Share on other sites

  • 0
Guest --Flavio --

a busca.asp deu certo, ela abrem as pagina certo. Mais deu um erro, quando coloca uma palavra que o db não tiver dá esse erro:

erro:

ADODB.Recordset error '800a0bcd' 

Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record. 

/scripts/xdown/busca.asp, line 45
Busca.asp
<!--#include file="conectar.asp"-->
<html>
<head>
<title> xxxxxxxxxxxx </title>
<style>
input {
background-color: #0688B9;
font-family: Verdana;
font-size: 9pt;
color: #FFFFFF;
border: 1px solid #FFFFFF;
vertical-align: middle
}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head>
<body bgcolor="#FFFFFF" link="#000000" vlink="#000000" alink="#73BCF2">
<font face="Verdana" size="2">
<font size="1">
<font color="#000000">
<script language="JavaScript">
function abrejanela(sURL){
newwindow=open(sURL,"ver","scrollbars=no,toolbar=no,directories=no,menubar=no,resizable=no,status=no,width=320,height=60");
}
//
</script>
<% AbreConexao
If Request.querystring("a") = "1" Then
s=request.querystring("s")
regs=5
pag=request.querystring("pagina")

If pag = "" then
pag = 1
End if

Sql = "SELECT * FROM download WHERE nome LIKE '%"&s&"%' OR descricao LIKE '%"&s&"%' "

Set rs = Createobject("ADODB.recordset")



rs.Open SQL, Conexao, 3
 rs.CacheSize = regs

  rs.MoveFirst
  rs.PageSize =regs


  rs.AbsolutePage = pag
if rs.EOF then

  %>
Nenhum arquivo encontrado, na busca pela palavra <b><%=s%></b></font></font><font color="#000000" size="1" face="verdana">
<% else
contador = 0 %>
Foram encontrados <%=rs.recordcount%> arquivos, na busca pela palavra <b><%=s%></b><BR>
<BR>
</font><font face="Verdana" size="2"><font color="#000000"><font face="Verdana" size="2">
<% Do While Not rs.EOF AND contador < rs.Pagesize
nome=replace(rs("nome"), ""&s&"", "<font color=red><b>"&s&"</font></b>")
nome=replace(rs("nome"), ""&s&"", "<b><font color=red>"&s&"</b></font>")
contador = contador +1 %>
</font></font></font>
<div align="center">
  <table width="547" border="1" cellpadding="3" cellspacing="0" bordercolor="#2FFF2F" bordercolorlight="#FFFFFF">
    <tr bordercolor="#FFFFFF">
      <td height="20" colspan="3" background="img/x1.jpg"><font color="#000000" size="1" face="verdana"><a href="download.asp?id=<%=rs("id")%>"><%=rs("nome")%></a></font>
        <div align="center"></div>        <div align="center">
          <div align="left"><font size="1"><font face="verdana"><font face="verdana"><font face="verdana"><font face="verdana"></font></font></font></font></font></div>
        </div>
      </td>
    </tr>
    <tr>
      <td height="116" colspan="3" bgcolor="#FFFFFF"><table width="100%" height="108">
          <tr bordercolor="#CCCCCC">
            <td width="21%" height="102"><div align="center"><font color="#000000"><img src="<%=rs("foto") %>" width="95" height="95" border="0"></font></div>
            </td>
            <td width="79%"><p><font color="#000000" size="1" face="verdana"><%=rs("descricao")%></font> </p>
                <p>&nbsp;</p>
                <p>&nbsp;</p>
                <div align="center"> </div>
            </td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td bgcolor="#FFFFFF"><font color="#000000" size="1" face="verdana">Tamanho: <%=rs("tamanho")%></font></td>
      <td colspan="2" bgcolor="#FFFFFF"><font color="#A8E6FD" size="1"><font size="1" color="#FFFFFF"><font color="#A8E6FD" size="1"><font size="1" color="#FFFFFF"><font color="#000000" size="1" face="verdana">Licença: <%=rs("licenca")%> </font><font color="#000000" face="Verdana, Arial, Helvetica, sans-serif"><font size="1" face="verdana">&nbsp;&nbsp;&nbsp;&nbsp;</font></font></font></font></font></font></td>
    </tr>
    <tr>
      <td bgcolor="#FFFFFF"><font color="#000000" size="1" face="verdana">Adicionado
          em: <%=rs("adicionado")%></font></td>
      <td colspan="2" bgcolor="#FFFFFF"><font color="#000000" size="1" face="verdana">Sistema</font><font color="#000000" size="1" face="verdana">: <%=rs("idioma")%></font><font color="#A8E6FD" size="1"><font size="1" color="#FFFFFF"><font color="#A8E6FD" size="1"><font size="1" color="#FFFFFF"></font></font></font></font></td>
    </tr>
    <tr>
      <td width="251" height="26" background="img/x2.jpg" bgcolor="#FFFFFF"><font color="#A8E6FD" size="1"><font size="1" color="#FFFFFF"><font color="#A8E6FD" size="1"><font size="1" color="#FFFFFF"> </font></font></font></font><font color="#A8E6FD" size="1"><font size="1" color="#FFFFFF"><font color="#A8E6FD" size="1"><font size="1" color="#FFFFFF"><font color="#000000" face="Verdana, Arial, Helvetica, sans-serif"><font size="1" face="verdana">Média
                    de votos: <%=rs("media")%> <a href="java script:abrejanela('voto.asp?id=<%=rs("id")%>')">Avaliar</a></font></font></font></font></font></font></td>
      <td colspan="2" background="img/x2.jpg" bgcolor="#FFFFFF">
        <div align="left">
          <div align="left"><font size="1" face="verdana"><font color="#000000">Cliques: </font></font><font color="#A8E6FD" size="1" face="verdana"><%=rs("cliques")%></font></div>
        </div>
      </td>
    </tr>
  </table>
  <font color="#000000"><font color="#000000" size="1" face="verdana"><BR>
  <% rs.MoveNext
Loop %>

  <br>
  <font size="1" face="Verdana">Página(s):
  <% For i = 1 To rs.PageCount
If i = cint(pag) Then
Response.Write i
Else
pagina=request.querystring("pagina")
Response.Write "<a href='" & request.servervariables("script_name") & "?s="&s&"&a="&request.querystring("a")&"&pagina=" & i & "'>" & i & "</a> "
End If

Next

End if %>
</font></font></div>
</font>
<form method="GET" action="busca.asp">
  <div align="right"><font color="#000000" size="2" face="Verdana">    <div align="center">
      <input type="hidden" name="a" value="1">
      <input type="text" name="s" size="15" value="Buscar por">
      <input type="submit" value="Buscar">
    </div>
  </font>
  </div>
</form>
<font face="Verdana" size="2"><font color="#000000" size="1" face="verdana">
<% Else %>
</font><font face="verdana"><form method="GET" action="busca.asp">
  <font color="#000000">  <font size="1">  <font face="verdana">  <input type="hidden" name="a" value="1">
  <input type="text" name="s" size="30" value="Buscar por">
  <input type="submit" value="Buscar">
  </font></font></font>
</form>
<font color="#000000" size="1" face="verdana">
<% End If %>
</font></font></font>
<p><font color="#000000" size="1" face="verdana">
<font face="Verdana"></font>
  <center>
  </center>

</body>
</html>

Obrigado pela atenção

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



  • Forum Statistics

    • Total Topics
      150.2k
    • Total Posts
      647.5k
×
×
  • Create New...