<% Response.Expires = 0 Response.ExpiresAbsolute = Now() - 1 Response.AddHeader "pragma", "no-cache" Response.AddHeader "cache-control", "private, no-cache, no-store, must-revalidate" %> <% If Not IsLoggedIn And Request.Cookies(ewProjectName)("autologin") = "autologin" And Request.Cookies(ewProjectName)("password") <> "" Then Response.Redirect "login.asp" Call LoadUserLevel() If IsLoggedIn Then ewCurSec = CurrentUserLevelPriv("hotels") Else ewCurSec = GetAnonymousPriv("hotels") End If If (ewCurSec And ewAllowSearch) <> ewAllowSearch Then Response.Redirect "hotelslist.asp" %> <% ' Initialize common variables x_HotelID = Null: ox_HotelID = Null: z_HotelID = Null x_HotelLogo = Null: ox_HotelLogo = Null: z_HotelLogo = Null fs_x_HotelLogo = 0: fn_x_HotelLogo = "": ct_x_HotelLogo = "" wd_x_HotelLogo = 0: ht_x_HotelLogo = 0: a_x_HotelLogo = "" x_HotelName = Null: ox_HotelName = Null: z_HotelName = Null x_HotelCategory = Null: ox_HotelCategory = Null: z_HotelCategory = Null x_Governorate = Null: ox_Governorate = Null: z_Governorate = Null x_BtriefLocation = Null: ox_BtriefLocation = Null: z_BtriefLocation = Null x_HotelDescription = Null: ox_HotelDescription = Null: z_HotelDescription = Null x_Photo1 = Null: ox_Photo1 = Null: z_Photo1 = Null fs_x_Photo1 = 0: fn_x_Photo1 = "": ct_x_Photo1 = "" wd_x_Photo1 = 0: ht_x_Photo1 = 0: a_x_Photo1 = "" x_Photo2 = Null: ox_Photo2 = Null: z_Photo2 = Null fs_x_Photo2 = 0: fn_x_Photo2 = "": ct_x_Photo2 = "" wd_x_Photo2 = 0: ht_x_Photo2 = 0: a_x_Photo2 = "" x_Photo3 = Null: ox_Photo3 = Null: z_Photo3 = Null fs_x_Photo3 = 0: fn_x_Photo3 = "": ct_x_Photo3 = "" wd_x_Photo3 = 0: ht_x_Photo3 = 0: a_x_Photo3 = "" x_Photo4 = Null: ox_Photo4 = Null: z_Photo4 = Null fs_x_Photo4 = 0: fn_x_Photo4 = "": ct_x_Photo4 = "" wd_x_Photo4 = 0: ht_x_Photo4 = 0: a_x_Photo4 = "" x_Photo5 = Null: ox_Photo5 = Null: z_Photo5 = Null fs_x_Photo5 = 0: fn_x_Photo5 = "": ct_x_Photo5 = "" wd_x_Photo5 = 0: ht_x_Photo5 = 0: a_x_Photo5 = "" x_Photo6 = Null: ox_Photo6 = Null: z_Photo6 = Null fs_x_Photo6 = 0: fn_x_Photo6 = "": ct_x_Photo6 = "" wd_x_Photo6 = 0: ht_x_Photo6 = 0: a_x_Photo6 = "" x_NearbySightseeing = Null: ox_NearbySightseeing = Null: z_NearbySightseeing = Null x_HotelFacilities = Null: ox_HotelFacilities = Null: z_HotelFacilities = Null x_RoomFacilities = Null: ox_RoomFacilities = Null: z_RoomFacilities = Null x_RoomCategory = Null: ox_RoomCategory = Null: z_RoomCategory = Null x_RoomFacilitiesCategory = Null: ox_RoomFacilitiesCategory = Null: z_RoomFacilitiesCategory = Null x_RoomFacilitiesSubcategory = Null: ox_RoomFacilitiesSubcategory = Null: z_RoomFacilitiesSubcategory = Null x_Featured = Null: ox_Featured = Null: z_Featured = Null %> <% Response.Buffer = True ' Get action sAction = Request.Form("a_search") Select Case sAction Case "S": ' Get Search Criteria ' Build search string for advanced search, remove blank field sSrchStr = "" ' Field HotelName x_HotelName = Request.Form("x_HotelName") z_HotelName = Request.Form("z_HotelName") sSrchWrk = "" If x_HotelName <> "" Then sSrchWrk = sSrchWrk & "x_HotelName=" & Server.URLEncode(x_HotelName) sSrchWrk = sSrchWrk & "&z_HotelName=" & Server.URLEncode(z_HotelName) End If If sSrchWrk <> "" Then If sSrchStr <> "" Then sSrchStr = sSrchStr & "&" sSrchStr = sSrchStr & sSrchWrk End If ' Field HotelCategory x_HotelCategory = Request.Form("x_HotelCategory") z_HotelCategory = Request.Form("z_HotelCategory") sSrchWrk = "" If x_HotelCategory <> "" Then sSrchWrk = sSrchWrk & "x_HotelCategory=" & Server.URLEncode(x_HotelCategory) sSrchWrk = sSrchWrk & "&z_HotelCategory=" & Server.URLEncode(z_HotelCategory) End If If sSrchWrk <> "" Then If sSrchStr <> "" Then sSrchStr = sSrchStr & "&" sSrchStr = sSrchStr & sSrchWrk End If ' Field Governorate x_Governorate = Request.Form("x_Governorate") z_Governorate = Request.Form("z_Governorate") sSrchWrk = "" If x_Governorate <> "" Then sSrchWrk = sSrchWrk & "x_Governorate=" & Server.URLEncode(x_Governorate) sSrchWrk = sSrchWrk & "&z_Governorate=" & Server.URLEncode(z_Governorate) End If If sSrchWrk <> "" Then If sSrchStr <> "" Then sSrchStr = sSrchStr & "&" sSrchStr = sSrchStr & sSrchWrk End If ' Field HotelFacilities x_HotelFacilities = Request.Form("x_HotelFacilities") z_HotelFacilities = Request.Form("z_HotelFacilities") sSrchWrk = "" If x_HotelFacilities <> "" Then sSrchWrk = sSrchWrk & "x_HotelFacilities=" & Server.URLEncode(x_HotelFacilities) sSrchWrk = sSrchWrk & "&z_HotelFacilities=" & Server.URLEncode(z_HotelFacilities) End If If sSrchWrk <> "" Then If sSrchStr <> "" Then sSrchStr = sSrchStr & "&" sSrchStr = sSrchStr & sSrchWrk End If ' Field RoomFacilities x_RoomFacilities = Request.Form("x_RoomFacilities") z_RoomFacilities = Request.Form("z_RoomFacilities") sSrchWrk = "" If x_RoomFacilities <> "" Then sSrchWrk = sSrchWrk & "x_RoomFacilities=" & Server.URLEncode(x_RoomFacilities) sSrchWrk = sSrchWrk & "&z_RoomFacilities=" & Server.URLEncode(z_RoomFacilities) End If If sSrchWrk <> "" Then If sSrchStr <> "" Then sSrchStr = sSrchStr & "&" sSrchStr = sSrchStr & sSrchWrk End If ' Field RoomCategory x_RoomCategory = Request.Form("x_RoomCategory") z_RoomCategory = Request.Form("z_RoomCategory") sSrchWrk = "" If x_RoomCategory <> "" Then sSrchWrk = sSrchWrk & "x_RoomCategory=" & Server.URLEncode(x_RoomCategory) sSrchWrk = sSrchWrk & "&z_RoomCategory=" & Server.URLEncode(z_RoomCategory) End If If sSrchWrk <> "" Then If sSrchStr <> "" Then sSrchStr = sSrchStr & "&" sSrchStr = sSrchStr & sSrchWrk End If ' Field RoomFacilitiesCategory x_RoomFacilitiesCategory = Request.Form("x_RoomFacilitiesCategory") z_RoomFacilitiesCategory = Request.Form("z_RoomFacilitiesCategory") sSrchWrk = "" If x_RoomFacilitiesCategory <> "" Then sSrchWrk = sSrchWrk & "x_RoomFacilitiesCategory=" & Server.URLEncode(x_RoomFacilitiesCategory) sSrchWrk = sSrchWrk & "&z_RoomFacilitiesCategory=" & Server.URLEncode(z_RoomFacilitiesCategory) End If If sSrchWrk <> "" Then If sSrchStr <> "" Then sSrchStr = sSrchStr & "&" sSrchStr = sSrchStr & sSrchWrk End If ' Field RoomFacilitiesSubcategory x_RoomFacilitiesSubcategory = Request.Form("x_RoomFacilitiesSubcategory") z_RoomFacilitiesSubcategory = Request.Form("z_RoomFacilitiesSubcategory") sSrchWrk = "" If x_RoomFacilitiesSubcategory <> "" Then sSrchWrk = sSrchWrk & "x_RoomFacilitiesSubcategory=" & Server.URLEncode(x_RoomFacilitiesSubcategory) sSrchWrk = sSrchWrk & "&z_RoomFacilitiesSubcategory=" & Server.URLEncode(z_RoomFacilitiesSubcategory) End If If sSrchWrk <> "" Then If sSrchStr <> "" Then sSrchStr = sSrchStr & "&" sSrchStr = sSrchStr & sSrchWrk End If ' Field Featured x_Featured = Request.Form("x_Featured") z_Featured = Request.Form("z_Featured") sSrchWrk = "" If x_Featured <> "" Then sSrchWrk = sSrchWrk & "x_Featured=" & Server.URLEncode(x_Featured) sSrchWrk = sSrchWrk & "&z_Featured=" & Server.URLEncode(z_Featured) End If If sSrchWrk <> "" Then If sSrchStr <> "" Then sSrchStr = sSrchStr & "&" sSrchStr = sSrchStr & sSrchWrk End If If sSrchStr <> "" Then Response.Clear Response.Redirect "hotelslist.asp" & "?" & sSrchStr End If Case Else ' Restore search settings x_HotelName = Session(ewSessionTblAdvSrch & "_x_HotelName") x_HotelCategory = Session(ewSessionTblAdvSrch & "_x_HotelCategory") x_Governorate = Session(ewSessionTblAdvSrch & "_x_Governorate") x_HotelFacilities = Session(ewSessionTblAdvSrch & "_x_HotelFacilities") x_RoomFacilities = Session(ewSessionTblAdvSrch & "_x_RoomFacilities") x_RoomCategory = Session(ewSessionTblAdvSrch & "_x_RoomCategory") x_RoomFacilitiesCategory = Session(ewSessionTblAdvSrch & "_x_RoomFacilitiesCategory") x_RoomFacilitiesSubcategory = Session(ewSessionTblAdvSrch & "_x_RoomFacilitiesSubcategory") x_Featured = Session(ewSessionTblAdvSrch & "_x_Featured") End Select ' Open connection to the database Set conn = Server.CreateObject("ADODB.Connection") conn.Open xDb_Conn_Str %>

