<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% Set Conn = Server.CreateObject("ADODB.Connection") Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("../../database/budgetairlines.mdb") %> <% set rsAirlines = Server.CreateObject("ADODB.Recordset") rsAirlines.ActiveConnection = Conn rsAirlines.Source = "SELECT airline_id, airline_name FROM airlines ORDER BY airline_name" rsAirlines.Open() %> Budget Airline Hotels - Hotels in Budget Airline Destinations - Hotels by Phone
Hotels By Phone, Worldwide Discount Hotel Bookings

Budget Airline Hotels

Choose your airline operator from the list:    

<% rsAirlines.MoveFirst() While (NOT rsAirlines.BOF) AND (NOT rsAirlines.EOF) %> "><%= rsAirlines("airline_name") %>     <% rsAirlines.MoveNext() Wend rsAirlines.MoveFirst() %>

Or, if you know the name of your destination, choose the first letter:
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

   
<% While (NOT rsAirlines.BOF) AND (NOT rsAirlines.EOF) Set rsDestSet = Server.CreateObject("ADODB.Recordset") rsDestSet.ActiveConnection = Conn rsDestSet.Source = "SELECT destinations.dest_id, destination, url, subheader FROM airline_dests, destinations WHERE airline_dests.airline_id = " & rsAirlines("airline_id") & " AND airline_dests.dest_id = destinations.dest_id ORDER BY destination" rsDestSet.Open() %>
<%= rsAirlines("airline_name") %>">
<% dim no_dests, no_per_col, no_rem, sub_dest_loop no_dests = 0 While (NOT rsDestSet.BOF) AND (NOT rsDestSet.EOF) no_dests = no_dests + 1 if rsDestSet("subheader") = "True" then Set rsSubDest = Server.CreateObject("ADODB.Recordset") rsSubDest.ActiveConnection = Conn rsSubDest.Source = "SELECT subdest_id, dest_id FROM subdestinations WHERE subdestinations.dest_id = " & rsDestSet("dest_id") rsSubDest.Open() while (NOT rsSubDest.BOF) AND (NOT rsSubDest.EOF) no_dests = no_dests + 1 rsSubDest.MoveNext() wend rsSubDest.Close() set rsSubDest = nothing end if rsDestSet.MoveNext() Wend %> <% no_per_col = no_dests \ 4 no_rem = no_dests mod 4 rsDestSet.MoveFirst() %> <% sub_dest_loop = False for i=1 to 4 j = no_per_col if no_rem>0 then j = j+1 no_rem = no_rem-1 end if %> <% next %>
<% while j>0 and not rsDestSet.EOF if rsDestSet("subheader") = "True" then if not sub_dest_loop then Response.Write("" & rsDestSet("destination") & " Hotels:
") j=j-1 Set rsSubDest = Server.CreateObject("ADODB.Recordset") rsSubDest.ActiveConnection = Conn rsSubDest.Source = "SELECT dest_id, subdestination, url FROM subdestinations WHERE subdestinations.dest_id = " & rsDestSet("dest_id") & " ORDER BY subdestination" rsSubDest.Open() sub_dest_loop = True else if rsSubDest("url") <>"" then %> • "><%= rsSubDest("subdestination") %> Hotels
<% else Response.Write("• " & rsSubDest("subdestination") & " Hotels
") end if j=j-1 rsSubDest.MoveNext() end if if (rsSubDest.EOF) then rsDestSet.MoveNext() sub_dest_loop = False rsSubDest.Close() set rsSubDest = nothing end if else if rsDestSet("url") <>"" then %> "><%= rsDestSet("destination") %> Hotels
<% else Response.Write(rsDestSet("destination") & " Hotels
") end if j=j-1 rsDestSet.MoveNext() end if wend %>

<% rsDestSet.Close() Set rsDestSet = Nothing rsAirlines.MoveNext() Wend %>

Destinations in Alphabetical Order    

Choose from the list:
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

   

<% dim alphabet alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" for i = 1 to 23 set rsLetDest = Server.CreateObject("ADODB.Recordset") rsLetDest.ActiveConnection = Conn rsLetDest.Source = "SELECT dest_id, url, destination as dest FROM destinations WHERE destination LIKE '" & mid(alphabet, i, 1) & "%' UNION SELECT dest_id, url, subdestination as dest from subdestinations WHERE subdestination LIKE '" & mid(alphabet, i, 1) & "%' ORDER BY dest" rsLetDest.Open() %>
<%= mid(alphabet, i, 1) %>
<% While (NOT rsLetDest.BOF) AND (NOT rsLetDest.EOF) %> <% rsLetDest.MoveNext() Wend rsLetDest.Close() set rsLetDest=nothing %>
<% if rsLetDest.Fields.Item("url").Value <> "" then %> "><%=(rsLetDest.Fields.Item("dest").Value)%> Hotels <% else response.write((rsLetDest.Fields.Item("dest").Value) & " Hotels") end if %> <% set rsDestAL = Server.CreateObject("ADODB.Recordset") rsDestAL.ActiveConnection = Conn rsDestAL.Source = "SELECT airline_name from airline_dests, airlines WHERE airline_dests.dest_id = " & rsLetDest("dest_id") & " AND airlines.airline_id = airline_dests.airline_id ORDER BY airline_name" rsDestAL.Open() while (not rsDestAL.EOF) and (not rsDestAL.BOF) Response.Write(rsDestAL("airline_name")) rsDestAL.MoveNext() if (not rsDestAL.EOF) then Response.Write(",  ") wend rsDestAL.Close() set rsDestAL = nothing %>

<% next set rsLetDest = Server.CreateObject("ADODB.Recordset") rsLetDest.ActiveConnection = Conn rsLetDest.Source = "SELECT dest_id, url, destination as dest FROM destinations WHERE destination LIKE ('X%' OR 'Y%' OR 'Z%') UNION SELECT dest_id, url, subdestination as dest from subdestinations WHERE subdestination LIKE ('X%' OR 'Y%' OR 'Z%') ORDER BY dest" rsLetDest.Open() %>
XYZ
<% While (NOT rsLetDest.BOF) AND (NOT rsLetDest.EOF) %> <% rsLetDest.MoveNext() Wend rsLetDest.Close() set rsLetDest=nothing %>
<% if rsLetDest.Fields.Item("url").Value <> "" then %> "><%=(rsLetDest.Fields.Item("dest").Value)%> Hotels <% else response.write((rsLetDest.Fields.Item("dest").Value) & " Hotels") end if %> <% set rsDestAL = Server.CreateObject("ADODB.Recordset") rsDestAL.ActiveConnection = Conn rsDestAL.Source = "SELECT airline_name from airline_dests, airlines WHERE airline_dests.dest_id = " & rsLetDest("dest_id") & " AND airlines.airline_id = airline_dests.airline_id ORDER BY airline_name" rsDestAL.Open() while (not rsDestAL.EOF) and (not rsDestAL.BOF) Response.Write(rsDestAL("airline_name")) rsDestAL.MoveNext() if (not rsDestAL.EOF) then Response.Write(",  ") wend rsDestAL.Close() set rsDestAL = nothing %>


asp programming by Gavin Deas

Hotels By Phone, Worldwide Discount Hotel Bookings
<% rsAirlines.Close() Set rsAirlines = Nothing %>