<%@ CodePage=65001 %> <% 'Include Common Files @1-D8871EEC %> <% 'End Include Common Files 'Initialize Page @1-26D28871 ' Variables Dim PathToRoot, ScriptPath, TemplateFilePath Dim FileName Dim Redirect Dim IsService Dim Tpl, HTMLTemplate Dim TemplateFileName Dim ComponentName Dim PathToCurrentPage Dim Attributes ' Events Dim CCSEvents Dim CCSEventResult ' Page controls Dim Header2 Dim Login Dim Logout Dim Footer Dim ChildControls Session.CodePage=1252 Response.ContentType = CCSContentType IsService = False Redirect = "" TemplateFileName = "Login.html" Set CCSEvents = CreateObject("Scripting.Dictionary") PathToCurrentPage = "./" FileName = "Login.asp" PathToRoot = "./" ScriptPath = Left(Request.ServerVariables("PATH_TRANSLATED"), Len(Request.ServerVariables("PATH_TRANSLATED")) - Len(FileName)) TemplateFilePath = ScriptPath 'End Initialize Page 'Initialize Objects @1-F14213DA BindEvents "Page" CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeInitialize", Nothing) Set Attributes = New clsAttributes Attributes("pathToRoot") = PathToRoot ' Controls Set Header2 = New clsHeader2 Set Header2.Attributes = Attributes Header2.Initialize "Header2", "" Set Login = new clsRecordLogin Set Logout = CCCreateControl(ccsLink, "Logout", Empty, ccsText, Empty, CCGetRequestParam("Logout", ccsGet)) Set Footer = New clsFooter Set Footer.Attributes = Attributes Footer.Initialize "Footer", "" Logout.Parameters = CCGetQueryString("QueryString", Array("PROP_ID", "ccsForm")) Logout.Parameters = CCAddParam(Logout.Parameters, "Logout", "True") Logout.Page = "Login.asp" ' Events %> <% BindEvents Empty CCSEventResult = CCRaiseEvent(CCSEvents, "AfterInitialize", Nothing) 'End Initialize Objects 'Execute Components @1-69A104C4 Header2.Operations Login.Operation Footer.Operations 'End Execute Components 'Go to destination page @1-6D35F4FD If NOT ( Redirect = "" ) Then UnloadPage Response.Redirect Redirect End If 'End Go to destination page 'Initialize HTML Template @1-2E9DB4BC CCSEventResult = CCRaiseEvent(CCSEvents, "OnInitializeView", Nothing) Set HTMLTemplate = new clsTemplate Set HTMLTemplate.Cache = TemplatesRepository HTMLTemplate.LoadTemplate TemplateFilePath & TemplateFileName HTMLTemplate.SetVar "@CCS_PathToRoot", PathToRoot Set Tpl = HTMLTemplate.Block("main") CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeShow", Nothing) 'End Initialize HTML Template 'Show Page @1-411F1CDF Attributes.Show HTMLTemplate, "page:" Set ChildControls = CCCreateCollection(Tpl, Null, ccsParseOverwrite, _ Array(Header2, Login, Logout, Footer)) ChildControls.Show Dim MainHTML HTMLTemplate.Parse "main", False If IsEmpty(MainHTML) Then MainHTML = HTMLTemplate.GetHTML("main") CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeOutput", Nothing) If CCSEventResult Then Response.Write MainHTML 'End Show Page 'Unload Page @1-CB210C62 UnloadPage Set Tpl = Nothing Set HTMLTemplate = Nothing 'End Unload Page 'UnloadPage Sub @1-64BD5F42 Sub UnloadPage() CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeUnload", Nothing) Set CCSEvents = Nothing Set Attributes = Nothing Header2.UnloadPage Set Header2 = Nothing Set Login = Nothing Footer.UnloadPage Set Footer = Nothing End Sub 'End UnloadPage Sub Class clsRecordLogin 'Login Class @2-D3C99874 'Login Variables @2-065E92CB ' Public variables Public ComponentName Public HTMLFormAction Public PressedButton Public Errors Public FormSubmitted Public EditMode Public Visible Public Recordset Public TemplateBlock Public Attributes Public CCSEvents Private CCSEventResult Public InsertAllowed Public UpdateAllowed Public DeleteAllowed Public ReadAllowed Public DataSource Public Command Public ValidatingControls Public Controls ' Class variables Dim Login Dim Password Dim Button_DoLogin 'End Login Variables 'Login Class_Initialize Event @2-AAC73EB7 Private Sub Class_Initialize() Visible = True Set Errors = New clsErrors Set CCSEvents = CreateObject("Scripting.Dictionary") Set Attributes = New clsAttributes InsertAllowed = False UpdateAllowed = False DeleteAllowed = False ReadAllowed = True Dim Method Dim OperationMode OperationMode = Split(CCGetFromGet("ccsForm", Empty), ":") If UBound(OperationMode) > -1 Then FormSubmitted = (OperationMode(0) = "Login") End If If UBound(OperationMode) > 0 Then EditMode = (OperationMode(1) = "Edit") End If ComponentName = "Login" Method = IIf(FormSubmitted, ccsPost, ccsGet) Set Login = CCCreateControl(ccsTextBox, "Login", Empty, ccsText, Empty, CCGetRequestParam("Login", Method)) Login.Required = True Set Password = CCCreateControl(ccsTextBox, "Password", Empty, ccsText, Empty, CCGetRequestParam("Password", Method)) Password.Required = True Set Button_DoLogin = CCCreateButton("Button_DoLogin", Method) Set ValidatingControls = new clsControls ValidatingControls.addControls Array(Login, Password) End Sub 'End Login Class_Initialize Event 'Login Class_Terminate Event @2-0C5D276C Private Sub Class_Terminate() Set Errors = Nothing Set Attributes = Nothing End Sub 'End Login Class_Terminate Event 'Login Validate Method @2-B9D513CF Function Validate() Dim Validation ValidatingControls.Validate CCSEventResult = CCRaiseEvent(CCSEvents, "OnValidate", Me) Validate = ValidatingControls.isValid() And (Errors.Count = 0) End Function 'End Login Validate Method 'Login Operation Method @2-C0983F46 Sub Operation() If NOT ( Visible AND FormSubmitted ) Then Exit Sub If FormSubmitted Then PressedButton = "Button_DoLogin" If Button_DoLogin.Pressed Then PressedButton = "Button_DoLogin" End If End If Redirect = "Property.asp" If Validate() Then If PressedButton = "Button_DoLogin" Then If NOT Button_DoLogin.OnClick() Then Redirect = "" End If End If Else Redirect = "" End If End Sub 'End Login Operation Method 'Login Show Method @2-8288F5F7 Sub Show(Tpl) If NOT Visible Then Exit Sub EditMode = False HTMLFormAction = FileName & "?" & CCAddParam(Request.ServerVariables("QUERY_STRING"), "ccsForm", "Login" & IIf(EditMode, ":Edit", "")) Set TemplateBlock = Tpl.Block("Record " & ComponentName) If TemplateBlock is Nothing Then Exit Sub TemplateBlock.Variable("HTMLFormName") = ComponentName TemplateBlock.Variable("HTMLFormEnctype") ="application/x-www-form-urlencoded" Set Controls = CCCreateCollection(TemplateBlock, Null, ccsParseOverwrite, _ Array(Login, Password, Button_DoLogin)) If Not FormSubmitted Then End If If FormSubmitted Then Errors.AddErrors Login.Errors Errors.AddErrors Password.Errors With TemplateBlock.Block("Error") .Variable("Error") = Errors.ToString() .Parse False End With End If TemplateBlock.Variable("Action") = IIF(CCSUseAmps, Replace(HTMLFormAction, "&", CCSAmps), HTMLFormAction) CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeShow", Me) If Visible Then Attributes.Show TemplateBlock, "Login" & ":" Controls.Show End If End Sub 'End Login Show Method End Class 'End Login Class @2-A61BA892 'Include Page Implementation @8-470FDEDE %> <% 'End Include Page Implementation 'Include Page Implementation @9-328EC137 %> <% 'End Include Page Implementation %>