<% %> Naturanfitriao <% Session.CodePage=65001 Set objFSO = Server.CreateObject("Scripting.FileSystemObject") Set Conn = Server.CreateObject("ADODB.Connection") Set rs = Server.CreateObject("ADODB.Recordset") Set rsl = Server.CreateObject("ADODB.Recordset") 'rslodging Set rslh = Server.CreateObject("ADODB.Recordset") 'rslodging house Conn.Provider="Microsoft.ACE.OleDb.12.0" Conn.Open Server.MapPath("\DATABASE\NATURANFITRIAO.mdb") function lodgingMenu() sSql = "SELECT * FROM LODGING WHERE LODGING_NAME=LODGING_HOUSE_AL" Set rs = Conn.Execute(sSql) While Not rs.EOF response.Write "
"&rs("LODGING_NAME")&"
" sSql = "SELECT * FROM LODGING WHERE LODGING_NAME='"&rs("LODGING_NAME")&"' AND LODGING_NAME<>LODGING_HOUSE_AL ORDER BY LODGING_HOUSE_AL" Set rsl = Conn.Execute(sSql) While Not rsl.EOF response.Write "
•"&rsl("LODGING_HOUSE_AL")&"
" rsl.MoveNext wend rs.MoveNext wend end function function lodgingList() sSql = "SELECT LODGING_NAME FROM LODGING GROUP BY LODGING_NAME" Set rs = Conn.Execute(sSql) sHTML = "" While Not rs.EOF 'if rs.fields("LODGING_NAME")=request.Form("lodging") then 'sHTML = sHTML & "" 'else sHTML = sHTML & "" 'end if rs.movenext Wend lodgingList = sHTML end function Function housesList() sSql = "SELECT LODGING_NAME FROM LODGING GROUP BY LODGING_NAME ORDER BY LODGING_NAME" Set rsl = Conn.Execute(sSql) sHTML = "" caso = 1 While Not rsl.EOF sHTML = sHTML & "case "&caso&":" sSql = "SELECT * FROM LODGING WHERE LODGING_NAME = '"&rsl.fields("LODGING_NAME")&"' AND LODGING_NAME<>LODGING_HOUSE_AL ORDER BY LODGING_NAME" Set rslh = Conn.Execute(sSql) While Not rslh.EOF if rslh.fields("LODGING_HOUSE_AL")=request.form("house") then sHTML = sHTML & "conteudo=conteudo+"""";" else sHTML = sHTML & "conteudo=conteudo+"""";" end if rslh.movenext Wend sHTML = sHTML & "break;" caso = caso + 1 rsl.movenext Wend housesList = sHTML End Function %>

<%=lodgingMenu()%>
<%Dim pageMenu pageMenu = Request.QueryString("pag") Select Case pageMenu 'Case "" %> <% case "naturanfitriao-alojamento-alentejo.asp" %> <% case "naturanfitriao-alentejo.asp" %> <% case "naturanfitriao-reserva.asp" %> <% case "naturanfitriao-contactos.asp" %> <%End Select%>
<% rsl.close rslh.close Conn.close %>