Visible = true; $this->Parent = & $Parent; $this->RelativePath = $RelativePath; $this->Errors = new clsErrors(); $this->ErrorBlock = "Record sportolo/Error"; $this->DataSource = new clssportoloDataSource($this); $this->ds = & $this->DataSource; $this->InsertAllowed = true; $this->UpdateAllowed = true; $this->DeleteAllowed = true; $this->ReadAllowed = true; if($this->Visible) { $this->ComponentName = "sportolo"; $this->Attributes = new clsAttributes($this->ComponentName . ":"); $CCSForm = explode(":", 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->NEV = new clsControl(ccsTextBox, "NEV", $CCSLocales->GetText("NEV"), ccsText, "", CCGetRequestParam("NEV", $Method, NULL), $this); $this->NEV->Required = true; $this->SZULETETT = new clsControl(ccsTextBox, "SZULETETT", $CCSLocales->GetText("SZULETETT"), ccsDate, array("yyyy", "-", "mm", "-", "dd"), CCGetRequestParam("SZULETETT", $Method, NULL), $this); $this->SZULETETT->Required = true; $this->DatePicker_SZULETETT = new clsDatePicker("DatePicker_SZULETETT", "sportolo", "SZULETETT", $this); $this->MRSZ_SZAM = new clsControl(ccsTextBox, "MRSZ_SZAM", $CCSLocales->GetText("MRSZ_SZAM"), ccsInteger, "", CCGetRequestParam("MRSZ_SZAM", $Method, NULL), $this); $this->MRSZ_SZAM->Required = true; $this->ListBox1 = new clsControl(ccsListBox, "ListBox1", "ListBox1", ccsText, "", CCGetRequestParam("ListBox1", $Method, NULL), $this); $this->ListBox1->DSType = dsTable; $this->ListBox1->DataSource = new clsDBConnection1(); $this->ListBox1->ds = & $this->ListBox1->DataSource; $this->ListBox1->DataSource->SQL = "SELECT ID, KLUB, KLUB_ROV \n" . "FROM klub {SQL_Where} {SQL_OrderBy}"; $this->ListBox1->DataSource->Order = "KLUB"; list($this->ListBox1->BoundColumn, $this->ListBox1->TextColumn, $this->ListBox1->DBFormat) = array("ID", "KLUB", ""); $this->ListBox1->DataSource->Order = "KLUB"; $this->ListBox1->Required = true; $this->FERFI_NO = new clsControl(ccsListBox, "FERFI_NO", $CCSLocales->GetText("FERFI_NO"), ccsText, "", CCGetRequestParam("FERFI_NO", $Method, NULL), $this); $this->FERFI_NO->DSType = dsListOfValues; $this->FERFI_NO->Values = array(array("F", "Férfi"), array("N", "Nő")); $this->FERFI_NO->Required = true; $this->KULFOLDI_MAGYAR = new clsControl(ccsListBox, "KULFOLDI_MAGYAR", $CCSLocales->GetText("KULFOLDI_MAGYAR"), ccsText, "", CCGetRequestParam("KULFOLDI_MAGYAR", $Method, NULL), $this); $this->KULFOLDI_MAGYAR->DSType = dsListOfValues; $this->KULFOLDI_MAGYAR->Values = array(array("M", "Magyar"), array("K", "Külföldi")); $this->KULFOLDI_MAGYAR->Required = true; $this->CheckBox1 = new clsControl(ccsCheckBox, "CheckBox1", "CheckBox1", ccsInteger, "", CCGetRequestParam("CheckBox1", $Method, NULL), $this); $this->CheckBox1->CheckedValue = $this->CheckBox1->GetParsedValue(1); $this->CheckBox1->UncheckedValue = $this->CheckBox1->GetParsedValue(0); $this->TMVSZ_DIJ = new clsControl(ccsTextBox, "TMVSZ_DIJ", "TMVSZ_DIJ", ccsDate, array("yyyy", "-", "mm", "-", "dd"), CCGetRequestParam("TMVSZ_DIJ", $Method, NULL), $this); $this->DatePicker_TMVSZ_DIJ1 = new clsDatePicker("DatePicker_TMVSZ_DIJ1", "sportolo", "TMVSZ_DIJ", $this); $this->TMVK_DIJ = new clsControl(ccsTextBox, "TMVK_DIJ", "TMVK_DIJ", ccsDate, array("yyyy", "-", "mm", "-", "dd"), CCGetRequestParam("TMVK_DIJ", $Method, NULL), $this); $this->DatePicker_TMVK_DIJ1 = new clsDatePicker("DatePicker_TMVK_DIJ1", "sportolo", "TMVK_DIJ", $this); $this->TimeStampInsert = new clsControl(ccsTextBox, "TimeStampInsert", $CCSLocales->GetText("TimeStampInsert"), ccsDate, array("yyyy", "-", "mm", "-", "dd", " ", "HH", ":", "nn", ":", "ss"), CCGetRequestParam("TimeStampInsert", $Method, NULL), $this); $this->TimeStampInsert->Visible = false; $this->Insert_User_Id = new clsControl(ccsTextBox, "Insert_User_Id", $CCSLocales->GetText("Insert_User_Id"), ccsInteger, "", CCGetRequestParam("Insert_User_Id", $Method, NULL), $this); $this->Insert_User_Id->Visible = false; $this->TimeStampUpdate = new clsControl(ccsTextBox, "TimeStampUpdate", $CCSLocales->GetText("TimeStampUpdate"), ccsDate, array("yyyy", "-", "mm", "-", "dd", " ", "HH", ":", "nn", ":", "ss"), CCGetRequestParam("TimeStampUpdate", $Method, NULL), $this); $this->TimeStampUpdate->Visible = false; $this->Update_User_Id = new clsControl(ccsTextBox, "Update_User_Id", $CCSLocales->GetText("Update_User_Id"), ccsInteger, "", CCGetRequestParam("Update_User_Id", $Method, NULL), $this); $this->Update_User_Id->Visible = false; $this->Button_Insert = new clsButton("Button_Insert", $Method, $this); $this->Button_Update = new clsButton("Button_Update", $Method, $this); $this->Button_Delete = new clsButton("Button_Delete", $Method, $this); $this->Button_Cancel = new clsButton("Button_Cancel", $Method, $this); $this->CheckBox2 = new clsControl(ccsCheckBox, "CheckBox2", "CheckBox2", ccsInteger, "", CCGetRequestParam("CheckBox2", $Method, NULL), $this); $this->CheckBox2->CheckedValue = $this->CheckBox2->GetParsedValue(1); $this->CheckBox2->UncheckedValue = $this->CheckBox2->GetParsedValue(0); if(!$this->FormSubmitted) { if(!is_array($this->FERFI_NO->Value) && !strlen($this->FERFI_NO->Value) && $this->FERFI_NO->Value !== false) $this->FERFI_NO->SetText("F"); if(!is_array($this->KULFOLDI_MAGYAR->Value) && !strlen($this->KULFOLDI_MAGYAR->Value) && $this->KULFOLDI_MAGYAR->Value !== false) $this->KULFOLDI_MAGYAR->SetText("M"); if(!is_array($this->CheckBox1->Value) && !strlen($this->CheckBox1->Value) && $this->CheckBox1->Value !== false) $this->CheckBox1->SetValue(false); if(!is_array($this->TMVSZ_DIJ->Value) && !strlen($this->TMVSZ_DIJ->Value) && $this->TMVSZ_DIJ->Value !== false) $this->TMVSZ_DIJ->SetText(null); if(!is_array($this->TMVK_DIJ->Value) && !strlen($this->TMVK_DIJ->Value) && $this->TMVK_DIJ->Value !== false) $this->TMVK_DIJ->SetText(null); if(!is_array($this->CheckBox2->Value) && !strlen($this->CheckBox2->Value) && $this->CheckBox2->Value !== false) $this->CheckBox2->SetValue(false); } } } //End Class_Initialize Event //Initialize Method @2-D6CB1C94 function Initialize() { if(!$this->Visible) return; $this->DataSource->Parameters["urlID"] = CCGetFromGet("ID", NULL); } //End Initialize Method //Validate Method @2-322976E6 function Validate() { global $CCSLocales; $Validation = true; $Where = ""; if($this->EditMode && strlen($this->DataSource->Where)) $Where = " AND NOT (" . $this->DataSource->Where . ")"; $this->DataSource->MRSZ_SZAM->SetValue($this->MRSZ_SZAM->GetValue()); if(CCDLookUp("COUNT(*)", "sportolo", "MRSZ_SZAM=" . $this->DataSource->ToSQL($this->DataSource->MRSZ_SZAM->GetDBValue(), $this->DataSource->MRSZ_SZAM->DataType) . $Where, $this->DataSource) > 0) $this->MRSZ_SZAM->Errors->addError($CCSLocales->GetText("CCS_UniqueValue", $CCSLocales->GetText("MRSZ_SZAM"))); $Validation = ($this->NEV->Validate() && $Validation); $Validation = ($this->SZULETETT->Validate() && $Validation); $Validation = ($this->MRSZ_SZAM->Validate() && $Validation); $Validation = ($this->ListBox1->Validate() && $Validation); $Validation = ($this->FERFI_NO->Validate() && $Validation); $Validation = ($this->KULFOLDI_MAGYAR->Validate() && $Validation); $Validation = ($this->CheckBox1->Validate() && $Validation); $Validation = ($this->TMVSZ_DIJ->Validate() && $Validation); $Validation = ($this->TMVK_DIJ->Validate() && $Validation); $Validation = ($this->TimeStampInsert->Validate() && $Validation); $Validation = ($this->Insert_User_Id->Validate() && $Validation); $Validation = ($this->TimeStampUpdate->Validate() && $Validation); $Validation = ($this->Update_User_Id->Validate() && $Validation); $Validation = ($this->CheckBox2->Validate() && $Validation); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "OnValidate", $this); $Validation = $Validation && ($this->NEV->Errors->Count() == 0); $Validation = $Validation && ($this->SZULETETT->Errors->Count() == 0); $Validation = $Validation && ($this->MRSZ_SZAM->Errors->Count() == 0); $Validation = $Validation && ($this->ListBox1->Errors->Count() == 0); $Validation = $Validation && ($this->FERFI_NO->Errors->Count() == 0); $Validation = $Validation && ($this->KULFOLDI_MAGYAR->Errors->Count() == 0); $Validation = $Validation && ($this->CheckBox1->Errors->Count() == 0); $Validation = $Validation && ($this->TMVSZ_DIJ->Errors->Count() == 0); $Validation = $Validation && ($this->TMVK_DIJ->Errors->Count() == 0); $Validation = $Validation && ($this->TimeStampInsert->Errors->Count() == 0); $Validation = $Validation && ($this->Insert_User_Id->Errors->Count() == 0); $Validation = $Validation && ($this->TimeStampUpdate->Errors->Count() == 0); $Validation = $Validation && ($this->Update_User_Id->Errors->Count() == 0); $Validation = $Validation && ($this->CheckBox2->Errors->Count() == 0); return (($this->Errors->Count() == 0) && $Validation); } //End Validate Method //CheckErrors Method @2-EB90D77D function CheckErrors() { $errors = false; $errors = ($errors || $this->NEV->Errors->Count()); $errors = ($errors || $this->SZULETETT->Errors->Count()); $errors = ($errors || $this->DatePicker_SZULETETT->Errors->Count()); $errors = ($errors || $this->MRSZ_SZAM->Errors->Count()); $errors = ($errors || $this->ListBox1->Errors->Count()); $errors = ($errors || $this->FERFI_NO->Errors->Count()); $errors = ($errors || $this->KULFOLDI_MAGYAR->Errors->Count()); $errors = ($errors || $this->CheckBox1->Errors->Count()); $errors = ($errors || $this->TMVSZ_DIJ->Errors->Count()); $errors = ($errors || $this->DatePicker_TMVSZ_DIJ1->Errors->Count()); $errors = ($errors || $this->TMVK_DIJ->Errors->Count()); $errors = ($errors || $this->DatePicker_TMVK_DIJ1->Errors->Count()); $errors = ($errors || $this->TimeStampInsert->Errors->Count()); $errors = ($errors || $this->Insert_User_Id->Errors->Count()); $errors = ($errors || $this->TimeStampUpdate->Errors->Count()); $errors = ($errors || $this->Update_User_Id->Errors->Count()); $errors = ($errors || $this->CheckBox2->Errors->Count()); $errors = ($errors || $this->Errors->Count()); $errors = ($errors || $this->DataSource->Errors->Count()); return $errors; } //End CheckErrors Method //MasterDetail @2-ED598703 function SetPrimaryKeys($keyArray) { $this->PrimaryKeys = $keyArray; } function GetPrimaryKeys() { return $this->PrimaryKeys; } function GetPrimaryKey($keyName) { return $this->PrimaryKeys[$keyName]; } //End MasterDetail //Operation Method @2-E16BCD40 function Operation() { if(!$this->Visible) return; global $Redirect; global $FileName; $this->DataSource->Prepare(); if(!$this->FormSubmitted) { $this->EditMode = $this->DataSource->AllParametersSet; return; } if($this->FormSubmitted) { $this->PressedButton = $this->EditMode ? "Button_Update" : "Button_Insert"; if($this->Button_Insert->Pressed) { $this->PressedButton = "Button_Insert"; } else if($this->Button_Update->Pressed) { $this->PressedButton = "Button_Update"; } else if($this->Button_Delete->Pressed) { $this->PressedButton = "Button_Delete"; } else if($this->Button_Cancel->Pressed) { $this->PressedButton = "Button_Cancel"; } } $Redirect = $FileName . "?" . CCGetQueryString("QueryString", array("ccsForm")); if($this->PressedButton == "Button_Delete") { $Redirect = "sportolo_list.php" . "?" . CCGetQueryString("QueryString", array("ccsForm")); if(!CCGetEvent($this->Button_Delete->CCSEvents, "OnClick", $this->Button_Delete) || !$this->DeleteRow()) { $Redirect = ""; } } else if($this->PressedButton == "Button_Cancel") { $Redirect = "sportolo_list.php" . "?" . CCGetQueryString("QueryString", array("ccsForm")); if(!CCGetEvent($this->Button_Cancel->CCSEvents, "OnClick", $this->Button_Cancel)) { $Redirect = ""; } } else if($this->Validate()) { if($this->PressedButton == "Button_Insert") { $Redirect = "sportolo_list.php" . "?" . CCGetQueryString("QueryString", array("ccsForm")); if(!CCGetEvent($this->Button_Insert->CCSEvents, "OnClick", $this->Button_Insert) || !$this->InsertRow()) { $Redirect = ""; } } else if($this->PressedButton == "Button_Update") { $Redirect = "sportolo_list.php" . "?" . CCGetQueryString("QueryString", array("ccsForm")); if(!CCGetEvent($this->Button_Update->CCSEvents, "OnClick", $this->Button_Update) || !$this->UpdateRow()) { $Redirect = ""; } } } else { $Redirect = ""; } if ($Redirect) $this->DataSource->close(); } //End Operation Method //InsertRow Method @2-9439BA96 function InsertRow() { $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeInsert", $this); if(!$this->InsertAllowed) return false; $this->DataSource->NEV->SetValue($this->NEV->GetValue(true)); $this->DataSource->SZULETETT->SetValue($this->SZULETETT->GetValue(true)); $this->DataSource->MRSZ_SZAM->SetValue($this->MRSZ_SZAM->GetValue(true)); $this->DataSource->ListBox1->SetValue($this->ListBox1->GetValue(true)); $this->DataSource->FERFI_NO->SetValue($this->FERFI_NO->GetValue(true)); $this->DataSource->KULFOLDI_MAGYAR->SetValue($this->KULFOLDI_MAGYAR->GetValue(true)); $this->DataSource->CheckBox1->SetValue($this->CheckBox1->GetValue(true)); $this->DataSource->TMVSZ_DIJ->SetValue($this->TMVSZ_DIJ->GetValue(true)); $this->DataSource->TMVK_DIJ->SetValue($this->TMVK_DIJ->GetValue(true)); $this->DataSource->TimeStampInsert->SetValue($this->TimeStampInsert->GetValue(true)); $this->DataSource->Insert_User_Id->SetValue($this->Insert_User_Id->GetValue(true)); $this->DataSource->TimeStampUpdate->SetValue($this->TimeStampUpdate->GetValue(true)); $this->DataSource->Update_User_Id->SetValue($this->Update_User_Id->GetValue(true)); $this->DataSource->CheckBox2->SetValue($this->CheckBox2->GetValue(true)); $this->DataSource->Insert(); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterInsert", $this); return (!$this->CheckErrors()); } //End InsertRow Method //UpdateRow Method @2-2DBBB263 function UpdateRow() { $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeUpdate", $this); if(!$this->UpdateAllowed) return false; $this->DataSource->NEV->SetValue($this->NEV->GetValue(true)); $this->DataSource->SZULETETT->SetValue($this->SZULETETT->GetValue(true)); $this->DataSource->MRSZ_SZAM->SetValue($this->MRSZ_SZAM->GetValue(true)); $this->DataSource->ListBox1->SetValue($this->ListBox1->GetValue(true)); $this->DataSource->FERFI_NO->SetValue($this->FERFI_NO->GetValue(true)); $this->DataSource->KULFOLDI_MAGYAR->SetValue($this->KULFOLDI_MAGYAR->GetValue(true)); $this->DataSource->CheckBox1->SetValue($this->CheckBox1->GetValue(true)); $this->DataSource->TMVSZ_DIJ->SetValue($this->TMVSZ_DIJ->GetValue(true)); $this->DataSource->TMVK_DIJ->SetValue($this->TMVK_DIJ->GetValue(true)); $this->DataSource->TimeStampInsert->SetValue($this->TimeStampInsert->GetValue(true)); $this->DataSource->Insert_User_Id->SetValue($this->Insert_User_Id->GetValue(true)); $this->DataSource->TimeStampUpdate->SetValue($this->TimeStampUpdate->GetValue(true)); $this->DataSource->Update_User_Id->SetValue($this->Update_User_Id->GetValue(true)); $this->DataSource->CheckBox2->SetValue($this->CheckBox2->GetValue(true)); $this->DataSource->Update(); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterUpdate", $this); return (!$this->CheckErrors()); } //End UpdateRow Method //DeleteRow Method @2-299D98C3 function DeleteRow() { $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeDelete", $this); if(!$this->DeleteAllowed) return false; $this->DataSource->Delete(); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterDelete", $this); return (!$this->CheckErrors()); } //End DeleteRow Method //Show Method @2-C842FC6F function Show() { global $CCSUseAmp; global $Tpl; global $FileName; global $CCSLocales; $Error = ""; if(!$this->Visible) return; $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeSelect", $this); $this->ListBox1->Prepare(); $this->FERFI_NO->Prepare(); $this->KULFOLDI_MAGYAR->Prepare(); $RecordBlock = "Record " . $this->ComponentName; $ParentPath = $Tpl->block_path; $Tpl->block_path = $ParentPath . "/" . $RecordBlock; $this->EditMode = $this->EditMode && $this->ReadAllowed; if($this->EditMode) { if($this->DataSource->Errors->Count()){ $this->Errors->AddErrors($this->DataSource->Errors); $this->DataSource->Errors->clear(); } $this->DataSource->Open(); if($this->DataSource->Errors->Count() == 0 && $this->DataSource->next_record()) { $this->DataSource->SetValues(); if(!$this->FormSubmitted){ $this->NEV->SetValue($this->DataSource->NEV->GetValue()); $this->SZULETETT->SetValue($this->DataSource->SZULETETT->GetValue()); $this->MRSZ_SZAM->SetValue($this->DataSource->MRSZ_SZAM->GetValue()); $this->ListBox1->SetValue($this->DataSource->ListBox1->GetValue()); $this->FERFI_NO->SetValue($this->DataSource->FERFI_NO->GetValue()); $this->KULFOLDI_MAGYAR->SetValue($this->DataSource->KULFOLDI_MAGYAR->GetValue()); $this->CheckBox1->SetValue($this->DataSource->CheckBox1->GetValue()); $this->TMVSZ_DIJ->SetValue($this->DataSource->TMVSZ_DIJ->GetValue()); $this->TMVK_DIJ->SetValue($this->DataSource->TMVK_DIJ->GetValue()); $this->TimeStampInsert->SetValue($this->DataSource->TimeStampInsert->GetValue()); $this->Insert_User_Id->SetValue($this->DataSource->Insert_User_Id->GetValue()); $this->TimeStampUpdate->SetValue($this->DataSource->TimeStampUpdate->GetValue()); $this->Update_User_Id->SetValue($this->DataSource->Update_User_Id->GetValue()); $this->CheckBox2->SetValue($this->DataSource->CheckBox2->GetValue()); } } else { $this->EditMode = false; } } if($this->FormSubmitted || $this->CheckErrors()) { $Error = ""; $Error = ComposeStrings($Error, $this->NEV->Errors->ToString()); $Error = ComposeStrings($Error, $this->SZULETETT->Errors->ToString()); $Error = ComposeStrings($Error, $this->DatePicker_SZULETETT->Errors->ToString()); $Error = ComposeStrings($Error, $this->MRSZ_SZAM->Errors->ToString()); $Error = ComposeStrings($Error, $this->ListBox1->Errors->ToString()); $Error = ComposeStrings($Error, $this->FERFI_NO->Errors->ToString()); $Error = ComposeStrings($Error, $this->KULFOLDI_MAGYAR->Errors->ToString()); $Error = ComposeStrings($Error, $this->CheckBox1->Errors->ToString()); $Error = ComposeStrings($Error, $this->TMVSZ_DIJ->Errors->ToString()); $Error = ComposeStrings($Error, $this->DatePicker_TMVSZ_DIJ1->Errors->ToString()); $Error = ComposeStrings($Error, $this->TMVK_DIJ->Errors->ToString()); $Error = ComposeStrings($Error, $this->DatePicker_TMVK_DIJ1->Errors->ToString()); $Error = ComposeStrings($Error, $this->TimeStampInsert->Errors->ToString()); $Error = ComposeStrings($Error, $this->Insert_User_Id->Errors->ToString()); $Error = ComposeStrings($Error, $this->TimeStampUpdate->Errors->ToString()); $Error = ComposeStrings($Error, $this->Update_User_Id->Errors->ToString()); $Error = ComposeStrings($Error, $this->CheckBox2->Errors->ToString()); $Error = ComposeStrings($Error, $this->Errors->ToString()); $Error = ComposeStrings($Error, $this->DataSource->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", !$CCSUseAmp ? $this->HTMLFormAction : str_replace("&", "&", $this->HTMLFormAction)); $Tpl->SetVar("HTMLFormName", $this->ComponentName); $Tpl->SetVar("HTMLFormEnctype", $this->FormEnctype); $this->Button_Insert->Visible = !$this->EditMode && $this->InsertAllowed; $this->Button_Update->Visible = $this->EditMode && $this->UpdateAllowed; $this->Button_Delete->Visible = $this->EditMode && $this->DeleteAllowed; $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShow", $this); $this->Attributes->Show(); if(!$this->Visible) { $Tpl->block_path = $ParentPath; return; } $this->NEV->Show(); $this->SZULETETT->Show(); $this->DatePicker_SZULETETT->Show(); $this->MRSZ_SZAM->Show(); $this->ListBox1->Show(); $this->FERFI_NO->Show(); $this->KULFOLDI_MAGYAR->Show(); $this->CheckBox1->Show(); $this->TMVSZ_DIJ->Show(); $this->DatePicker_TMVSZ_DIJ1->Show(); $this->TMVK_DIJ->Show(); $this->DatePicker_TMVK_DIJ1->Show(); $this->TimeStampInsert->Show(); $this->Insert_User_Id->Show(); $this->TimeStampUpdate->Show(); $this->Update_User_Id->Show(); $this->Button_Insert->Show(); $this->Button_Update->Show(); $this->Button_Delete->Show(); $this->Button_Cancel->Show(); $this->CheckBox2->Show(); $Tpl->parse(); $Tpl->block_path = $ParentPath; $this->DataSource->close(); } //End Show Method } //End sportolo Class @2-FCB6E20C class clssportoloDataSource extends clsDBConnection1 { //sportoloDataSource Class @2-00EA1123 //DataSource Variables @2-5137A336 public $Parent = ""; public $CCSEvents = ""; public $CCSEventResult; public $ErrorBlock; public $CmdExecution; public $InsertParameters; public $UpdateParameters; public $DeleteParameters; public $wp; public $AllParametersSet; public $InsertFields = array(); public $UpdateFields = array(); // Datasource fields public $NEV; public $SZULETETT; public $MRSZ_SZAM; public $ListBox1; public $FERFI_NO; public $KULFOLDI_MAGYAR; public $CheckBox1; public $TMVSZ_DIJ; public $TMVK_DIJ; public $TimeStampInsert; public $Insert_User_Id; public $TimeStampUpdate; public $Update_User_Id; public $CheckBox2; //End DataSource Variables //DataSourceClass_Initialize Event @2-104DDC64 function clssportoloDataSource(& $Parent) { $this->Parent = & $Parent; $this->ErrorBlock = "Record sportolo/Error"; $this->Initialize(); $this->NEV = new clsField("NEV", ccsText, ""); $this->SZULETETT = new clsField("SZULETETT", ccsDate, $this->DateFormat); $this->MRSZ_SZAM = new clsField("MRSZ_SZAM", ccsInteger, ""); $this->ListBox1 = new clsField("ListBox1", ccsText, ""); $this->FERFI_NO = new clsField("FERFI_NO", ccsText, ""); $this->KULFOLDI_MAGYAR = new clsField("KULFOLDI_MAGYAR", ccsText, ""); $this->CheckBox1 = new clsField("CheckBox1", ccsInteger, ""); $this->TMVSZ_DIJ = new clsField("TMVSZ_DIJ", ccsDate, array("yyyy", "-", "mm", "-", "dd")); $this->TMVK_DIJ = new clsField("TMVK_DIJ", ccsDate, array("yyyy", "-", "mm", "-", "dd")); $this->TimeStampInsert = new clsField("TimeStampInsert", ccsDate, $this->DateFormat); $this->Insert_User_Id = new clsField("Insert_User_Id", ccsInteger, ""); $this->TimeStampUpdate = new clsField("TimeStampUpdate", ccsDate, $this->DateFormat); $this->Update_User_Id = new clsField("Update_User_Id", ccsInteger, ""); $this->CheckBox2 = new clsField("CheckBox2", ccsInteger, ""); $this->InsertFields["NEV"] = array("Name" => "NEV", "Value" => "", "DataType" => ccsText, "OmitIfEmpty" => 1); $this->InsertFields["SZULETETT"] = array("Name" => "SZULETETT", "Value" => "", "DataType" => ccsDate, "OmitIfEmpty" => 1); $this->InsertFields["MRSZ_SZAM"] = array("Name" => "MRSZ_SZAM", "Value" => "", "DataType" => ccsInteger, "OmitIfEmpty" => 1); $this->InsertFields["KlubID"] = array("Name" => "KlubID", "Value" => "", "DataType" => ccsText, "OmitIfEmpty" => 1); $this->InsertFields["FERFI_NO"] = array("Name" => "FERFI_NO", "Value" => "", "DataType" => ccsText, "OmitIfEmpty" => 1); $this->InsertFields["KULFOLDI_MAGYAR"] = array("Name" => "KULFOLDI_MAGYAR", "Value" => "", "DataType" => ccsText, "OmitIfEmpty" => 1); $this->InsertFields["Elfogadva"] = array("Name" => "Elfogadva", "Value" => "", "DataType" => ccsInteger); $this->InsertFields["MVSZ_DIJ"] = array("Name" => "MVSZ_DIJ", "Value" => "", "DataType" => ccsDate, "OmitIfEmpty" => 1); $this->InsertFields["MVK_DIJ"] = array("Name" => "MVK_DIJ", "Value" => "", "DataType" => ccsDate, "OmitIfEmpty" => 1); $this->InsertFields["TimeStampInsert"] = array("Name" => "TimeStampInsert", "Value" => "", "DataType" => ccsDate, "OmitIfEmpty" => 1); $this->InsertFields["Insert_User_Id"] = array("Name" => "Insert_User_Id", "Value" => "", "DataType" => ccsInteger, "OmitIfEmpty" => 1); $this->InsertFields["TimeStampUpdate"] = array("Name" => "TimeStampUpdate", "Value" => "", "DataType" => ccsDate, "OmitIfEmpty" => 1); $this->InsertFields["Update_User_Id"] = array("Name" => "Update_User_Id", "Value" => "", "DataType" => ccsInteger, "OmitIfEmpty" => 1); $this->InsertFields["d_vizsga"] = array("Name" => "d_vizsga", "Value" => "", "DataType" => ccsInteger); $this->UpdateFields["NEV"] = array("Name" => "NEV", "Value" => "", "DataType" => ccsText, "OmitIfEmpty" => 1); $this->UpdateFields["SZULETETT"] = array("Name" => "SZULETETT", "Value" => "", "DataType" => ccsDate, "OmitIfEmpty" => 1); $this->UpdateFields["MRSZ_SZAM"] = array("Name" => "MRSZ_SZAM", "Value" => "", "DataType" => ccsInteger, "OmitIfEmpty" => 1); $this->UpdateFields["KlubID"] = array("Name" => "KlubID", "Value" => "", "DataType" => ccsText, "OmitIfEmpty" => 1); $this->UpdateFields["FERFI_NO"] = array("Name" => "FERFI_NO", "Value" => "", "DataType" => ccsText, "OmitIfEmpty" => 1); $this->UpdateFields["KULFOLDI_MAGYAR"] = array("Name" => "KULFOLDI_MAGYAR", "Value" => "", "DataType" => ccsText, "OmitIfEmpty" => 1); $this->UpdateFields["Elfogadva"] = array("Name" => "Elfogadva", "Value" => "", "DataType" => ccsInteger); $this->UpdateFields["MVSZ_DIJ"] = array("Name" => "MVSZ_DIJ", "Value" => "", "DataType" => ccsDate, "OmitIfEmpty" => 1); $this->UpdateFields["MVK_DIJ"] = array("Name" => "MVK_DIJ", "Value" => "", "DataType" => ccsDate, "OmitIfEmpty" => 1); $this->UpdateFields["TimeStampInsert"] = array("Name" => "TimeStampInsert", "Value" => "", "DataType" => ccsDate, "OmitIfEmpty" => 1); $this->UpdateFields["Insert_User_Id"] = array("Name" => "Insert_User_Id", "Value" => "", "DataType" => ccsInteger, "OmitIfEmpty" => 1); $this->UpdateFields["TimeStampUpdate"] = array("Name" => "TimeStampUpdate", "Value" => "", "DataType" => ccsDate, "OmitIfEmpty" => 1); $this->UpdateFields["Update_User_Id"] = array("Name" => "Update_User_Id", "Value" => "", "DataType" => ccsInteger, "OmitIfEmpty" => 1); $this->UpdateFields["d_vizsga"] = array("Name" => "d_vizsga", "Value" => "", "DataType" => ccsInteger); } //End DataSourceClass_Initialize Event //Prepare Method @2-C51F12E3 function Prepare() { global $CCSLocales; global $DefaultDateFormat; $this->wp = new clsSQLParameters($this->ErrorBlock); $this->wp->AddParameter("1", "urlID", ccsInteger, "", "", $this->Parameters["urlID"], "", false); $this->AllParametersSet = $this->wp->AllParamsSet(); $this->wp->Criterion[1] = $this->wp->Operation(opEqual, "sportolo.ID", $this->wp->GetDBValue("1"), $this->ToSQL($this->wp->GetDBValue("1"), ccsInteger),false); $this->Where = $this->wp->Criterion[1]; } //End Prepare Method //Open Method @2-039557E9 function Open() { $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent); $this->SQL = "SELECT * \n\n" . "FROM sportolo {SQL_Where} {SQL_OrderBy}"; $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteSelect", $this->Parent); $this->PageSize = 1; $this->query($this->OptimizeSQL(CCBuildSQL($this->SQL, $this->Where, $this->Order))); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteSelect", $this->Parent); } //End Open Method //SetValues Method @2-5D4BA65B function SetValues() { $this->NEV->SetDBValue($this->f("NEV")); $this->SZULETETT->SetDBValue(trim($this->f("SZULETETT"))); $this->MRSZ_SZAM->SetDBValue(trim($this->f("MRSZ_SZAM"))); $this->ListBox1->SetDBValue($this->f("KlubID")); $this->FERFI_NO->SetDBValue($this->f("FERFI_NO")); $this->KULFOLDI_MAGYAR->SetDBValue($this->f("KULFOLDI_MAGYAR")); $this->CheckBox1->SetDBValue(trim($this->f("Elfogadva"))); $this->TMVSZ_DIJ->SetDBValue(trim($this->f("MVSZ_DIJ"))); $this->TMVK_DIJ->SetDBValue(trim($this->f("MVK_DIJ"))); $this->TimeStampInsert->SetDBValue(trim($this->f("TimeStampInsert"))); $this->Insert_User_Id->SetDBValue(trim($this->f("Insert_User_Id"))); $this->TimeStampUpdate->SetDBValue(trim($this->f("TimeStampUpdate"))); $this->Update_User_Id->SetDBValue(trim($this->f("Update_User_Id"))); $this->CheckBox2->SetDBValue(trim($this->f("d_vizsga"))); } //End SetValues Method //Insert Method @2-7192BB6E function Insert() { global $CCSLocales; global $DefaultDateFormat; $this->CmdExecution = true; $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildInsert", $this->Parent); $this->InsertFields["NEV"]["Value"] = $this->NEV->GetDBValue(true); $this->InsertFields["SZULETETT"]["Value"] = $this->SZULETETT->GetDBValue(true); $this->InsertFields["MRSZ_SZAM"]["Value"] = $this->MRSZ_SZAM->GetDBValue(true); $this->InsertFields["KlubID"]["Value"] = $this->ListBox1->GetDBValue(true); $this->InsertFields["FERFI_NO"]["Value"] = $this->FERFI_NO->GetDBValue(true); $this->InsertFields["KULFOLDI_MAGYAR"]["Value"] = $this->KULFOLDI_MAGYAR->GetDBValue(true); $this->InsertFields["Elfogadva"]["Value"] = $this->CheckBox1->GetDBValue(true); $this->InsertFields["MVSZ_DIJ"]["Value"] = $this->TMVSZ_DIJ->GetDBValue(true); $this->InsertFields["MVK_DIJ"]["Value"] = $this->TMVK_DIJ->GetDBValue(true); $this->InsertFields["TimeStampInsert"]["Value"] = $this->TimeStampInsert->GetDBValue(true); $this->InsertFields["Insert_User_Id"]["Value"] = $this->Insert_User_Id->GetDBValue(true); $this->InsertFields["TimeStampUpdate"]["Value"] = $this->TimeStampUpdate->GetDBValue(true); $this->InsertFields["Update_User_Id"]["Value"] = $this->Update_User_Id->GetDBValue(true); $this->InsertFields["d_vizsga"]["Value"] = $this->CheckBox2->GetDBValue(true); $this->SQL = CCBuildInsert("sportolo", $this->InsertFields, $this); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteInsert", $this->Parent); if($this->Errors->Count() == 0 && $this->CmdExecution) { $this->query($this->SQL); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteInsert", $this->Parent); } } //End Insert Method //Update Method @2-3CBB6772 function Update() { global $CCSLocales; global $DefaultDateFormat; $this->CmdExecution = true; $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildUpdate", $this->Parent); $this->UpdateFields["NEV"]["Value"] = $this->NEV->GetDBValue(true); $this->UpdateFields["SZULETETT"]["Value"] = $this->SZULETETT->GetDBValue(true); $this->UpdateFields["MRSZ_SZAM"]["Value"] = $this->MRSZ_SZAM->GetDBValue(true); $this->UpdateFields["KlubID"]["Value"] = $this->ListBox1->GetDBValue(true); $this->UpdateFields["FERFI_NO"]["Value"] = $this->FERFI_NO->GetDBValue(true); $this->UpdateFields["KULFOLDI_MAGYAR"]["Value"] = $this->KULFOLDI_MAGYAR->GetDBValue(true); $this->UpdateFields["Elfogadva"]["Value"] = $this->CheckBox1->GetDBValue(true); $this->UpdateFields["MVSZ_DIJ"]["Value"] = $this->TMVSZ_DIJ->GetDBValue(true); $this->UpdateFields["MVK_DIJ"]["Value"] = $this->TMVK_DIJ->GetDBValue(true); $this->UpdateFields["TimeStampInsert"]["Value"] = $this->TimeStampInsert->GetDBValue(true); $this->UpdateFields["Insert_User_Id"]["Value"] = $this->Insert_User_Id->GetDBValue(true); $this->UpdateFields["TimeStampUpdate"]["Value"] = $this->TimeStampUpdate->GetDBValue(true); $this->UpdateFields["Update_User_Id"]["Value"] = $this->Update_User_Id->GetDBValue(true); $this->UpdateFields["d_vizsga"]["Value"] = $this->CheckBox2->GetDBValue(true); $this->SQL = CCBuildUpdate("sportolo", $this->UpdateFields, $this); $this->SQL .= strlen($this->Where) ? " WHERE " . $this->Where : $this->Where; if (!strlen($this->Where) && $this->Errors->Count() == 0) $this->Errors->addError($CCSLocales->GetText("CCS_CustomOperationError_MissingParameters")); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteUpdate", $this->Parent); if($this->Errors->Count() == 0 && $this->CmdExecution) { $this->query($this->SQL); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteUpdate", $this->Parent); } } //End Update Method //Delete Method @2-03E20EB1 function Delete() { global $CCSLocales; global $DefaultDateFormat; $this->CmdExecution = true; $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildDelete", $this->Parent); $this->SQL = "DELETE FROM sportolo"; $this->SQL = CCBuildSQL($this->SQL, $this->Where, ""); if (!strlen($this->Where) && $this->Errors->Count() == 0) $this->Errors->addError($CCSLocales->GetText("CCS_CustomOperationError_MissingParameters")); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteDelete", $this->Parent); if($this->Errors->Count() == 0 && $this->CmdExecution) { $this->query($this->SQL); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteDelete", $this->Parent); } } //End Delete Method } //End sportoloDataSource Class @2-FCB6E20C //Initialize Page @1-6E55255C // Variables $FileName = ""; $Redirect = ""; $Tpl = ""; $TemplateFileName = ""; $BlockToParse = ""; $ComponentName = ""; $Attributes = ""; // Events; $CCSEvents = ""; $CCSEventResult = ""; $FileName = FileName; $Redirect = ""; $TemplateFileName = "sportolo_maint.html"; $BlockToParse = "main"; $TemplateEncoding = "UTF-8"; $ContentType = "text/html"; $PathToRoot = "./"; $Charset = $Charset ? $Charset : "utf-8"; //End Initialize Page //Authenticate User @1-1CA96F41 CCSecurityRedirect("90;70", ""); //End Authenticate User //Include events file @1-DA769EA8 include_once("./sportolo_maint_events.php"); //End Include events file //Before Initialize @1-E870CEBC $CCSEventResult = CCGetEvent($CCSEvents, "BeforeInitialize", $MainPage); //End Before Initialize //Initialize Objects @1-3CBE0097 $DBConnection1 = new clsDBConnection1(); $MainPage->Connections["Connection1"] = & $DBConnection1; $Attributes = new clsAttributes("page:"); $MainPage->Attributes = & $Attributes; // Controls $sportolo = new clsRecordsportolo("", $MainPage); $MainPage->sportolo = & $sportolo; $sportolo->Initialize(); BindEvents(); $CCSEventResult = CCGetEvent($CCSEvents, "AfterInitialize", $MainPage); if ($Charset) { header("Content-Type: " . $ContentType . "; charset=" . $Charset); } else { header("Content-Type: " . $ContentType); } //End Initialize Objects //Initialize HTML Template @1-A06E9207 $CCSEventResult = CCGetEvent($CCSEvents, "OnInitializeView", $MainPage); $Tpl = new clsTemplate($FileEncoding, $TemplateEncoding); $Tpl->LoadTemplate(PathToCurrentPage . $TemplateFileName, $BlockToParse, "UTF-8", "replace"); $Tpl->block_path = "/$BlockToParse"; $CCSEventResult = CCGetEvent($CCSEvents, "BeforeShow", $MainPage); $Attributes->SetValue("pathToRoot", ""); $Attributes->Show(); //End Initialize HTML Template //Execute Components @1-D043C16D $sportolo->Operation(); //End Execute Components //Go to destination page @1-0E8C8FED if($Redirect) { $CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload", $MainPage); $DBConnection1->close(); header("Location: " . $Redirect); unset($sportolo); unset($Tpl); exit; } //End Go to destination page //Show Page @1-52DDFF4B $sportolo->Show(); $Tpl->block_path = ""; $Tpl->Parse($BlockToParse, false); if (!isset($main_block)) $main_block = $Tpl->GetVar($BlockToParse); $GQPPQAG4E6T6N3R8C = array("