|
|
<%
if seleccion=false then
%>

<%
else
if poblacion<>"" then
if n_estrellas<>"" then
consulta="SELECT id,nombre,estrellas,direccion,poblacion,provincia,telefono,fax,temporada_alta FROM " & tableName & " WHERE (( poblacion LIKE '%" & poblacion & "%' OR provincia LIKE '%" & poblacion & "%') AND estrellas>=" & cInt(n_estrellas) & " ) ORDER BY estrellas DESC,poblacion,nombre ASC"
else
consulta="SELECT id,nombre,estrellas,direccion,poblacion,provincia,telefono,fax,temporada_alta FROM " & tableName & " WHERE ( poblacion LIKE '%" & poblacion & "%' or provincia LIKE '%" & poblacion & "%') ORDER BY estrellas DESC ,poblacion,nombre ASC"
end if
else if id_provincia<>"0" then
if n_estrellas<>"" then
consulta="SELECT id,nombre,estrellas,direccion,poblacion,provincia,telefono,fax,temporada_alta FROM " & tableName & " WHERE ( id_provincia=" & id_provincia & " AND estrellas>=" & cInt(n_estrellas) & ") ORDER BY estrellas DESC ,poblacion,nombre ASC"
else
consulta="SELECT id,nombre,estrellas,direccion,poblacion,provincia,telefono,fax,temporada_alta FROM " & tableName & " WHERE id_provincia=" & id_provincia & " ORDER BY estrellas DESC ,poblacion,nombre ASC"
end if
end if
end if
rs.Open consulta, conn, 1,3
if rs.eof then
Response.write("No hay registros para esa consulta. Inténtelo con otra opción. ")
Response.write("¡GRACIAS!")
else
total=rs.recordcount
' si no se pasa ningún parámetro "start" se utiliza 1
if request("start")="" then
start=1
else
start=cint(request("start"))
end if
rs.move start - 1
%>
| CAMPINGS
<%
if n_estrellas<>"" then
response.write "A PARTIR DE " & n_estrellas & " ESTRELLAS "
end if
if request("poblacion")<>"" then
response.write " EN " & request("poblacion")
else
if request("id_provincia")<>"" then
response.write " EN " & rs("provincia") & ""
end if
end if
%>
|
<%
' INICIO DE LA SECCIÓN EN LA QUE INCLUIR LA EXPOSICIÓN DE LOS CAMPOS CONSULTADOS
'----------------------------------------------------------------------------
tableColor=0
counter=0
for row=start to start + (porPagina -1)
counter=counter+1
if rs.eof then exit for
' SECCIÓN EN LA QUE INCLUIR LA EXPOSICIÓN DE LOS CAMPOS CONSULTADOS
' -----------------------------------------------------------------
id = rs("id")
nombre = trim(rs("nombre"))
estrellas = rs("estrellas")
direccion = trim(rs("direccion"))
poblacion = trim(rs("poblacion"))
provincia = trim(rs("provincia"))
telefono = trim(rs("telefono"))
fax = trim(rs("fax"))
temporada_alta= trim(rs("temporada_alta"))
%>
>
|
<%= nombre %>
<%
for i=1 to estrellas
response.write " "
next
select case estrellas
case 1: response.write " 3º Cat."
case 2: response.write " 2º Cat."
case 3: response.write " 1º Cat."
end select
%>
<%= direccion %>
- <%= poblacion %>
( <%= provincia %> ) Tlf: <%= telefono %>
Temporada Alta: <%= temporada_alta %>
Más información
|
<%
' FIN DE LA SECCIÓN EN LA QUE INCLUIR LA EXPOSICIÓN DE LOS CAMPOS CONSULTADOS
'----------------------------------------------------------------------------
nxt=start
rs.MoveNext
next
set rs = nothing
'cerrar conexión
conn.close
set conn=nothing
%>
|
Si
desea una información más detallada de cualquier camping, haga
"click" sobre el texto "Más información" que
acompaña a los datos descriptivos de cada camping.
|
<%
end if
%>
<%
if total>porPagina then
Response.write(" ")
Response.write("Más Campings: ")
hits=0
for n=1 to total step porPagina
if n<>1 then response.write " - "
hits = hits + 1
if hits<>cint(request("p")) then
' escribe un link que llamará de nuevo a esta página
Response.write (""" then
Response.write "&poblacion="
Response.write (Server.URLencode(trim(request("poblacion"))))
end if
if id_provincia<>"" then
Response.write "&id_provincia="
Response.write (Server.URLencode(id_provincia))
end if
if n_estrellas<>"" then
Response.write "&estrellas="
Response.write (Server.URLencode(n_estrellas))
end if
Response.write """ target=""_parent"">"
Response.write hits
else
Response.write("")
Response.write hits
Response.write("")
end if
Response.write ""
Response.write " "
next
if nxt<>1 then
' escribe un link que llamará de nuevo a esta página
Response.write (""" then
Response.write "&poblacion="
Response.write (Server.URLencode(trim(request("poblacion"))))
end if
if id_provincia<>"" then
Response.write "&id_provincia="
Response.write (Server.URLencode(id_provincia))
end if
if n_estrellas<>"" then
Response.write "&estrellas="
Response.write (Server.URLencode(n_estrellas))
end if
Response.write """ target=""_parent"">"
Response.write "Anterior"
Response.write ""
Response.write " "
end if
if (nxt+porPagina-1)"" then
Response.write "&poblacion="
Response.write (Server.URLencode(trim(request("poblacion"))))
end if
if id_provincia<>"" then
Response.write "&id_provincia="
Response.write (Server.URLencode(id_provincia))
end if
if n_estrellas<>"" then
Response.write "&estrellas="
Response.write (Server.URLencode(n_estrellas))
end if
Response.write """ target=""_parent"">"
Response.write "Siguiente"
Response.write ""
Response.write " "
end if
Response.write(" ")
end if
end if
%>
|