<%
tipoInmueble=Request.form("tipoInmueble")
if tipoInmueble="" then
tipoInmueble=Request.QueryString("tipoInmueble")
end if
ventaRenta=Request.form("ventaRenta")
if ventaRenta="" then
ventaRenta=Request.QueryString("ventaRenta")
end if
minimo=Request.form("minimo")
if minimo="" then
minimo=Request.QueryString("minimo")
end if
maximo=Request.form("maximo")
if maximo="" then
maximo=Request.QueryString("maximo")
end if
municipio=Request.form("municipio")
if municipio="" then
municipio=Request.QueryString("municipio")
end if
colonia=Request.form("colonia")
if colonia="" then
colonia=Request.QueryString("colonia")
end if
strSQL = "SELECT * FROM datos"
if tipoInmueble <> "Seleccione tipo" or ventaRenta <> "Seleccione precio" or minimo <> "Seleccione precio" or maximo <> "Seleccione precio" or municipio <> "Seleccione Municipio" or colonia <> "Seleccione Colonia" then
strSQL = "SELECT * FROM datos where "
if tipoInmueble <> "Seleccione tipo" then
StrSQL = strSQL & " tipo='" &tipoInmueble&"' and "
end if
if ventaRenta <> "" then
StrSQL = strSQL & " ventas='" &ventaRenta&"' and "
end if
if minimo <> "Seleccione precio" then
StrSQL = strSQL & " precio='" &minimo&"' and "
end if
if maximo <> "Seleccione precio" then
StrSQL = strSQL & " precio='" &maximo&"' and "
end if
if municipio <> "Seleccione Municipio" then
StrSQL = strSQL & " municipio='" &municipio&"' and "
end if
if colonia <> "Seleccione Colonia" then
StrSQL = strSQL & " colonia='" &colonia&"'"
else
'quitar and
cadena = len(strSQL)
strSQL = Mid(strSQL, 1 , cadena - 4)
end if
end if
StrSQL = strSQL & " order by id"
'response.write strSQL
Set Consulta = fp_db.Execute(strSQL)
contador = 0
Do while not Consulta.eof
contador = contador + 1
Consulta.movenext
loop
%>
<%
Set Consulta = fp_db.Execute(strSQL)
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")
foto1=consulta.Fields.Item("foto1")
if foto1<>"" then
foto1 = "/img/"&foto1
else
foto1 ="/img/imgnd.jpg"
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%>
Av. Manuel Avila Camacho # 3340 Local B-2
C.P. 45160 Zapopan,
Jal.
Tels. Fax 3563-88-68