Visible = true; $this->Errors = new clsErrors(); $this->ErrorBlock = "Record users/Error"; $this->ds = new clsusersDataSource(); $this->UpdateAllowed = true; $this->DeleteAllowed = true; if($this->Visible) { $this->ComponentName = "users"; $CCSForm = split(":", CCGetFromGet("ccsForm", ""), 2); if(sizeof($CCSForm) == 1) $CCSForm[1] = ""; list($FormName, $FormMethod) = $CCSForm; $this->EditMode = ($FormMethod == "Edit"); $this->FormEnctype = "application/x-www-form-urlencoded"; $this->FormSubmitted = ($FormName == $this->ComponentName); $Method = $this->FormSubmitted ? ccsPost : ccsGet; $this->user_login = new clsControl(ccsTextBox, "user_login", "Login", ccsText, "", CCGetRequestParam("user_login", $Method)); $this->user_login->Required = true; $this->user_password = new clsControl(ccsTextBox, "user_password", "Password", ccsText, "", CCGetRequestParam("user_password", $Method)); $this->user_password->Required = true; $this->first_name = new clsControl(ccsTextBox, "first_name", "First Name", ccsText, "", CCGetRequestParam("first_name", $Method)); $this->first_name->Required = true; $this->last_name = new clsControl(ccsTextBox, "last_name", "Last Name", ccsText, "", CCGetRequestParam("last_name", $Method)); $this->email = new clsControl(ccsTextBox, "email", "Email", ccsText, "", CCGetRequestParam("email", $Method)); $this->email->Required = true; $this->emailpub = new clsControl(ccsTextBox, "emailpub", "Emailpub", ccsText, "", CCGetRequestParam("emailpub", $Method)); $this->phone_work = new clsControl(ccsTextBox, "phone_work", "Phone Work", ccsText, "", CCGetRequestParam("phone_work", $Method)); $this->patrocina = new clsControl(ccsTextBox, "patrocina", "patrocina", ccsText, "", CCGetRequestParam("patrocina", $Method)); $this->address1 = new clsControl(ccsTextBox, "address1", "Address1", ccsText, "", CCGetRequestParam("address1", $Method)); $this->address2 = new clsControl(ccsTextBox, "address2", "Address2", ccsText, "", CCGetRequestParam("address2", $Method)); $this->address3 = new clsControl(ccsTextBox, "address3", "Address3", ccsText, "", CCGetRequestParam("address3", $Method)); $this->city = new clsControl(ccsTextBox, "city", "City", ccsText, "", CCGetRequestParam("city", $Method)); $this->state_id = new clsControl(ccsListBox, "state_id", "State Id", ccsInteger, "", CCGetRequestParam("state_id", $Method)); $this->state_id->DSType = dsTable; list($this->state_id->BoundColumn, $this->state_id->TextColumn, $this->state_id->DBFormat) = array("state_id", "state_name", ""); $this->state_id->ds = new clsDBinternet(); $this->state_id->ds->SQL = "SELECT * " . "FROM states"; $this->state_id->ds->Order = "state_name"; $this->state_id->Required = true; $this->country_id = new clsControl(ccsListBox, "country_id", "Country Id", ccsInteger, "", CCGetRequestParam("country_id", $Method)); $this->country_id->DSType = dsTable; list($this->country_id->BoundColumn, $this->country_id->TextColumn, $this->country_id->DBFormat) = array("country_id", "country_name", ""); $this->country_id->ds = new clsDBinternet(); $this->country_id->ds->SQL = "SELECT * " . "FROM countries"; $this->country_id->ds->Order = "country_name"; $this->phone_home = new clsControl(ccsTextBox, "phone_home", "Phone Home", ccsText, "", CCGetRequestParam("phone_home", $Method)); $this->age_id = new clsControl(ccsListBox, "age_id", "Age Id", ccsInteger, "", CCGetRequestParam("age_id", $Method)); $this->age_id->DSType = dsTable; list($this->age_id->BoundColumn, $this->age_id->TextColumn, $this->age_id->DBFormat) = array("age_id", "age_name", ""); $this->age_id->ds = new clsDBinternet(); $this->age_id->ds->SQL = "SELECT * " . "FROM ages"; $this->age_id->ds->Order = "age_name"; $this->gender_id = new clsControl(ccsListBox, "gender_id", "Gender", ccsInteger, "", CCGetRequestParam("gender_id", $Method)); $this->gender_id->DSType = dsTable; list($this->gender_id->BoundColumn, $this->gender_id->TextColumn, $this->gender_id->DBFormat) = array("gender_id", "gender_name", ""); $this->gender_id->ds = new clsDBinternet(); $this->gender_id->ds->SQL = "SELECT * " . "FROM genders"; $this->gender_id->ds->Order = "gender_name"; $this->note = new clsControl(ccsTextArea, "note", "Note", ccsMemo, "", CCGetRequestParam("note", $Method)); $this->Update = new clsButton("Update"); $this->Delete = new clsButton("Delete"); $this->Cancel = new clsButton("Cancel"); if(!$this->FormSubmitted) { if(!is_array($this->country_id->Value) && !strlen($this->country_id->Value) && $this->country_id->Value !== false) $this->country_id->SetText(195); if(!is_array($this->gender_id->Value) && !strlen($this->gender_id->Value) && $this->gender_id->Value !== false) $this->gender_id->SetText(1); } } } //End Class_Initialize Event //Initialize Method @4-537EA73F function Initialize() { if(!$this->Visible) return; $this->ds->Parameters["sesUserID"] = CCGetSession("UserID"); } //End Initialize Method //Validate Method @4-1E7BB719 function Validate() { $Validation = true; $Where = ""; $Validation = ($this->user_login->Validate() && $Validation); $Validation = ($this->user_password->Validate() && $Validation); $Validation = ($this->first_name->Validate() && $Validation); $Validation = ($this->last_name->Validate() && $Validation); $Validation = ($this->email->Validate() && $Validation); $Validation = ($this->emailpub->Validate() && $Validation); $Validation = ($this->phone_work->Validate() && $Validation); $Validation = ($this->patrocina->Validate() && $Validation); $Validation = ($this->address1->Validate() && $Validation); $Validation = ($this->address2->Validate() && $Validation); $Validation = ($this->address3->Validate() && $Validation); $Validation = ($this->city->Validate() && $Validation); $Validation = ($this->state_id->Validate() && $Validation); $Validation = ($this->country_id->Validate() && $Validation); $Validation = ($this->phone_home->Validate() && $Validation); $Validation = ($this->age_id->Validate() && $Validation); $Validation = ($this->gender_id->Validate() && $Validation); $Validation = ($this->note->Validate() && $Validation); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "OnValidate"); return (($this->Errors->Count() == 0) && $Validation); } //End Validate Method //CheckErrors Method @4-8E62A573 function CheckErrors() { $errors = false; $errors = ($errors || $this->user_login->Errors->Count()); $errors = ($errors || $this->user_password->Errors->Count()); $errors = ($errors || $this->first_name->Errors->Count()); $errors = ($errors || $this->last_name->Errors->Count()); $errors = ($errors || $this->email->Errors->Count()); $errors = ($errors || $this->emailpub->Errors->Count()); $errors = ($errors || $this->phone_work->Errors->Count()); $errors = ($errors || $this->patrocina->Errors->Count()); $errors = ($errors || $this->address1->Errors->Count()); $errors = ($errors || $this->address2->Errors->Count()); $errors = ($errors || $this->address3->Errors->Count()); $errors = ($errors || $this->city->Errors->Count()); $errors = ($errors || $this->state_id->Errors->Count()); $errors = ($errors || $this->country_id->Errors->Count()); $errors = ($errors || $this->phone_home->Errors->Count()); $errors = ($errors || $this->age_id->Errors->Count()); $errors = ($errors || $this->gender_id->Errors->Count()); $errors = ($errors || $this->note->Errors->Count()); $errors = ($errors || $this->Errors->Count()); $errors = ($errors || $this->ds->Errors->Count()); return $errors; } //End CheckErrors Method //Operation Method @4-07B14D16 function Operation() { if(!$this->Visible) return; global $Redirect; global $FileName; $this->ds->Prepare(); $this->EditMode = $this->ds->AllParametersSet; if(!$this->FormSubmitted) return; if($this->FormSubmitted) { $this->PressedButton = $this->EditMode ? "Update" : "Cancel"; if(strlen(CCGetParam("Update", ""))) { $this->PressedButton = "Update"; } else if(strlen(CCGetParam("Delete", ""))) { $this->PressedButton = "Delete"; } else if(strlen(CCGetParam("Cancel", ""))) { $this->PressedButton = "Cancel"; } } $Redirect = "index.htm"; if($this->PressedButton == "Delete") { if(!CCGetEvent($this->Delete->CCSEvents, "OnClick") || !$this->DeleteRow()) { $Redirect = ""; } } else if($this->PressedButton == "Cancel") { if(!CCGetEvent($this->Cancel->CCSEvents, "OnClick")) { $Redirect = ""; } } else if($this->Validate()) { if($this->PressedButton == "Update") { if(!CCGetEvent($this->Update->CCSEvents, "OnClick") || !$this->UpdateRow()) { $Redirect = ""; } } } else { $Redirect = ""; } } //End Operation Method //UpdateRow Method @4-4140B7CA function UpdateRow() { $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeUpdate"); if(!$this->UpdateAllowed) return false; $this->ds->user_login->SetValue($this->user_login->GetValue()); $this->ds->user_password->SetValue($this->user_password->GetValue()); $this->ds->first_name->SetValue($this->first_name->GetValue()); $this->ds->last_name->SetValue($this->last_name->GetValue()); $this->ds->email->SetValue($this->email->GetValue()); $this->ds->emailpub->SetValue($this->emailpub->GetValue()); $this->ds->phone_work->SetValue($this->phone_work->GetValue()); $this->ds->patrocina->SetValue($this->patrocina->GetValue()); $this->ds->address1->SetValue($this->address1->GetValue()); $this->ds->address2->SetValue($this->address2->GetValue()); $this->ds->address3->SetValue($this->address3->GetValue()); $this->ds->city->SetValue($this->city->GetValue()); $this->ds->state_id->SetValue($this->state_id->GetValue()); $this->ds->country_id->SetValue($this->country_id->GetValue()); $this->ds->phone_home->SetValue($this->phone_home->GetValue()); $this->ds->age_id->SetValue($this->age_id->GetValue()); $this->ds->gender_id->SetValue($this->gender_id->GetValue()); $this->ds->note->SetValue($this->note->GetValue()); $this->ds->Update(); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterUpdate"); if($this->ds->Errors->Count() > 0) { echo "Error in Record " . $this->ComponentName . " / Update Operation"; $this->ds->Errors->Clear(); $this->Errors->AddError("Database command error."); } return (!$this->CheckErrors()); } //End UpdateRow Method //DeleteRow Method @4-EA88835F function DeleteRow() { $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeDelete"); if(!$this->DeleteAllowed) return false; $this->ds->Delete(); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterDelete"); if($this->ds->Errors->Count() > 0) { echo "Error in Record " . ComponentName . " / Delete Operation"; $this->ds->Errors->Clear(); $this->Errors->AddError("Database command error."); } return (!$this->CheckErrors()); } //End DeleteRow Method //Show Method @4-887B6115 function Show() { global $Tpl; global $FileName; $Error = ""; if(!$this->Visible) return; $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeSelect"); $this->state_id->Prepare(); $this->country_id->Prepare(); $this->age_id->Prepare(); $this->gender_id->Prepare(); $this->ds->open(); $RecordBlock = "Record " . $this->ComponentName; $ParentPath = $Tpl->block_path; $Tpl->block_path = $ParentPath . "/" . $RecordBlock; if($this->EditMode) { if($this->Errors->Count() == 0) { if($this->ds->Errors->Count() > 0) { echo "Error in Record users"; } else if($this->ds->next_record()) { $this->ds->SetValues(); if(!$this->FormSubmitted) { $this->user_login->SetValue($this->ds->user_login->GetValue()); $this->user_password->SetValue($this->ds->user_password->GetValue()); $this->first_name->SetValue($this->ds->first_name->GetValue()); $this->last_name->SetValue($this->ds->last_name->GetValue()); $this->email->SetValue($this->ds->email->GetValue()); $this->emailpub->SetValue($this->ds->emailpub->GetValue()); $this->phone_work->SetValue($this->ds->phone_work->GetValue()); $this->patrocina->SetValue($this->ds->patrocina->GetValue()); $this->address1->SetValue($this->ds->address1->GetValue()); $this->address2->SetValue($this->ds->address2->GetValue()); $this->address3->SetValue($this->ds->address3->GetValue()); $this->city->SetValue($this->ds->city->GetValue()); $this->state_id->SetValue($this->ds->state_id->GetValue()); $this->country_id->SetValue($this->ds->country_id->GetValue()); $this->phone_home->SetValue($this->ds->phone_home->GetValue()); $this->age_id->SetValue($this->ds->age_id->GetValue()); $this->gender_id->SetValue($this->ds->gender_id->GetValue()); $this->note->SetValue($this->ds->note->GetValue()); } } else { $this->EditMode = false; } } } if(!$this->FormSubmitted) { } if($this->FormSubmitted || $this->CheckErrors()) { $Error .= $this->user_login->Errors->ToString(); $Error .= $this->user_password->Errors->ToString(); $Error .= $this->first_name->Errors->ToString(); $Error .= $this->last_name->Errors->ToString(); $Error .= $this->email->Errors->ToString(); $Error .= $this->emailpub->Errors->ToString(); $Error .= $this->phone_work->Errors->ToString(); $Error .= $this->patrocina->Errors->ToString(); $Error .= $this->address1->Errors->ToString(); $Error .= $this->address2->Errors->ToString(); $Error .= $this->address3->Errors->ToString(); $Error .= $this->city->Errors->ToString(); $Error .= $this->state_id->Errors->ToString(); $Error .= $this->country_id->Errors->ToString(); $Error .= $this->phone_home->Errors->ToString(); $Error .= $this->age_id->Errors->ToString(); $Error .= $this->gender_id->Errors->ToString(); $Error .= $this->note->Errors->ToString(); $Error .= $this->Errors->ToString(); $Error .= $this->ds->Errors->ToString(); $Tpl->SetVar("Error", $Error); $Tpl->Parse("Error", false); } $CCSForm = $this->EditMode ? $this->ComponentName . ":" . "Edit" : $this->ComponentName; $this->HTMLFormAction = $FileName . "?" . CCAddParam(CCGetQueryString("QueryString", ""), "ccsForm", $CCSForm); $Tpl->SetVar("Action", $this->HTMLFormAction); $Tpl->SetVar("HTMLFormName", $this->ComponentName); $Tpl->SetVar("HTMLFormEnctype", $this->FormEnctype); $this->Update->Visible = $this->EditMode && $this->UpdateAllowed; $this->Delete->Visible = $this->EditMode && $this->DeleteAllowed; $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShow"); if(!$this->Visible) { $Tpl->block_path = $ParentPath; return; } $this->user_login->Show(); $this->user_password->Show(); $this->first_name->Show(); $this->last_name->Show(); $this->email->Show(); $this->emailpub->Show(); $this->phone_work->Show(); $this->patrocina->Show(); $this->address1->Show(); $this->address2->Show(); $this->address3->Show(); $this->city->Show(); $this->state_id->Show(); $this->country_id->Show(); $this->phone_home->Show(); $this->age_id->Show(); $this->gender_id->Show(); $this->note->Show(); $this->Update->Show(); $this->Delete->Show(); $this->Cancel->Show(); $Tpl->parse(); $Tpl->block_path = $ParentPath; $this->ds->close(); } //End Show Method } //End users Class @4-FCB6E20C class clsusersDataSource extends clsDBinternet { //usersDataSource Class @4-98485C1D //DataSource Variables @4-385C2528 var $CCSEvents = ""; var $CCSEventResult; var $ErrorBlock; var $UpdateParameters; var $DeleteParameters; var $wp; var $AllParametersSet; // Datasource fields var $user_login; var $user_password; var $first_name; var $last_name; var $email; var $emailpub; var $phone_work; var $patrocina; var $address1; var $address2; var $address3; var $city; var $state_id; var $country_id; var $phone_home; var $age_id; var $gender_id; var $note; //End DataSource Variables //Class_Initialize Event @4-3F84F3D5 function clsusersDataSource() { $this->ErrorBlock = "Record users/Error"; $this->Initialize(); $this->user_login = new clsField("user_login", ccsText, ""); $this->user_password = new clsField("user_password", ccsText, ""); $this->first_name = new clsField("first_name", ccsText, ""); $this->last_name = new clsField("last_name", ccsText, ""); $this->email = new clsField("email", ccsText, ""); $this->emailpub = new clsField("emailpub", ccsText, ""); $this->phone_work = new clsField("phone_work", ccsText, ""); $this->patrocina = new clsField("patrocina", ccsText, ""); $this->address1 = new clsField("address1", ccsText, ""); $this->address2 = new clsField("address2", ccsText, ""); $this->address3 = new clsField("address3", ccsText, ""); $this->city = new clsField("city", ccsText, ""); $this->state_id = new clsField("state_id", ccsInteger, ""); $this->country_id = new clsField("country_id", ccsInteger, ""); $this->phone_home = new clsField("phone_home", ccsText, ""); $this->age_id = new clsField("age_id", ccsInteger, ""); $this->gender_id = new clsField("gender_id", ccsInteger, ""); $this->note = new clsField("note", ccsMemo, ""); } //End Class_Initialize Event //Prepare Method @4-F1B601DC function Prepare() { $this->wp = new clsSQLParameters($this->ErrorBlock); $this->wp->AddParameter("1", "sesUserID", ccsInteger, "", "", $this->Parameters["sesUserID"], "", false); $this->AllParametersSet = $this->wp->AllParamsSet(); $this->wp->Criterion[1] = $this->wp->Operation(opEqual, "user_id", $this->wp->GetDBValue("1"), $this->ToSQL($this->wp->GetDBValue("1"), ccsInteger),false); $this->Where = $this->wp->Criterion[1]; } //End Prepare Method //Open Method @4-DC1AA46D function Open() { $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect"); $this->SQL = "SELECT * " . "FROM users"; $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteSelect"); $this->query(CCBuildSQL($this->SQL, $this->Where, $this->Order)); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteSelect"); $this->MoveToPage($this->AbsolutePage); } //End Open Method //SetValues Method @4-21F07D8F function SetValues() { $this->user_login->SetDBValue($this->f("user_login")); $this->user_password->SetDBValue($this->f("user_password")); $this->first_name->SetDBValue($this->f("first_name")); $this->last_name->SetDBValue($this->f("last_name")); $this->email->SetDBValue($this->f("email")); $this->emailpub->SetDBValue($this->f("zip")); $this->phone_work->SetDBValue($this->f("phone_work")); $this->patrocina->SetDBValue($this->f("phone_day")); $this->address1->SetDBValue($this->f("address1")); $this->address2->SetDBValue($this->f("address2")); $this->address3->SetDBValue($this->f("address3")); $this->city->SetDBValue($this->f("city")); $this->state_id->SetDBValue(trim($this->f("state_id"))); $this->country_id->SetDBValue(trim($this->f("country_id"))); $this->phone_home->SetDBValue($this->f("phone_home")); $this->age_id->SetDBValue(trim($this->f("age_id"))); $this->gender_id->SetDBValue(trim($this->f("gender_id"))); $this->note->SetDBValue($this->f("notes")); } //End SetValues Method //Update Method @4-4EB84ED7 function Update() { $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildUpdate"); $this->SQL = "UPDATE users SET " . "user_login=" . $this->ToSQL($this->user_login->GetDBValue(), $this->user_login->DataType) . ", " . "user_password=" . $this->ToSQL($this->user_password->GetDBValue(), $this->user_password->DataType) . ", " . "first_name=" . $this->ToSQL($this->first_name->GetDBValue(), $this->first_name->DataType) . ", " . "last_name=" . $this->ToSQL($this->last_name->GetDBValue(), $this->last_name->DataType) . ", " . "email=" . $this->ToSQL($this->email->GetDBValue(), $this->email->DataType) . ", " . "zip=" . $this->ToSQL($this->emailpub->GetDBValue(), $this->emailpub->DataType) . ", " . "phone_work=" . $this->ToSQL($this->phone_work->GetDBValue(), $this->phone_work->DataType) . ", " . "phone_day=" . $this->ToSQL($this->patrocina->GetDBValue(), $this->patrocina->DataType) . ", " . "address1=" . $this->ToSQL($this->address1->GetDBValue(), $this->address1->DataType) . ", " . "address2=" . $this->ToSQL($this->address2->GetDBValue(), $this->address2->DataType) . ", " . "address3=" . $this->ToSQL($this->address3->GetDBValue(), $this->address3->DataType) . ", " . "city=" . $this->ToSQL($this->city->GetDBValue(), $this->city->DataType) . ", " . "state_id=" . $this->ToSQL($this->state_id->GetDBValue(), $this->state_id->DataType) . ", " . "country_id=" . $this->ToSQL($this->country_id->GetDBValue(), $this->country_id->DataType) . ", " . "phone_home=" . $this->ToSQL($this->phone_home->GetDBValue(), $this->phone_home->DataType) . ", " . "age_id=" . $this->ToSQL($this->age_id->GetDBValue(), $this->age_id->DataType) . ", " . "gender_id=" . $this->ToSQL($this->gender_id->GetDBValue(), $this->gender_id->DataType) . ", " . "notes=" . $this->ToSQL($this->note->GetDBValue(), $this->note->DataType); $this->SQL = CCBuildSQL($this->SQL, $this->Where, ""); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteUpdate"); $this->query($this->SQL); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteUpdate"); if($this->Errors->Count() > 0) $this->Errors->AddError($this->Errors->ToString()); $this->close(); } //End Update Method //Delete Method @4-3C403C7D function Delete() { $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildDelete"); $this->SQL = "DELETE FROM users"; $this->SQL = CCBuildSQL($this->SQL, $this->Where, ""); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteDelete"); $this->query($this->SQL); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteDelete"); if($this->Errors->Count() > 0) $this->Errors->AddError($this->Errors->ToString()); $this->close(); } //End Delete Method } //End usersDataSource Class @4-FCB6E20C //Include Page implementation @3-B4331262 include_once("./Footer.htm"); //End Include Page implementation //Initialize Page @1-217FDA32 // Variables $FileName = ""; $Redirect = ""; $Tpl = ""; $TemplateFileName = ""; $BlockToParse = ""; $ComponentName = ""; // Events; $CCSEvents = ""; $CCSEventResult = ""; $FileName = "misdatos.htm"; $Redirect = ""; $TemplateFileName = "misdatos.html"; $BlockToParse = "main"; $PathToRoot = "./"; //End Initialize Page //Authenticate User @1-5BBE7976 CCSecurityRedirect("1;2", "Login.htm"); //End Authenticate User //Initialize Objects @1-160F6849 $DBinternet = new clsDBinternet(); // Controls $Header = new clsHeader(); $Header->BindEvents(); $Header->TemplatePath = "./"; $Header->Initialize(); $users = new clsRecordusers(); $Logout = new clsControl(ccsLink, "Logout", "Logout", ccsText, "", CCGetRequestParam("Logout", ccsGet)); $Logout->Parameters = CCGetQueryString("QueryString", Array("ccsForm")); $Logout->Parameters = CCAddParam($Logout->Parameters, "Logout", "True"); $Logout->Page = "index.htm"; $Footer = new clsFooter(); $Footer->BindEvents(); $Footer->TemplatePath = "./"; $Footer->Initialize(); $users->Initialize(); // Events include("./misdatos_events.htm"); BindEvents(); $CCSEventResult = CCGetEvent($CCSEvents, "AfterInitialize"); if($Charset) { header("Content-Type: text/html; charset=" . $Charset); } //End Initialize Objects //Initialize HTML Template @1-A0111C9D $CCSEventResult = CCGetEvent($CCSEvents, "OnInitializeView"); $Tpl = new clsTemplate(); $Tpl->LoadTemplate(TemplatePath . $TemplateFileName, "main"); $CCSEventResult = CCGetEvent($CCSEvents, "BeforeShow"); //End Initialize HTML Template //Execute Components @1-AB1E45CE $Header->Operations(); $users->Operation(); $Footer->Operations(); //End Execute Components //Go to destination page @1-61A4F1DF if($Redirect) { $CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload"); $DBinternet->close(); header("Location: " . $Redirect); exit; } //End Go to destination page //Show Page @1-5BB23711 $Header->Show("Header"); $users->Show(); $Footer->Show("Footer"); $Logout->Show(); $Tpl->Parse("main", false); $main_block = $Tpl->GetVar("main"); #$generated_with = "
Generated with CodeCharge Studio
"; $generated_with = ""; if(preg_match("/<\/body>/i", $main_block)) { $main_block = preg_replace("/<\/body>/i", $generated_with . "", $main_block); } else if(preg_match("/<\/html>/i", $main_block) && !preg_match("/<\/frameset>/i", $main_block)) { $main_block = preg_replace("/<\/html>/i", $generated_with . "", $main_block); } else if(!preg_match("/<\/frameset>/i", $main_block)) { $main_block .= $generated_with; } echo $main_block; //End Show Page //Unload Page @1-3B5A3A9A $CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload"); $DBinternet->close(); unset($Tpl); //End Unload Page ?>