Visible = true; $this->Errors = new clsErrors(); $this->ErrorBlock = "Record users/Error"; $this->ds = new clsusersDataSource(); 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(ccsLabel, "user_login", " Login", ccsText, "", CCGetRequestParam("user_login", $Method)); $this->first_name = new clsControl(ccsLabel, "first_name", "First Name", ccsText, "", CCGetRequestParam("first_name", $Method)); $this->last_name = new clsControl(ccsLabel, "last_name", "Last Name", ccsText, "", CCGetRequestParam("last_name", $Method)); $this->email = new clsControl(ccsLink, "email", "Email", ccsText, "", CCGetRequestParam("email", $Method)); $this->phone_work = new clsControl(ccsLabel, "phone_work", "Phone Work", ccsText, "", CCGetRequestParam("phone_work", $Method)); $this->Parocinador = new clsControl(ccsLabel, "Parocinador", "Parocinador", ccsText, "", CCGetRequestParam("Parocinador", $Method)); $this->adress1 = new clsControl(ccsLabel, "adress1", "adress1", ccsText, "", CCGetRequestParam("adress1", $Method)); $this->adress2 = new clsControl(ccsLabel, "adress2", "adress2", ccsText, "", CCGetRequestParam("adress2", $Method)); $this->adress3 = new clsControl(ccsLabel, "adress3", "adress3", ccsText, "", CCGetRequestParam("adress3", $Method)); $this->city = new clsControl(ccsLabel, "city", "City", ccsText, "", CCGetRequestParam("city", $Method)); $this->state_id = new clsControl(ccsLabel, "state_id", "State Id", ccsText, "", CCGetRequestParam("state_id", $Method)); $this->country_id = new clsControl(ccsLabel, "country_id", "Country Id", ccsText, "", CCGetRequestParam("country_id", $Method)); $this->phone_home = new clsControl(ccsLabel, "phone_home", "Phone Home", ccsText, "", CCGetRequestParam("phone_home", $Method)); $this->edad = new clsControl(ccsLabel, "edad", "edad", ccsText, "", CCGetRequestParam("edad", $Method)); $this->gender_id = new clsControl(ccsLabel, "gender_id", "Gender Id", ccsText, "", CCGetRequestParam("gender_id", $Method)); $this->note = new clsControl(ccsLabel, "note", "Note", ccsMemo, "", CCGetRequestParam("note", $Method)); $this->Cancel = new clsButton("Cancel"); } } //End Class_Initialize Event //Initialize Method @4-C016A25E function Initialize() { if(!$this->Visible) return; $this->ds->Parameters["urluser_id"] = CCGetFromGet("user_id", ""); } //End Initialize Method //Validate Method @4-7E1FC38C function Validate() { $Validation = true; $Where = ""; $this->CCSEventResult = CCGetEvent($this->CCSEvents, "OnValidate"); return (($this->Errors->Count() == 0) && $Validation); } //End Validate Method //CheckErrors Method @4-DF5B6CC9 function CheckErrors() { $errors = false; $errors = ($errors || $this->user_login->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->phone_work->Errors->Count()); $errors = ($errors || $this->Parocinador->Errors->Count()); $errors = ($errors || $this->adress1->Errors->Count()); $errors = ($errors || $this->adress2->Errors->Count()); $errors = ($errors || $this->adress3->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->edad->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-6B95D4BA 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 = "Cancel"; if(strlen(CCGetParam("Cancel", ""))) { $this->PressedButton = "Cancel"; } } $Redirect = "index.htm"; if($this->PressedButton == "Cancel") { if(!CCGetEvent($this->Cancel->CCSEvents, "OnClick")) { $Redirect = ""; } } else { $Redirect = ""; } } //End Operation Method //Show Method @4-FD7872BC function Show() { global $Tpl; global $FileName; $Error = ""; if(!$this->Visible) return; $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeSelect"); $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(); $this->user_login->SetValue($this->ds->user_login->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->email->SetLink(""); $this->email->Page = $this->ds->f("email"); $this->phone_work->SetValue($this->ds->phone_work->GetValue()); $this->Parocinador->SetValue($this->ds->Parocinador->GetValue()); $this->adress1->SetValue($this->ds->adress1->GetValue()); $this->adress2->SetValue($this->ds->adress2->GetValue()); $this->adress3->SetValue($this->ds->adress3->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->edad->SetValue($this->ds->edad->GetValue()); $this->gender_id->SetValue($this->ds->gender_id->GetValue()); $this->note->SetValue($this->ds->note->GetValue()); if(!$this->FormSubmitted) { } } else { $this->EditMode = false; } } } if(!$this->FormSubmitted) { } if($this->FormSubmitted || $this->CheckErrors()) { $Error .= $this->user_login->Errors->ToString(); $Error .= $this->first_name->Errors->ToString(); $Error .= $this->last_name->Errors->ToString(); $Error .= $this->email->Errors->ToString(); $Error .= $this->phone_work->Errors->ToString(); $Error .= $this->Parocinador->Errors->ToString(); $Error .= $this->adress1->Errors->ToString(); $Error .= $this->adress2->Errors->ToString(); $Error .= $this->adress3->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->edad->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->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShow"); if(!$this->Visible) { $Tpl->block_path = $ParentPath; return; } $this->user_login->Show(); $this->first_name->Show(); $this->last_name->Show(); $this->email->Show(); $this->phone_work->Show(); $this->Parocinador->Show(); $this->adress1->Show(); $this->adress2->Show(); $this->adress3->Show(); $this->city->Show(); $this->state_id->Show(); $this->country_id->Show(); $this->phone_home->Show(); $this->edad->Show(); $this->gender_id->Show(); $this->note->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-F7937A3F var $CCSEvents = ""; var $CCSEventResult; var $ErrorBlock; var $wp; var $AllParametersSet; // Datasource fields var $user_login; var $first_name; var $last_name; var $email; var $phone_work; var $Parocinador; var $adress1; var $adress2; var $adress3; var $city; var $state_id; var $country_id; var $phone_home; var $edad; var $gender_id; var $note; //End DataSource Variables //Class_Initialize Event @4-CF3D7458 function clsusersDataSource() { $this->ErrorBlock = "Record users/Error"; $this->Initialize(); $this->user_login = new clsField("user_login", ccsText, ""); $this->first_name = new clsField("first_name", ccsText, ""); $this->last_name = new clsField("last_name", ccsText, ""); $this->email = new clsField("email", ccsText, ""); $this->phone_work = new clsField("phone_work", ccsText, ""); $this->Parocinador = new clsField("Parocinador", ccsText, ""); $this->adress1 = new clsField("adress1", ccsText, ""); $this->adress2 = new clsField("adress2", ccsText, ""); $this->adress3 = new clsField("adress3", ccsText, ""); $this->city = new clsField("city", ccsText, ""); $this->state_id = new clsField("state_id", ccsText, ""); $this->country_id = new clsField("country_id", ccsText, ""); $this->phone_home = new clsField("phone_home", ccsText, ""); $this->edad = new clsField("edad", ccsText, ""); $this->gender_id = new clsField("gender_id", ccsText, ""); $this->note = new clsField("note", ccsMemo, ""); } //End Class_Initialize Event //Prepare Method @4-BAD07477 function Prepare() { $this->wp = new clsSQLParameters($this->ErrorBlock); $this->wp->AddParameter("1", "urluser_id", ccsInteger, "", "", $this->Parameters["urluser_id"], "", 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-22C1C315 function Open() { $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect"); $this->SQL = "SELECT * " . "FROM (((users LEFT JOIN countries ON " . "users.country_id = countries.country_id) LEFT JOIN states ON " . "users.state_id = states.state_id) LEFT JOIN genders ON " . "users.gender_id = genders.gender_id) INNER JOIN ages ON " . "ages.age_id = users.age_id"; $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-021B11A1 function SetValues() { $this->user_login->SetDBValue($this->f("user_login")); $this->first_name->SetDBValue($this->f("first_name")); $this->last_name->SetDBValue($this->f("last_name")); $this->email->SetDBValue($this->f("zip")); $this->phone_work->SetDBValue($this->f("phone_work")); $this->Parocinador->SetDBValue($this->f("phone_day")); $this->adress1->SetDBValue($this->f("address1")); $this->adress2->SetDBValue($this->f("address2")); $this->adress3->SetDBValue($this->f("address3")); $this->city->SetDBValue($this->f("city")); $this->state_id->SetDBValue($this->f("state_name")); $this->country_id->SetDBValue($this->f("country_name")); $this->phone_home->SetDBValue($this->f("phone_home")); $this->edad->SetDBValue($this->f("age_name")); $this->gender_id->SetDBValue($this->f("gender_name")); $this->note->SetDBValue($this->f("notes")); } //End SetValues Method } //End usersDataSource Class @4-FCB6E20C //Include Page implementation @3-B4331262 include_once("./Footer.htm"); //End Include Page implementation //Initialize Page @1-3EFC67DB // Variables $FileName = ""; $Redirect = ""; $Tpl = ""; $TemplateFileName = ""; $BlockToParse = ""; $ComponentName = ""; // Events; $CCSEvents = ""; $CCSEventResult = ""; $FileName = "verregistro.htm"; $Redirect = ""; $TemplateFileName = "verregistro.html"; $BlockToParse = "main"; $PathToRoot = "./"; //End Initialize Page //Initialize Objects @1-58024712 $DBinternet = new clsDBinternet(); // Controls $Header = new clsHeader(); $Header->BindEvents(); $Header->TemplatePath = "./"; $Header->Initialize(); $users = new clsRecordusers(); $Footer = new clsFooter(); $Footer->BindEvents(); $Footer->TemplatePath = "./"; $Footer->Initialize(); $users->Initialize(); $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-A8206A32 $Header->Show("Header"); $users->Show(); $Footer->Show("Footer"); $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 ?>