<%
SQL_Consulta = "SELECT * FROM datos"
Set Consulta = fp_db.Execute(SQL_Consulta)
contador = 0
Do while not Consulta.eof
contador = contador + 1
Consulta.movenext
loop
Set Consulta = fp_db.Execute(SQL_Consulta)
temp = Request.QueryString("temp")
if temp = "" then
temp = Request.form("temp")
end if
if not Consulta.eof then
apuntador = temp
do while apuntador > 0
apuntador = apuntador - 1
Consulta.movenext
loop
end if
Do while not consulta.eof and count<10
id = consulta.Fields.Item("id")
ubicacion = consulta.Fields.Item("ubicacion")
precio=consulta.Fields.Item("precio")
descripcion=consulta.Fields.Item("descripcion")
identificador=consulta.Fields.Item("identificador")
SQL_Consulta_foto = "SELECT * FROM fotos where identificador='"&identificador&"'"
Set Consulta_foto = fp_db.Execute(SQL_Consulta_foto)
if not Consulta_foto.eof then
foto = Consulta_foto.Fields.Item("foto")
if foto<>"" then
foto = "img/"&foto
else
foto ="img/imgnd.jpg"
end if
end if
%>
<%
contador_dos = contador_dos + 1
count = count + 1
temp = temp + 1
if not consulta.eof then
consulta.movenext
end if
Loop
suma = 10 + count
back = temp
back = back - suma
%>
Páginas
<% if temp > 10 then%>
<Atras
<%end if%>
<%If contador <> temp or contador = temp then
contar = 1
For i = 1 To contador Step 10
if contar <> 1 then%>
- <%=contar%>
<%Else
If contador > 10 Then%>
<%=contar%>
<%End if
End if
contar = contar + 1
Next
End If %>
<%If contador > temp Then%>
Siguiente>
<%end if%>