Search hotels in Egypt

Hotel Name ">
Hotel Category <% lst_x_HotelCategory = "" Response.Write lst_x_HotelCategory %>
City <% lst_x_Governorate = "" Response.Write lst_x_Governorate %>
Hotel Facilities <% sSqlWrk = "SELECT `HotelFacilities` FROM `hotelfacilities`" chk_x_HotelFacilities = "" Set rswrk = Server.CreateObject("ADODB.Recordset") rswrk.Open sSqlWrk, conn If Not rswrk.Eof Then datawrk = rswrk.GetRows rowswrk = UBound(datawrk, 2) ar_x_HotelFacilities = split(x_HotelFacilities&"",",") For rowcntwrk = 0 To rowswrk chk_x_HotelFacilities = chk_x_HotelFacilities & RenderControl(rowswrk, rowcntwrk, 3, 1) & "" & datawrk(0, rowcntwrk) & RenderControl(rowswrk, rowcntwrk, 3, 2) Next End If rswrk.Close Set rswrk = Nothing Response.Write chk_x_HotelFacilities %>
Room Facilities <% sSqlWrk = "SELECT `RoomFacilities` FROM `roomfacilities`" chk_x_RoomFacilities = "" Set rswrk = Server.CreateObject("ADODB.Recordset") rswrk.Open sSqlWrk, conn If Not rswrk.Eof Then datawrk = rswrk.GetRows rowswrk = UBound(datawrk, 2) ar_x_RoomFacilities = split(x_RoomFacilities&"",",") For rowcntwrk = 0 To rowswrk chk_x_RoomFacilities = chk_x_RoomFacilities & RenderControl(rowswrk, rowcntwrk, 3, 1) & "" & datawrk(0, rowcntwrk) & RenderControl(rowswrk, rowcntwrk, 3, 2) Next End If rswrk.Close Set rswrk = Nothing Response.Write chk_x_RoomFacilities %>
Room Category <% lst_x_RoomCategory = "" Response.Write lst_x_RoomCategory %>

<% conn.Close ' Close Connection Set conn = Nothing %>