<% 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 ewAllowView) <> ewAllowView 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 x_NileCruiseID = Request.QueryString("NileCruiseID") If x_NileCruiseID = "" Or IsNull(x_NileCruiseID) Then Response.Redirect "nilecruiseslist.asp" ' Get action sAction = Request.Form("a_view") If sAction = "" Or IsNull(sAction) Then sAction = "I" ' Display with input box End If ' Open connection to the database Set conn = Server.CreateObject("ADODB.Connection") conn.Open xDb_Conn_Str Select Case sAction Case "I": ' Get a record to display If Not LoadData() Then ' Load Record based on key Session(ewSessionMessage) = "No records found" conn.Close ' Close Connection Set conn = Nothing Response.Clear Response.Redirect "nilecruiseslist.asp" End If End Select %> Continental Tours | <% Response.Write x_NileCruiseName %> | Egypt


<% Response.Write x_NileCruiseName %>

<% If Not IsNull(x_CruiseCategory) Then sSqlWrk = "SELECT `HotelCategory` FROM `hotelcategory`" sTmp = x_CruiseCategory sSqlWrk = sSqlWrk & " WHERE `HotelCategory` = '" & AdjustSql(sTmp) & "'" Set rswrk = conn.Execute(sSqlWrk) If Not rswrk.Eof Then sTmp = rswrk("HotelCategory") End If rswrk.Close Set rswrk = Nothing Else sTmp = Null End If ox_CruiseCategory = x_CruiseCategory ' Backup Original Value x_CruiseCategory = sTmp %> <% Response.Write x_CruiseCategory %> <% x_CruiseCategory = ox_CruiseCategory ' Restore Original Value %>

Cruise Itinerary

<%= Replace(x_CruiseItinerary&"", vbLf, "
") %>

Cruise Description

<%= Replace(x_CruiseDescription&"", vbLf, "
") %>

Cabin Facilities

<% ar_x_Cabinfacilities = split(x_Cabinfacilities&"",",") If Not IsNull(x_Cabinfacilities) Then sSqlWrk = "SELECT `CabinFacilities` FROM `cabinfacilities`" sWhereWrk = "" For ari_x_Cabinfacilities = 0 to UBound(ar_x_Cabinfacilities) sTmp = Trim(ar_x_Cabinfacilities(ari_x_Cabinfacilities)) sWhereWrk = sWhereWrk & "`CabinFacilities` = '" & AdjustSql(sTmp) & "' OR " Next If Len(sWhereWrk) > 4 Then sWhereWrk = Mid(sWhereWrk, 1, Len(sWhereWrk)-4) If sWhereWrk <> "" Then sWhereWrk = "(" & sWhereWrk & ")" If sWhereWrk <> "" Then sSqlWrk = sSqlWrk & " WHERE " & sWhereWrk End If sTmp = "" Set rswrk = conn.Execute(sSqlWrk) rowcntwrk = 0 Do While Not rswrk.Eof sTmp = sTmp & rswrk("CabinFacilities") sTmp1 = ViewOptionSeparator(rowcntwrk) ' Separate Options sTmp = sTmp & sTmp1 rowcntwrk = rowcntwrk + 1 rswrk.MoveNext Loop If Len(sTmp) > 0 Then sTmp = Mid(sTmp, 1, Len(sTmp)-Len(sTmp1)) rswrk.Close Set rswrk = Nothing Else sTmp = Null End If %> <% ox_Cabinfacilities = x_Cabinfacilities ' Backup Original Value x_Cabinfacilities = sTmp %> <% Response.Write x_Cabinfacilities %> <% x_Cabinfacilities = ox_Cabinfacilities ' Restore Original Value %>

Cruise Facilities

<% ar_x_Cruisefacilities = split(x_Cruisefacilities&"",",") If Not IsNull(x_Cruisefacilities) Then sSqlWrk = "SELECT `CruiseFacilities` FROM `cruisefacilities`" sWhereWrk = "" For ari_x_Cruisefacilities = 0 to UBound(ar_x_Cruisefacilities) sTmp = Trim(ar_x_Cruisefacilities(ari_x_Cruisefacilities)) sWhereWrk = sWhereWrk & "`CruiseFacilities` = '" & AdjustSql(sTmp) & "' OR " Next If Len(sWhereWrk) > 4 Then sWhereWrk = Mid(sWhereWrk, 1, Len(sWhereWrk)-4) If sWhereWrk <> "" Then sWhereWrk = "(" & sWhereWrk & ")" If sWhereWrk <> "" Then sSqlWrk = sSqlWrk & " WHERE " & sWhereWrk End If sTmp = "" Set rswrk = conn.Execute(sSqlWrk) rowcntwrk = 0 Do While Not rswrk.Eof sTmp = sTmp & rswrk("CruiseFacilities") sTmp1 = ViewOptionSeparator(rowcntwrk) ' Separate Options sTmp = sTmp & sTmp1 rowcntwrk = rowcntwrk + 1 rswrk.MoveNext Loop If Len(sTmp) > 0 Then sTmp = Mid(sTmp, 1, Len(sTmp)-Len(sTmp1)) rswrk.Close Set rswrk = Nothing Else sTmp = Null End If %> <% ox_Cruisefacilities = x_Cruisefacilities ' Backup Original Value x_Cruisefacilities = sTmp %> <% Response.Write x_Cruisefacilities %> <% x_Cruisefacilities = ox_Cruisefacilities ' Restore Original Value %>

<% If Not IsNull(x_Photo1) Then %> <% End If %> <% If Not IsNull(x_Photo2) Then %> <% End If %> <% If Not IsNull(x_Photo3) Then %> <% End If %> <% If Not IsNull(x_Photo4) Then %> <% End If %> <% If Not IsNull(x_Photo5) Then %> <% End If %>

<% conn.Close ' Close Connection Set conn = Nothing %><% '------------------------------------------------------------------------------- ' Function LoadData ' - Load Data based on Key Value ' - Variables setup: field variables Function LoadData() Dim rs, sSql, sFilter sFilter = ewSqlKeyWhere If Not IsNumeric(x_NileCruiseID) Then LoadData = False Exit Function End If sFilter = Replace(sFilter, "@NileCruiseID", AdjustSql(x_NileCruiseID)) ' Replace key value sSql = ewBuildSql(ewSqlSelect, ewSqlWhere, ewSqlGroupBy, ewSqlHaving, ewSqlOrderBy, sFilter, "") Set rs = Server.CreateObject("ADODB.Recordset") rs.Open sSql, conn If rs.Eof Then LoadData = False Else LoadData = True rs.MoveFirst ' Get the field contents x_NileCruiseID = rs("NileCruiseID") x_NileCruiseLogo = rs("NileCruiseLogo") x_NileCruiseName = rs("NileCruiseName") x_CruiseCategory = rs("CruiseCategory") x_CruiseItinerary = rs("CruiseItinerary") x_CruiseDescription = rs("CruiseDescription") x_Photo1 = rs("Photo1") x_Photo2 = rs("Photo2") x_Photo3 = rs("Photo3") x_Photo4 = rs("Photo4") x_Photo5 = rs("Photo5") x_Cabinfacilities = rs("Cabinfacilities") x_Cruisefacilities = rs("Cruisefacilities") End If rs.Close Set rs = Nothing End Function %>