|
<%
seleccion=true
nombre=""
id_provincia=""
lugar=""
nombre=request("nombre")
id_provincia=request("id_provincia")
lugar=request("lugar")
if nombre="" and id_provincia="" and lugar="" then
seleccion=false
end if
if seleccion=false then
%>

<%
else
if NOT(isEmpty(nombre)) or nombre<>"" then
consulta="SELECT id,nombre,direccion,cod_postal,localidad,provincia,tlf1,fax,num_plazas FROM " & tableName & " WHERE nombre LIKE '%" & nombre & "%' ORDER BY localidad,nombre"
else if NOT(isEmpty(id_provincia)) or id_provincia<>"" then
consulta="SELECT id,nombre,direccion, cod_postal,localidad,provincia,tlf1,fax,num_plazas FROM " & tableName & " WHERE id_provincia=" & id_provincia & " ORDER BY localidad,nombre"
else
consulta="SELECT id,nombre,direccion,cod_postal,localidad,provincia,tlf1,fax,num_plazas FROM " & tableName & " WHERE localidad LIKE '%" & lugar & "%' OR nombre LIKE '%" & lugar & "%' ORDER BY localidad,nombre,provincia"
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
%>
<%
' 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"))
direccion = trim(rs("direccion"))
cod_postal= trim(rs("cod_postal"))
localidad = trim(rs("localidad"))
provincia = trim(rs("provincia"))
tlf1 = trim(rs("tlf1"))
fax = trim(rs("fax"))
num_plazas = cStr(rs("num_plazas"))
%>
>
|
<%= nombre %>
<%= direccion %>
<%= cod_postal %>
- <%= localidad %>
( <%= provincia %> ) Tlf: <%= tlf1 %> Fax: <%= fax %>
Nº
de plazas: <%= num_plazas %>
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 alojamiento rural, haga
"click" sobre el texto "Más información" que
acompaña a los datos descriptivos de cada alojamiento.
|
<%
end if
%>
<%
if total>porPagina then
Response.write(" ")
Response.write("Más Alojamientos: ")
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 "&id_sierra="
Response.write (Server.URLencode(id_sierra))
end if
if id_estac<>"" then
Response.write "&id_estac="
Response.write (Server.URLencode(id_estac))
end if
if id_provincia<>"" then
Response.write "&id_provincia="
Response.write (Server.URLencode(id_provincia))
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 "&id_sierra="
Response.write (Server.URLencode(id_sierra))
end if
if id_estac<>"" then
Response.write "&id_estac="
Response.write (Server.URLencode(id_estac))
end if
if id_provincia<>"" then
Response.write "&id_provincia="
Response.write (Server.URLencode(id_provincia))
end if
Response.write """ target=""_parent"">"
Response.write "Anterior"
Response.write ""
Response.write " "
end if
if (nxt+porPagina-1)"" then
Response.write "&id_sierra="
Response.write (Server.URLencode(id_sierra))
end if
if id_estac<>"" then
Response.write "&id_estac="
Response.write (Server.URLencode(id_estac))
end if
if id_provincia<>"" then
Response.write "&id_provincia="
Response.write (Server.URLencode(id_provincia))
end if
Response.write """ target=""_parent"">"
Response.write "Siguiente"
Response.write ""
Response.write " "
end if
Response.write(" ")
end if
end if
%>
|