|
|
|
| Hostales en la Costa del Sol |
|
<%
dim location,category,sql,estrellas
if (request.Form("city") = "") then
location=request.QueryString("location")
else
location=request.Form("city")
end if
sql="SELECT * FROM Hostales Where "
'response.Write(sql)
sql=sql + "(Poblacion LIKE '%" + location + "%') "
'response.Write(sql)
%>
<%
'response.Write(sql)
'pagina a mostrar
if request.querystring("paginaactual")<>"" then
mostrarpagina=request.querystring("paginaactual")
else
mostrarpagina=1
end if
'creamos el recordset
set MyRs=Server.CreateObject("ADODB.Recordset")
'creamos la conexion
Set MyConn=Server.CreateObject("ADODB.Connection")
MyConn.Open Application("Conexion")
'abrimos recordset
'Set MyRs=MyConn.Execute(MySQL)
MyRs.Open sql,MyConn,3,3
if MyRs.EOF then
%>
Lo sentimos, esta búsqueda no tiene resultados.
<%
else
'cantidad de registros por pagina
cantidadregistros=20
'definicion de pagesize,pagecount,absolutepage
MyRs.pagesize=cantidadregistros
maxpagina=cint(MyRs.pagecount)
maxregistros=cint(MyRs.pagesize)
MyRs.absolutepage=mostrarpagina
contreg=0
if int(mostrarpagina)<>int(maxpagina) then '-- Si no es la última página.
hasta=mostrarpagina*5
desde=hasta-4
else
hasta=MyRs.recordcount
desde=(maxpagina*5)-4
end if
%>
La manera más fácil de encontrar un hostal en la Costa del Sol.
Hostales en <% response.write(location) %>
<%
do while not MyRs.eof and contreg < maxregistros
%>
<%
categoria=MyRs("Categoria")
categ=Split(categoria,"-")
%>
<%=MyRs("Nombre")%> )%>estrellas.gif)
<%
if CStr(categ(0))="H" then
%>
<%
response.write("(Hostal)")%>
<%
end if
if CStr(categ(0))="HR" then
%>
<%
response.write("(Hostal Residencia)")
%>
<%
end if
if CStr(categ(0))="P" then
%>
<%
response.write("(Pensión)")
%>
<%
end if
%>
<%=MyRs("Direccion")%>
<%=MyRs("Poblacion")%> - <%=MyRs("Provincia")%> Tel: +34 <%=MyRs("Telefono")%>
Fax: +34 <%=MyRs("Fax")%>
|
<%
MyRs.MoveNext
contreg=contreg+1
if not MyRs.EOF then
%>
<%=MyRs("Nombre")%> )%>estrellas.gif)
<%
if CStr(categ(0))="H" then
%>
<%
response.write("(Hostal)")%>
<%
end if
if CStr(categ(0))="HR" then
%>
<%
response.write("(Hostal Residencia)")
%>
<%
end if
if CStr(categ(0))="P" then
%>
<%
response.write("(Pensión)")
%>
<%
end if
%>
<%=MyRs("Direccion")%>
<%=MyRs("Poblacion")%> - <%=MyRs("Provincia")%> Tel: +34 <%=MyRs("Telefono")%>
Fax: +34 <%=MyRs("Fax")%>
|
<%
else
%>
|
<%
end if
%>
<%
if not MyRs.EOF then
MyRs.MoveNext
contreg=contreg+1
end if
loop
%>
<%
if (MyRs.RecordCount >= cantidadregistros) then
cero="0"
nombrescript="searchHostel.asp"
if int(mostrarpagina)<>1 then '--si no es la primer página mostrar botón anterior
ref="[ << ] "
end if
for contador=1 to maxpagina
If contador>9 then
cero=""
end if
ref=ref & " " & cero & contador & ""
else
ref=ref & "'>" & cero & contador & ""
end if
end if
next
if int(mostrarpagina)<>int(maxpagina) then '-- si no es la última página mostrar botón siguiente
ref=ref & " [ >> ]"
end if
response.write ref
end if
end if
'cerramos y destruimos el recordset y la conexion
MyRs.close
Set MyRs = Nothing
MyConn.Close
set MyConn = Nothing
%>
|
 |
|
|
 |
|
|
|
|
 |
| Otras Guías de Viaje relevantes |
|
|
|
|
|
|
 |
|