#Region " Imports " Imports System.Text Imports Statistics.PkiMethods #End Region Public Class PageTemplate #Region " Instance Fields " Dim _bannerUrl As String = "[Not Set]" Dim _bannerUrlLogged As String = "[Not Set]" Dim _bannerImage As String = "[Not Set]" Dim _displayTitle As String = "[Not Set]" Dim _privateUrl As String = "http://www.example.com" Dim _privateJoinUrl As String = "http://www.another.com" Dim _privatePortalUrl As String = "http://www.yetanother.com" Dim _publicJoinUrl As String = "http://www.stillanother.com" Dim _publicPortalUrl As String = "http://www.lestweforget.com" Dim _publicUrl As String = "http://www.theend.com" #End Region #Region " Enumerations " Enum WebsiteType As Integer PublicWebsite PrivateWebsite End Enum #End Region #Region " Properties " Public Property bannerImage() As String Get Return _bannerImage End Get Set(ByVal value As String) _bannerImage = value End Set End Property Public Property bannerUrl() As String Get Return _bannerUrl End Get Set(ByVal value As String) _bannerUrl = value End Set End Property Public Property bannerUrlLogged() As String Get Return _bannerUrlLogged End Get Set(ByVal value As String) _bannerUrlLogged = value End Set End Property Public Property displayTitle() As String Get Return _displayTitle End Get Set(ByVal value As String) _displayTitle = value End Set End Property #End Region #Region " Methods " Public Function AccessDenied() As String Dim s As New StringBuilder s.Append("
")
s.Append("
|
ERROR: Banner Image Not Set
") _failed = True End If If _displayTitle = "[Not Set]" Then HttpContext.Current.Response.Write("ERROR: Banner Title Not Set
") _failed = True End If If _bannerUrl = "[Not Set]" Then HttpContext.Current.Response.Write("ERROR: Banner URL Not Set
") _failed = True End If If _bannerUrlLogged = "[Not Set]" Then HttpContext.Current.Response.Write("ERROR: Banner URL Logged Not Set
") _failed = True End If If _failed Then HttpContext.Current.Response.End() Return "ERROR: Unable to create page banner.
" Else If _logged Then _renderUrl = _bannerUrlLogged Dim s As New StringBuilder s.Append("") s.Append("") s.Append("") s.Append("") s.Append(" | ") s.Append("") s.Append(" | ") Select Case type Case WebsiteType.PrivateWebsite s.Append("") Case WebsiteType.PublicWebsite s.Append("") End Select s.Append("") s.Append("") s.Append(" | ") s.Append("
ERROR: Banner Title Not Set
") _failed = True End If If _failed Then HttpContext.Current.Response.End() Return "ERROR: Unable to create page footer.
" Else Dim s As New StringBuilder s.Append("")
s.Append("
| ")
s.Append("
") s.Append(" | ") s.Append(" ") s.Append("") If Pki.IsLoggedOn Then s.Append("LOGOFF ") Else s.Append("Join the Air Force" & _joinText & "") End If s.Append(" | ") s.Append("
")
s.Append("
|