<%
ci=request("ci")
ca=request("ca")
sd=request("sd")
'Se crea RecordSet Finanzas
Set RS = Server.CreateObject("ADODB.RecordSet")
'Se crea instancia del objeto conexion
Set conexion = Server.CreateObject("ADODB.Connection")
'Se Abre Conexion con la cadena del Global.asa
conexion.Open Application("info_ConnectionString")
cadSQL= "SELECT * FROM ad_ciudades where id=" & ci
rs.open CadSQL,conexion,3
ciudad=rs("nombre")
rs.close
cadSQL= "SELECT * FROM ad_espacios_tipos where id=" & ca
rs.open CadSQL,conexion,3
categoria=rs("nombre")
rs.close
if sd then
sdc=" and vendido=false"
end if
cadSQL= "SELECT * FROM ad_espacios where ciudad=" & ci & " and categoria=" & ca & sdc & " order by calle asc"
rs.open CadSQL,conexion,3
mypage=request("pag")
if mypage="" then mypage=1
mypagesize=10
if not rs.eof then
Rs.pagesize=mypagesize
maxpages=cint(Rs.pagecount)
maxrecs=cint(Rs.pagesize)
Rs.absolutepage=mypage
End if
function paginacion()
FOR i=1 to maxpages
if i=int(mypage) then
clase ="
" & i &" "
else
clase="
" & i &" "
end if
response.write clase
NEXT
end function
query=Request.ServerVariables("QUERY_STRING")
function sigpag()
if int(mypage) < int(maxpages) then response.write "
Siguiente"
end function
function antpag()
if int(mypage) > 1 then response.write "
Anterior"
end function
%>
<% if not rs.EOF Then %>
<%
for i=1 to 10
if not Rs.EOF then
if (i mod 2) = 1 then
%>
<% End if %>
<% if (i mod 2) > 0 then
%>
<% Else
%>
<% End if
rs.movenext
End if
NexT
%>
<% End if
%>
<%=antpag%><%=paginacion%><%=sigpag%>