% 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("nilecruises") Else ewCurSec = GetAnonymousPriv("nilecruises") End If If (ewCurSec And ewAllowSearch) <> ewAllowSearch Then Response.Redirect "nilecruiseslist.asp" %> <% ' Initialize common variables x_NileCruiseID = Null: ox_NileCruiseID = Null: z_NileCruiseID = Null x_NileCruiseLogo = Null: ox_NileCruiseLogo = Null: z_NileCruiseLogo = Null fs_x_NileCruiseLogo = 0: fn_x_NileCruiseLogo = "": ct_x_NileCruiseLogo = "" wd_x_NileCruiseLogo = 0: ht_x_NileCruiseLogo = 0: a_x_NileCruiseLogo = "" x_NileCruiseName = Null: ox_NileCruiseName = Null: z_NileCruiseName = Null x_CruiseCategory = Null: ox_CruiseCategory = Null: z_CruiseCategory = Null x_CruiseItinerary = Null: ox_CruiseItinerary = Null: z_CruiseItinerary = Null x_CruiseDescription = Null: ox_CruiseDescription = Null: z_CruiseDescription = 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_Cabinfacilities = Null: ox_Cabinfacilities = Null: z_Cabinfacilities = Null x_Cruisefacilities = Null: ox_Cruisefacilities = Null: z_Cruisefacilities = 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 NileCruiseID x_NileCruiseID = Request.Form("x_NileCruiseID") z_NileCruiseID = Request.Form("z_NileCruiseID") sSrchWrk = "" If x_NileCruiseID <> "" Then sSrchWrk = sSrchWrk & "x_NileCruiseID=" & Server.URLEncode(x_NileCruiseID) sSrchWrk = sSrchWrk & "&z_NileCruiseID=" & Server.URLEncode(z_NileCruiseID) End If If sSrchWrk <> "" Then If sSrchStr <> "" Then sSrchStr = sSrchStr & "&" sSrchStr = sSrchStr & sSrchWrk End If ' Field NileCruiseName x_NileCruiseName = Request.Form("x_NileCruiseName") z_NileCruiseName = Request.Form("z_NileCruiseName") sSrchWrk = "" If x_NileCruiseName <> "" Then sSrchWrk = sSrchWrk & "x_NileCruiseName=" & Server.URLEncode(x_NileCruiseName) sSrchWrk = sSrchWrk & "&z_NileCruiseName=" & Server.URLEncode(z_NileCruiseName) End If If sSrchWrk <> "" Then If sSrchStr <> "" Then sSrchStr = sSrchStr & "&" sSrchStr = sSrchStr & sSrchWrk End If ' Field CruiseCategory x_CruiseCategory = Request.Form("x_CruiseCategory") z_CruiseCategory = Request.Form("z_CruiseCategory") sSrchWrk = "" If x_CruiseCategory <> "" Then sSrchWrk = sSrchWrk & "x_CruiseCategory=" & Server.URLEncode(x_CruiseCategory) sSrchWrk = sSrchWrk & "&z_CruiseCategory=" & Server.URLEncode(z_CruiseCategory) End If If sSrchWrk <> "" Then If sSrchStr <> "" Then sSrchStr = sSrchStr & "&" sSrchStr = sSrchStr & sSrchWrk End If ' Field CruiseItinerary x_CruiseItinerary = Request.Form("x_CruiseItinerary") z_CruiseItinerary = Request.Form("z_CruiseItinerary") sSrchWrk = "" If x_CruiseItinerary <> "" Then sSrchWrk = sSrchWrk & "x_CruiseItinerary=" & Server.URLEncode(x_CruiseItinerary) sSrchWrk = sSrchWrk & "&z_CruiseItinerary=" & Server.URLEncode(z_CruiseItinerary) End If If sSrchWrk <> "" Then If sSrchStr <> "" Then sSrchStr = sSrchStr & "&" sSrchStr = sSrchStr & sSrchWrk End If ' Field CruiseDescription x_CruiseDescription = Request.Form("x_CruiseDescription") z_CruiseDescription = Request.Form("z_CruiseDescription") sSrchWrk = "" If ((Left(LCase(x_CruiseDescription), 3) = "
") And (Right(LCase(x_CruiseDescription), 4) = "
")) Then x_CruiseDescription = Trim(Mid(x_CruiseDescription, 4, Len(x_CruiseDescription)-7)) ' Remove If x_CruiseDescription <> "" Then sSrchWrk = sSrchWrk & "x_CruiseDescription=" & Server.URLEncode(x_CruiseDescription) sSrchWrk = sSrchWrk & "&z_CruiseDescription=" & Server.URLEncode(z_CruiseDescription) End If If sSrchWrk <> "" Then If sSrchStr <> "" Then sSrchStr = sSrchStr & "&" sSrchStr = sSrchStr & sSrchWrk End If ' Field Cabinfacilities x_Cabinfacilities = Request.Form("x_Cabinfacilities") z_Cabinfacilities = Request.Form("z_Cabinfacilities") sSrchWrk = "" If x_Cabinfacilities <> "" Then sSrchWrk = sSrchWrk & "x_Cabinfacilities=" & Server.URLEncode(x_Cabinfacilities) sSrchWrk = sSrchWrk & "&z_Cabinfacilities=" & Server.URLEncode(z_Cabinfacilities) End If If sSrchWrk <> "" Then If sSrchStr <> "" Then sSrchStr = sSrchStr & "&" sSrchStr = sSrchStr & sSrchWrk End If ' Field Cruisefacilities x_Cruisefacilities = Request.Form("x_Cruisefacilities") z_Cruisefacilities = Request.Form("z_Cruisefacilities") sSrchWrk = "" If x_Cruisefacilities <> "" Then sSrchWrk = sSrchWrk & "x_Cruisefacilities=" & Server.URLEncode(x_Cruisefacilities) sSrchWrk = sSrchWrk & "&z_Cruisefacilities=" & Server.URLEncode(z_Cruisefacilities) End If If sSrchWrk <> "" Then If sSrchStr <> "" Then sSrchStr = sSrchStr & "&" sSrchStr = sSrchStr & sSrchWrk End If If sSrchStr <> "" Then Response.Clear Response.Redirect "nilecruiseslist.asp" & "?" & sSrchStr End If Case Else ' Restore search settings x_NileCruiseID = Session(ewSessionTblAdvSrch & "_x_NileCruiseID") x_NileCruiseName = Session(ewSessionTblAdvSrch & "_x_NileCruiseName") x_CruiseCategory = Session(ewSessionTblAdvSrch & "_x_CruiseCategory") x_CruiseItinerary = Session(ewSessionTblAdvSrch & "_x_CruiseItinerary") x_CruiseDescription = Session(ewSessionTblAdvSrch & "_x_CruiseDescription") x_Cabinfacilities = Session(ewSessionTblAdvSrch & "_x_Cabinfacilities") x_Cruisefacilities = Session(ewSessionTblAdvSrch & "_x_Cruisefacilities") End Select ' Open connection to the database Set conn = Server.CreateObject("ADODB.Connection") conn.Open xDb_Conn_Str %>Search TABLE: nilecruises
Back to List