<%
nombre=""
id_provincia=""
nombre=request("nombre")
id_provincia=request("id_provincia")
if (nombre="" AND id_provincia="") then
%>
O Haga Click
Sobre la Provincia:
|
<%
else
if NOT(isEmpty(nombre)) or nombre<>"" then
consulta="SELECT idcampo,nombre,direccion,cod_postal,localidad,provincia,tlf1,fax,n_hoyos FROM " & tableName & " WHERE nombre LIKE '%" & nombre & "%' ORDER BY nombre"
else if NOT(isEmpty(id_provincia)) or id_provincia<>"" then
consulta="SELECT idcampo,nombre,direccion,cod_postal,localidad,provincia,tlf1,fax,n_hoyos FROM " & tableName & " WHERE id_provincia=" & cInt(id_provincia) & " ORDER BY provincia,nombre"
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
' -----------------------------------------------------------------
idcampo = rs("idcampo")
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"))
n_hoyos = cStr(rs("n_hoyos"))
%>
>
|
<%= nombre %>
<%= direccion %>
<%= cod_postal %>
- <%= localidad %>
( <%= provincia %> )
Tlf: <%= tlf1 %> Fax: <%= fax %>
Nº
de hoyos: <%= n_hoyos %>
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 campo de golf, haga
"click" sobre el texto "Más información" que
acompaña a los datos descriptivos de cada campo.
|
<%
end if
%>
<%
if total>porPagina then
Response.write(" ")
Response.write("Más Campos: ")
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
%>
|