<% Dim SSORedirectUrl As String = ADXCalendar.AdminFunctions.GetProperty(ADXCalendar.AdminFunctions.CalendarProperty.SSORedirectUrl, System.AppDomain.CurrentDomain.BaseDirectory) Dim SSOEnabled As String = ADXCalendar.AdminFunctions.GetProperty(ADXCalendar.AdminFunctions.CalendarProperty.SSOEnabled, System.AppDomain.CurrentDomain.BaseDirectory) 'If the SSO is enabled and the membor profile is not present in the session, redirect out. If SSOEnabled.ToUpper = "TRUE" Then If IsNothing(Session("VisitorProfileData")) Then Response.Redirect(SSORedirectUrl) End If End If If Request.QueryString.Item("print") = "print" Then 'Do not show a header Else Dim h_calendar_base_url As String = ADXCalendar.AdminFunctions.ReturnBaseCalendarURL(Request) Dim h_category_id As String = ADXCalendar.AdminFunctions.GetCategoryHeaderFooter(Session("SelectedCategory")) Dim h_file As String = "" If Not IsNothing(h_category_id) Then 'Load the custom category footer that the client uploaded h_file = "category_" & h_category_id & "_header.html" If System.IO.File.Exists(Server.MapPath("~\" & h_file)) = False Then h_file = "" 'This flag a default header to load End If End If If Request.QueryString.Item("preview") = "preview" Then If System.IO.File.Exists(Server.MapPath("~\custom_" & Request.QueryString.Item("type") & "_header_preview.html")) Then h_file = "custom_" & Request.QueryString.Item("type") & "_header_preview.html" End If End If If h_file = "" Then If Session("caltype") = "private" Then If System.IO.File.Exists(Server.MapPath("~\custom_private_header.html")) Then 'Load the custom private header that the client uploaded h_file = "custom_private_header.html" Else 'Load the default private header that ships with calendar h_file = "private_header.aspx" End If Else If System.IO.File.Exists(Server.MapPath("~\custom_public_header.html")) Then 'Load the custom public header that the client uploaded h_file = "custom_public_header.html" Else 'Load the default public header that ships with calendar h_file = "public_header.aspx" End If End If End If 'Get the header content from the server Dim bin() as Byte = Nothing : Dim errormessage As String = "" ADXCalendar.ScheduledTasks.WebClientDownloader(bin, "", "", h_calendar_base_url & h_file, errormessage) 'bin = System.IO.File.ReadAllBytes(Server.MapPath(h_file)) Response.BinaryWrite(bin) End If %>