Open Entry Form
<%
Dim h_calendar_base_url As String = ADXCalendar.AdminFunctions.ReturnBaseCalendarURL(Request)
If IsNothing(Me.theHeader) = True Then Me.theHeader = ""
If Me.theHeader.Trim.Length = 0 Then 'this if block added 01/09/09
Try
Dim h_file As String = ""
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
Dim bin() As Byte = Nothing
bin = System.IO.File.ReadAllBytes(Server.MapPath(h_file))
Response.BinaryWrite(bin)
Session("OEHeader") = System.Text.Encoding.UTF8.GetString(bin)
Catch ex As Exception
'leave header blank if this block of code has a problem
End Try
Else
Response.Write(Me.theHeader)
End If
%>
<%
If IsNothing(Me.theFooter) = True Then Me.theFooter = ""
If Me.theFooter.Trim.Length = 0 Then 'this if block added 01/09/09
Try
Dim f_file As String = ""
If Session("caltype") = "private" Then
If System.IO.File.Exists(Server.MapPath("~\custom_private_footer.html")) Then
'Load the custom private header that the client uploaded
f_file = "custom_private_footer.html"
Else
'Load the default private header that ships with calendar
f_file = "private_footer.aspx"
End If
Else
If System.IO.File.Exists(Server.MapPath("~\custom_public_footer.html")) Then
'Load the custom public header that the client uploaded
f_file = "custom_public_footer.html"
Else
'Load the default public header that ships with calendar
f_file = "public_footer.aspx"
End If
End If
Dim bin() As Byte = Nothing
bin = System.IO.File.ReadAllBytes(Server.MapPath(f_file))
Response.BinaryWrite(bin)
Session("OEFooter") = System.Text.Encoding.UTF8.GetString(bin)
Catch ex As Exception
End Try
Else
Response.Write(Me.theFooter)
End If
%>