<%@Language ="VBScript"%> <%Response.Buffer = True%> <% 'Conexión a Base de datos fp_conn = "DRIVER={Microsoft Access Driver (*.mdb)}; " & "DBQ=" & Server.Mappath("svpv.mdb") Set fp_db = Server.CreateObject("ADODB.Connection") fp_db.open fp_conn %> SE VENDE previa cita Anuncia tu casa
 
<% SQL_Consulta = "SELECT * FROM datos order by id desc" 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 temp = "" then temp =0 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") ventas=consulta.Fields.Item("ventas") 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 end if else foto ="img/imgnd.jpg" end if %> <% contador_dos = contador_dos + 1 count = count + 1 temp= temp * 1 temp = temp + 1 if not consulta.eof then consulta.movenext end if Loop suma = 10 + count back = temp back = back - suma %>

<%if ventas="venta" then%>SE VENDE<%end if%><%if ventas="renta" then%>SE RENTA<%end if%>
Descripción
<%=descripcion%>
Ubicación
<%=ubicacion%>
Precio
<%=precio%>
[+] Ver detalles

Páginas
<%if temp > 10 then%> se vendeAtras <%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%> Siguientese vende <%end if%>