Visible = true; $this->Parent = & $Parent; $this->RelativePath = $RelativePath; $this->Errors = new clsErrors(); $this->ErrorBlock = "Record internetcomps/Error"; $this->DataSource = new clsinternetcompsDataSource($this); $this->ds = & $this->DataSource; $this->InsertAllowed = true; if($this->Visible) { $this->ComponentName = "internetcomps"; $CCSForm = split(":", CCGetFromGet("ccsForm", ""), 2); if(sizeof($CCSForm) == 1) $CCSForm[1] = ""; list($FormName, $FormMethod) = $CCSForm; $this->EditMode = ($FormMethod == "Edit"); $this->FormEnctype = "multipart/form-data"; $this->FormSubmitted = ($FormName == $this->ComponentName); $Method = $this->FormSubmitted ? ccsPost : ccsGet; $this->authors = & new clsControl(ccsTextArea, "authors", "Authors", ccsMemo, "", CCGetRequestParam("authors", $Method, NULL), $this); $this->authors->Required = true; $this->co_authors = & new clsControl(ccsTextArea, "co_authors", "Co Authors", ccsMemo, "", CCGetRequestParam("co_authors", $Method, NULL), $this); $this->project_title = & new clsControl(ccsTextArea, "project_title", "Project Title", ccsMemo, "", CCGetRequestParam("project_title", $Method, NULL), $this); $this->project_title->Required = true; $this->entry_description_en = & new clsControl(ccsTextArea, "entry_description_en", "Entry Description En", ccsMemo, "", CCGetRequestParam("entry_description_en", $Method, NULL), $this); $this->entry_description_hr = & new clsControl(ccsTextArea, "entry_description_hr", "Entry Description Hr", ccsMemo, "", CCGetRequestParam("entry_description_hr", $Method, NULL), $this); $this->FileUpload1 = & new clsFileUpload("FileUpload1", "FileUpload1", "temp/", "items/", "*", "", 1600000, $this); $this->TextBox1 = & new clsControl(ccsTextBox, "TextBox1", "TextBox1", ccsText, "", CCGetRequestParam("TextBox1", $Method, NULL), $this); $this->FileUpload2 = & new clsFileUpload("FileUpload2", "FileUpload2", "temp/", "items/", "*", "", 1600000, $this); $this->TextBox2 = & new clsControl(ccsTextBox, "TextBox2", "TextBox2", ccsText, "", CCGetRequestParam("TextBox2", $Method, NULL), $this); $this->FileUpload3 = & new clsFileUpload("FileUpload3", "FileUpload3", "temp/", "items/", "*", "", 1600000, $this); $this->TextBox3 = & new clsControl(ccsTextBox, "TextBox3", "TextBox3", ccsText, "", CCGetRequestParam("TextBox3", $Method, NULL), $this); $this->associated_concepts = & new clsControl(ccsTextBox, "associated_concepts", "Associated Concepts", ccsText, "", CCGetRequestParam("associated_concepts", $Method, NULL), $this); $this->FileUpload4 = & new clsFileUpload("FileUpload4", "FileUpload4", "temp/", "video/", "*", "", 100000000000, $this); $this->occupation = & new clsControl(ccsTextBox, "occupation", "Occupation", ccsText, "", CCGetRequestParam("occupation", $Method, NULL), $this); $this->occupation->Required = true; $this->place = & new clsControl(ccsTextBox, "place", "Place", ccsText, "", CCGetRequestParam("place", $Method, NULL), $this); $this->place->Required = true; $this->address = & new clsControl(ccsTextBox, "address", "Address", ccsText, "", CCGetRequestParam("address", $Method, NULL), $this); $this->address->Required = true; $this->city = & new clsControl(ccsTextBox, "city", "City", ccsText, "", CCGetRequestParam("city", $Method, NULL), $this); $this->city->Required = true; $this->state = & new clsControl(ccsTextBox, "state", "State", ccsText, "", CCGetRequestParam("state", $Method, NULL), $this); $this->zip = & new clsControl(ccsTextBox, "zip", "Zip", ccsText, "", CCGetRequestParam("zip", $Method, NULL), $this); $this->zip->Required = true; $this->country = & new clsControl(ccsListBox, "country", "Country", ccsInteger, "", CCGetRequestParam("country", $Method, NULL), $this); $this->country->DSType = dsTable; list($this->country->BoundColumn, $this->country->TextColumn, $this->country->DBFormat) = array("ID", "Country", ""); $this->country->DataSource = new clsDBzs41(); $this->country->ds = & $this->country->DataSource; $this->country->DataSource->SQL = "SELECT * \n" . "FROM drzave {SQL_Where} {SQL_OrderBy}"; $this->country->Required = true; $this->telephone = & new clsControl(ccsTextBox, "telephone", "Telephone", ccsText, "", CCGetRequestParam("telephone", $Method, NULL), $this); $this->telephone->Required = true; $this->facsimile = & new clsControl(ccsTextBox, "facsimile", "Facsimile", ccsText, "", CCGetRequestParam("facsimile", $Method, NULL), $this); $this->email = & new clsControl(ccsTextBox, "email", "Email", ccsText, "", CCGetRequestParam("email", $Method, NULL), $this); $this->email->Required = true; $this->web = & new clsControl(ccsTextBox, "web", "Web", ccsText, "", CCGetRequestParam("web", $Method, NULL), $this); $this->datumprijave = & new clsControl(ccsHidden, "datumprijave", "Datumprijave", ccsDate, array("yyyy", "-", "mm", "-", "dd", " ", "HH", ":", "nn", ":", "ss"), CCGetRequestParam("datumprijave", $Method, NULL), $this); $this->datumprijave->Required = true; $this->Button_Insert = & new clsButton("Button_Insert", $Method, $this); if(!$this->FormSubmitted) { if(!is_array($this->datumprijave->Value) && !strlen($this->datumprijave->Value) && $this->datumprijave->Value !== false) $this->datumprijave->SetValue(time()); } } } //End Class_Initialize Event //Initialize Method @2-73559224 function Initialize() { if(!$this->Visible) return; $this->DataSource->Parameters["urlinternetcomp_id"] = CCGetFromGet("internetcomp_id", NULL); } //End Initialize Method //Validate Method @2-7B59D0DE function Validate() { global $CCSLocales; $Validation = true; $Where = ""; $Validation = ($this->authors->Validate() && $Validation); $Validation = ($this->co_authors->Validate() && $Validation); $Validation = ($this->project_title->Validate() && $Validation); $Validation = ($this->entry_description_en->Validate() && $Validation); $Validation = ($this->entry_description_hr->Validate() && $Validation); $Validation = ($this->FileUpload1->Validate() && $Validation); $Validation = ($this->TextBox1->Validate() && $Validation); $Validation = ($this->FileUpload2->Validate() && $Validation); $Validation = ($this->TextBox2->Validate() && $Validation); $Validation = ($this->FileUpload3->Validate() && $Validation); $Validation = ($this->TextBox3->Validate() && $Validation); $Validation = ($this->associated_concepts->Validate() && $Validation); $Validation = ($this->FileUpload4->Validate() && $Validation); $Validation = ($this->occupation->Validate() && $Validation); $Validation = ($this->place->Validate() && $Validation); $Validation = ($this->address->Validate() && $Validation); $Validation = ($this->city->Validate() && $Validation); $Validation = ($this->state->Validate() && $Validation); $Validation = ($this->zip->Validate() && $Validation); $Validation = ($this->country->Validate() && $Validation); $Validation = ($this->telephone->Validate() && $Validation); $Validation = ($this->facsimile->Validate() && $Validation); $Validation = ($this->email->Validate() && $Validation); $Validation = ($this->web->Validate() && $Validation); $Validation = ($this->datumprijave->Validate() && $Validation); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "OnValidate", $this); $Validation = $Validation && ($this->authors->Errors->Count() == 0); $Validation = $Validation && ($this->co_authors->Errors->Count() == 0); $Validation = $Validation && ($this->project_title->Errors->Count() == 0); $Validation = $Validation && ($this->entry_description_en->Errors->Count() == 0); $Validation = $Validation && ($this->entry_description_hr->Errors->Count() == 0); $Validation = $Validation && ($this->FileUpload1->Errors->Count() == 0); $Validation = $Validation && ($this->TextBox1->Errors->Count() == 0); $Validation = $Validation && ($this->FileUpload2->Errors->Count() == 0); $Validation = $Validation && ($this->TextBox2->Errors->Count() == 0); $Validation = $Validation && ($this->FileUpload3->Errors->Count() == 0); $Validation = $Validation && ($this->TextBox3->Errors->Count() == 0); $Validation = $Validation && ($this->associated_concepts->Errors->Count() == 0); $Validation = $Validation && ($this->FileUpload4->Errors->Count() == 0); $Validation = $Validation && ($this->occupation->Errors->Count() == 0); $Validation = $Validation && ($this->place->Errors->Count() == 0); $Validation = $Validation && ($this->address->Errors->Count() == 0); $Validation = $Validation && ($this->city->Errors->Count() == 0); $Validation = $Validation && ($this->state->Errors->Count() == 0); $Validation = $Validation && ($this->zip->Errors->Count() == 0); $Validation = $Validation && ($this->country->Errors->Count() == 0); $Validation = $Validation && ($this->telephone->Errors->Count() == 0); $Validation = $Validation && ($this->facsimile->Errors->Count() == 0); $Validation = $Validation && ($this->email->Errors->Count() == 0); $Validation = $Validation && ($this->web->Errors->Count() == 0); $Validation = $Validation && ($this->datumprijave->Errors->Count() == 0); return (($this->Errors->Count() == 0) && $Validation); } //End Validate Method //CheckErrors Method @2-2C68EFA1 function CheckErrors() { $errors = false; $errors = ($errors || $this->authors->Errors->Count()); $errors = ($errors || $this->co_authors->Errors->Count()); $errors = ($errors || $this->project_title->Errors->Count()); $errors = ($errors || $this->entry_description_en->Errors->Count()); $errors = ($errors || $this->entry_description_hr->Errors->Count()); $errors = ($errors || $this->FileUpload1->Errors->Count()); $errors = ($errors || $this->TextBox1->Errors->Count()); $errors = ($errors || $this->FileUpload2->Errors->Count()); $errors = ($errors || $this->TextBox2->Errors->Count()); $errors = ($errors || $this->FileUpload3->Errors->Count()); $errors = ($errors || $this->TextBox3->Errors->Count()); $errors = ($errors || $this->associated_concepts->Errors->Count()); $errors = ($errors || $this->FileUpload4->Errors->Count()); $errors = ($errors || $this->occupation->Errors->Count()); $errors = ($errors || $this->place->Errors->Count()); $errors = ($errors || $this->address->Errors->Count()); $errors = ($errors || $this->city->Errors->Count()); $errors = ($errors || $this->state->Errors->Count()); $errors = ($errors || $this->zip->Errors->Count()); $errors = ($errors || $this->country->Errors->Count()); $errors = ($errors || $this->telephone->Errors->Count()); $errors = ($errors || $this->facsimile->Errors->Count()); $errors = ($errors || $this->email->Errors->Count()); $errors = ($errors || $this->web->Errors->Count()); $errors = ($errors || $this->datumprijave->Errors->Count()); $errors = ($errors || $this->Errors->Count()); $errors = ($errors || $this->DataSource->Errors->Count()); return $errors; } //End CheckErrors Method //Operation Method @2-6EE68B4C function Operation() { if(!$this->Visible) return; global $Redirect; global $FileName; $this->DataSource->Prepare(); if(!$this->FormSubmitted) { $this->EditMode = $this->DataSource->AllParametersSet; return; } $this->FileUpload1->Upload(); $this->FileUpload2->Upload(); $this->FileUpload3->Upload(); $this->FileUpload4->Upload(); if($this->FormSubmitted) { $this->PressedButton = "Button_Insert"; if($this->Button_Insert->Pressed) { $this->PressedButton = "Button_Insert"; } } $Redirect = "wc_call_thankyou.htm" . "?" . CCGetQueryString("QueryString", array("ccsForm")); if($this->Validate()) { if($this->PressedButton == "Button_Insert") { if(!CCGetEvent($this->Button_Insert->CCSEvents, "OnClick", $this->Button_Insert) || !$this->InsertRow()) { $Redirect = ""; } } } else { $Redirect = ""; } if ($Redirect) $this->DataSource->close(); } //End Operation Method //InsertRow Method @2-4F5DB359 function InsertRow() { $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeInsert", $this); if(!$this->InsertAllowed) return false; $this->DataSource->authors->SetValue($this->authors->GetValue(true)); $this->DataSource->co_authors->SetValue($this->co_authors->GetValue(true)); $this->DataSource->project_title->SetValue($this->project_title->GetValue(true)); $this->DataSource->entry_description_en->SetValue($this->entry_description_en->GetValue(true)); $this->DataSource->entry_description_hr->SetValue($this->entry_description_hr->GetValue(true)); $this->DataSource->FileUpload1->SetValue($this->FileUpload1->GetValue(true)); $this->DataSource->TextBox1->SetValue($this->TextBox1->GetValue(true)); $this->DataSource->FileUpload2->SetValue($this->FileUpload2->GetValue(true)); $this->DataSource->TextBox2->SetValue($this->TextBox2->GetValue(true)); $this->DataSource->FileUpload3->SetValue($this->FileUpload3->GetValue(true)); $this->DataSource->TextBox3->SetValue($this->TextBox3->GetValue(true)); $this->DataSource->associated_concepts->SetValue($this->associated_concepts->GetValue(true)); $this->DataSource->FileUpload4->SetValue($this->FileUpload4->GetValue(true)); $this->DataSource->occupation->SetValue($this->occupation->GetValue(true)); $this->DataSource->place->SetValue($this->place->GetValue(true)); $this->DataSource->address->SetValue($this->address->GetValue(true)); $this->DataSource->city->SetValue($this->city->GetValue(true)); $this->DataSource->state->SetValue($this->state->GetValue(true)); $this->DataSource->zip->SetValue($this->zip->GetValue(true)); $this->DataSource->country->SetValue($this->country->GetValue(true)); $this->DataSource->telephone->SetValue($this->telephone->GetValue(true)); $this->DataSource->facsimile->SetValue($this->facsimile->GetValue(true)); $this->DataSource->email->SetValue($this->email->GetValue(true)); $this->DataSource->web->SetValue($this->web->GetValue(true)); $this->DataSource->datumprijave->SetValue($this->datumprijave->GetValue(true)); $this->DataSource->Insert(); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterInsert", $this); if($this->DataSource->Errors->Count() == 0) { $this->FileUpload1->Move(); $this->FileUpload2->Move(); $this->FileUpload3->Move(); $this->FileUpload4->Move(); } return (!$this->CheckErrors()); } //End InsertRow Method //Show Method @2-70F69391 function Show() { global $Tpl; global $FileName; global $CCSLocales; $Error = ""; if(!$this->Visible) return; $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeSelect", $this); $this->country->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->authors->SetValue($this->DataSource->authors->GetValue()); $this->co_authors->SetValue($this->DataSource->co_authors->GetValue()); $this->project_title->SetValue($this->DataSource->project_title->GetValue()); $this->entry_description_en->SetValue($this->DataSource->entry_description_en->GetValue()); $this->entry_description_hr->SetValue($this->DataSource->entry_description_hr->GetValue()); $this->FileUpload1->SetValue($this->DataSource->FileUpload1->GetValue()); $this->TextBox1->SetValue($this->DataSource->TextBox1->GetValue()); $this->FileUpload2->SetValue($this->DataSource->FileUpload2->GetValue()); $this->TextBox2->SetValue($this->DataSource->TextBox2->GetValue()); $this->FileUpload3->SetValue($this->DataSource->FileUpload3->GetValue()); $this->TextBox3->SetValue($this->DataSource->TextBox3->GetValue()); $this->associated_concepts->SetValue($this->DataSource->associated_concepts->GetValue()); $this->FileUpload4->SetValue($this->DataSource->FileUpload4->GetValue()); $this->occupation->SetValue($this->DataSource->occupation->GetValue()); $this->place->SetValue($this->DataSource->place->GetValue()); $this->address->SetValue($this->DataSource->address->GetValue()); $this->city->SetValue($this->DataSource->city->GetValue()); $this->state->SetValue($this->DataSource->state->GetValue()); $this->zip->SetValue($this->DataSource->zip->GetValue()); $this->country->SetValue($this->DataSource->country->GetValue()); $this->telephone->SetValue($this->DataSource->telephone->GetValue()); $this->facsimile->SetValue($this->DataSource->facsimile->GetValue()); $this->email->SetValue($this->DataSource->email->GetValue()); $this->web->SetValue($this->DataSource->web->GetValue()); $this->datumprijave->SetValue($this->DataSource->datumprijave->GetValue()); } } else { $this->EditMode = false; } } if($this->FormSubmitted || $this->CheckErrors()) { $Error = ""; $Error = ComposeStrings($Error, $this->authors->Errors->ToString()); $Error = ComposeStrings($Error, $this->co_authors->Errors->ToString()); $Error = ComposeStrings($Error, $this->project_title->Errors->ToString()); $Error = ComposeStrings($Error, $this->entry_description_en->Errors->ToString()); $Error = ComposeStrings($Error, $this->entry_description_hr->Errors->ToString()); $Error = ComposeStrings($Error, $this->FileUpload1->Errors->ToString()); $Error = ComposeStrings($Error, $this->TextBox1->Errors->ToString()); $Error = ComposeStrings($Error, $this->FileUpload2->Errors->ToString()); $Error = ComposeStrings($Error, $this->TextBox2->Errors->ToString()); $Error = ComposeStrings($Error, $this->FileUpload3->Errors->ToString()); $Error = ComposeStrings($Error, $this->TextBox3->Errors->ToString()); $Error = ComposeStrings($Error, $this->associated_concepts->Errors->ToString()); $Error = ComposeStrings($Error, $this->FileUpload4->Errors->ToString()); $Error = ComposeStrings($Error, $this->occupation->Errors->ToString()); $Error = ComposeStrings($Error, $this->place->Errors->ToString()); $Error = ComposeStrings($Error, $this->address->Errors->ToString()); $Error = ComposeStrings($Error, $this->city->Errors->ToString()); $Error = ComposeStrings($Error, $this->state->Errors->ToString()); $Error = ComposeStrings($Error, $this->zip->Errors->ToString()); $Error = ComposeStrings($Error, $this->country->Errors->ToString()); $Error = ComposeStrings($Error, $this->telephone->Errors->ToString()); $Error = ComposeStrings($Error, $this->facsimile->Errors->ToString()); $Error = ComposeStrings($Error, $this->email->Errors->ToString()); $Error = ComposeStrings($Error, $this->web->Errors->ToString()); $Error = ComposeStrings($Error, $this->datumprijave->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", $this->HTMLFormAction); $Tpl->SetVar("HTMLFormName", $this->ComponentName); $Tpl->SetVar("HTMLFormEnctype", $this->FormEnctype); $this->Button_Insert->Visible = !$this->EditMode && $this->InsertAllowed; $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShow", $this); if(!$this->Visible) { $Tpl->block_path = $ParentPath; return; } $this->authors->Show(); $this->co_authors->Show(); $this->project_title->Show(); $this->entry_description_en->Show(); $this->entry_description_hr->Show(); $this->FileUpload1->Show(); $this->TextBox1->Show(); $this->FileUpload2->Show(); $this->TextBox2->Show(); $this->FileUpload3->Show(); $this->TextBox3->Show(); $this->associated_concepts->Show(); $this->FileUpload4->Show(); $this->occupation->Show(); $this->place->Show(); $this->address->Show(); $this->city->Show(); $this->state->Show(); $this->zip->Show(); $this->country->Show(); $this->telephone->Show(); $this->facsimile->Show(); $this->email->Show(); $this->web->Show(); $this->datumprijave->Show(); $this->Button_Insert->Show(); $Tpl->parse(); $Tpl->block_path = $ParentPath; $this->DataSource->close(); } //End Show Method } //End internetcomps Class @2-FCB6E20C class clsinternetcompsDataSource extends clsDBzs41 { //internetcompsDataSource Class @2-FBC4AD97 //DataSource Variables @2-2721352D var $Parent = ""; var $CCSEvents = ""; var $CCSEventResult; var $ErrorBlock; var $CmdExecution; var $InsertParameters; var $wp; var $AllParametersSet; // Datasource fields var $authors; var $co_authors; var $project_title; var $entry_description_en; var $entry_description_hr; var $FileUpload1; var $TextBox1; var $FileUpload2; var $TextBox2; var $FileUpload3; var $TextBox3; var $associated_concepts; var $FileUpload4; var $occupation; var $place; var $address; var $city; var $state; var $zip; var $country; var $telephone; var $facsimile; var $email; var $web; var $datumprijave; //End DataSource Variables //DataSourceClass_Initialize Event @2-125F197B function clsinternetcompsDataSource(& $Parent) { $this->Parent = & $Parent; $this->ErrorBlock = "Record internetcomps/Error"; $this->Initialize(); $this->authors = new clsField("authors", ccsMemo, ""); $this->co_authors = new clsField("co_authors", ccsMemo, ""); $this->project_title = new clsField("project_title", ccsMemo, ""); $this->entry_description_en = new clsField("entry_description_en", ccsMemo, ""); $this->entry_description_hr = new clsField("entry_description_hr", ccsMemo, ""); $this->FileUpload1 = new clsField("FileUpload1", ccsText, ""); $this->TextBox1 = new clsField("TextBox1", ccsText, ""); $this->FileUpload2 = new clsField("FileUpload2", ccsText, ""); $this->TextBox2 = new clsField("TextBox2", ccsText, ""); $this->FileUpload3 = new clsField("FileUpload3", ccsText, ""); $this->TextBox3 = new clsField("TextBox3", ccsText, ""); $this->associated_concepts = new clsField("associated_concepts", ccsText, ""); $this->FileUpload4 = new clsField("FileUpload4", ccsText, ""); $this->occupation = new clsField("occupation", ccsText, ""); $this->place = new clsField("place", ccsText, ""); $this->address = new clsField("address", ccsText, ""); $this->city = new clsField("city", ccsText, ""); $this->state = new clsField("state", ccsText, ""); $this->zip = new clsField("zip", ccsText, ""); $this->country = new clsField("country", ccsInteger, ""); $this->telephone = new clsField("telephone", ccsText, ""); $this->facsimile = new clsField("facsimile", ccsText, ""); $this->email = new clsField("email", ccsText, ""); $this->web = new clsField("web", ccsText, ""); $this->datumprijave = new clsField("datumprijave", ccsDate, array("yyyy", "-", "mm", "-", "dd", " ", "HH", ":", "nn", ":", "ss")); $this->InsertFields["authors"] = array("Name" => "authors", "Value" => "", "DataType" => ccsMemo); $this->InsertFields["co_authors"] = array("Name" => "co_authors", "Value" => "", "DataType" => ccsMemo); $this->InsertFields["project_title"] = array("Name" => "project_title", "Value" => "", "DataType" => ccsMemo); $this->InsertFields["entry_description_en"] = array("Name" => "entry_description_en", "Value" => "", "DataType" => ccsMemo); $this->InsertFields["entry_description_hr"] = array("Name" => "entry_description_hr", "Value" => "", "DataType" => ccsMemo); $this->InsertFields["item_1"] = array("Name" => "item_1", "Value" => "", "DataType" => ccsText); $this->InsertFields["caption1"] = array("Name" => "caption1", "Value" => "", "DataType" => ccsText); $this->InsertFields["item_2"] = array("Name" => "item_2", "Value" => "", "DataType" => ccsText); $this->InsertFields["caption2"] = array("Name" => "caption2", "Value" => "", "DataType" => ccsText); $this->InsertFields["item_3"] = array("Name" => "item_3", "Value" => "", "DataType" => ccsText); $this->InsertFields["caprtion3"] = array("Name" => "caprtion3", "Value" => "", "DataType" => ccsText); $this->InsertFields["associated_concepts"] = array("Name" => "associated_concepts", "Value" => "", "DataType" => ccsText); $this->InsertFields["video"] = array("Name" => "video", "Value" => "", "DataType" => ccsText); $this->InsertFields["occupation"] = array("Name" => "occupation", "Value" => "", "DataType" => ccsText); $this->InsertFields["place"] = array("Name" => "place", "Value" => "", "DataType" => ccsText); $this->InsertFields["address"] = array("Name" => "address", "Value" => "", "DataType" => ccsText); $this->InsertFields["city"] = array("Name" => "city", "Value" => "", "DataType" => ccsText); $this->InsertFields["state"] = array("Name" => "state", "Value" => "", "DataType" => ccsText); $this->InsertFields["zip"] = array("Name" => "zip", "Value" => "", "DataType" => ccsText); $this->InsertFields["country"] = array("Name" => "country", "Value" => "", "DataType" => ccsInteger); $this->InsertFields["telephone"] = array("Name" => "telephone", "Value" => "", "DataType" => ccsText); $this->InsertFields["facsimile"] = array("Name" => "facsimile", "Value" => "", "DataType" => ccsText); $this->InsertFields["email"] = array("Name" => "email", "Value" => "", "DataType" => ccsText); $this->InsertFields["web"] = array("Name" => "web", "Value" => "", "DataType" => ccsText); $this->InsertFields["datumprijave"] = array("Name" => "datumprijave", "Value" => "", "DataType" => ccsDate); } //End DataSourceClass_Initialize Event //Prepare Method @2-709543EA function Prepare() { global $CCSLocales; global $DefaultDateFormat; $this->wp = new clsSQLParameters($this->ErrorBlock); $this->wp->AddParameter("1", "urlinternetcomp_id", ccsInteger, "", "", $this->Parameters["urlinternetcomp_id"], "", false); $this->AllParametersSet = $this->wp->AllParamsSet(); $this->wp->Criterion[1] = $this->wp->Operation(opEqual, "internetcomp_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-59B73C34 function Open() { $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent); $this->SQL = "SELECT * \n\n" . "FROM internetcomps {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-A275E4B3 function SetValues() { $this->authors->SetDBValue($this->f("authors")); $this->co_authors->SetDBValue($this->f("co_authors")); $this->project_title->SetDBValue($this->f("project_title")); $this->entry_description_en->SetDBValue($this->f("entry_description_en")); $this->entry_description_hr->SetDBValue($this->f("entry_description_hr")); $this->FileUpload1->SetDBValue($this->f("item_1")); $this->TextBox1->SetDBValue($this->f("caption1")); $this->FileUpload2->SetDBValue($this->f("item_2")); $this->TextBox2->SetDBValue($this->f("caption2")); $this->FileUpload3->SetDBValue($this->f("item_3")); $this->TextBox3->SetDBValue($this->f("caprtion3")); $this->associated_concepts->SetDBValue($this->f("associated_concepts")); $this->FileUpload4->SetDBValue($this->f("video")); $this->occupation->SetDBValue($this->f("occupation")); $this->place->SetDBValue($this->f("place")); $this->address->SetDBValue($this->f("address")); $this->city->SetDBValue($this->f("city")); $this->state->SetDBValue($this->f("state")); $this->zip->SetDBValue($this->f("zip")); $this->country->SetDBValue(trim($this->f("country"))); $this->telephone->SetDBValue($this->f("telephone")); $this->facsimile->SetDBValue($this->f("facsimile")); $this->email->SetDBValue($this->f("email")); $this->web->SetDBValue($this->f("web")); $this->datumprijave->SetDBValue(trim($this->f("datumprijave"))); } //End SetValues Method //Insert Method @2-D3D30DCA function Insert() { global $CCSLocales; global $DefaultDateFormat; $this->CmdExecution = true; $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildInsert", $this->Parent); $this->InsertFields["authors"]["Value"] = $this->authors->GetDBValue(true); $this->InsertFields["co_authors"]["Value"] = $this->co_authors->GetDBValue(true); $this->InsertFields["project_title"]["Value"] = $this->project_title->GetDBValue(true); $this->InsertFields["entry_description_en"]["Value"] = $this->entry_description_en->GetDBValue(true); $this->InsertFields["entry_description_hr"]["Value"] = $this->entry_description_hr->GetDBValue(true); $this->InsertFields["item_1"]["Value"] = $this->FileUpload1->GetDBValue(true); $this->InsertFields["caption1"]["Value"] = $this->TextBox1->GetDBValue(true); $this->InsertFields["item_2"]["Value"] = $this->FileUpload2->GetDBValue(true); $this->InsertFields["caption2"]["Value"] = $this->TextBox2->GetDBValue(true); $this->InsertFields["item_3"]["Value"] = $this->FileUpload3->GetDBValue(true); $this->InsertFields["caprtion3"]["Value"] = $this->TextBox3->GetDBValue(true); $this->InsertFields["associated_concepts"]["Value"] = $this->associated_concepts->GetDBValue(true); $this->InsertFields["video"]["Value"] = $this->FileUpload4->GetDBValue(true); $this->InsertFields["occupation"]["Value"] = $this->occupation->GetDBValue(true); $this->InsertFields["place"]["Value"] = $this->place->GetDBValue(true); $this->InsertFields["address"]["Value"] = $this->address->GetDBValue(true); $this->InsertFields["city"]["Value"] = $this->city->GetDBValue(true); $this->InsertFields["state"]["Value"] = $this->state->GetDBValue(true); $this->InsertFields["zip"]["Value"] = $this->zip->GetDBValue(true); $this->InsertFields["country"]["Value"] = $this->country->GetDBValue(true); $this->InsertFields["telephone"]["Value"] = $this->telephone->GetDBValue(true); $this->InsertFields["facsimile"]["Value"] = $this->facsimile->GetDBValue(true); $this->InsertFields["email"]["Value"] = $this->email->GetDBValue(true); $this->InsertFields["web"]["Value"] = $this->web->GetDBValue(true); $this->InsertFields["datumprijave"]["Value"] = $this->datumprijave->GetDBValue(true); $this->SQL = CCBuildInsert("internetcomps", $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 } //End internetcompsDataSource Class @2-FCB6E20C //Initialize Page @1-16F4A400 // Variables $FileName = ""; $Redirect = ""; $Tpl = ""; $TemplateFileName = ""; $BlockToParse = ""; $ComponentName = ""; // Events; $CCSEvents = ""; $CCSEventResult = ""; $FileName = FileName; $Redirect = ""; $TemplateFileName = "submit.html"; $BlockToParse = "main"; $TemplateEncoding = "UTF-8"; $PathToRoot = "./"; //End Initialize Page //Include events file @1-B8AD229F include("./submit_events.php"); //End Include events file //Initialize Objects @1-6BE0FF4A $DBzs41 = new clsDBzs41(); $MainPage->Connections["zs41"] = & $DBzs41; // Controls $internetcomps = & new clsRecordinternetcomps("", $MainPage); $MainPage->internetcomps = & $internetcomps; $internetcomps->Initialize(); BindEvents(); $CCSEventResult = CCGetEvent($CCSEvents, "AfterInitialize", $MainPage); $Charset = $Charset ? $Charset : "utf-8"; if ($Charset) header("Content-Type: text/html; charset=" . $Charset); //End Initialize Objects //Initialize HTML Template @1-78E0DC24 $CCSEventResult = CCGetEvent($CCSEvents, "OnInitializeView", $MainPage); $Tpl = new clsTemplate($FileEncoding, $TemplateEncoding); $Tpl->LoadTemplate(PathToCurrentPage . $TemplateFileName, $BlockToParse, "UTF-8"); $Tpl->block_path = "/$BlockToParse"; $CCSEventResult = CCGetEvent($CCSEvents, "BeforeShow", $MainPage); //End Initialize HTML Template //Execute Components @1-3C8199F5 $internetcomps->Operation(); //End Execute Components //Go to destination page @1-11944621 if($Redirect) { $CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload", $MainPage); $DBzs41->close(); header("Location: " . $Redirect); unset($internetcomps); unset($Tpl); exit; } //End Go to destination page //Show Page @1-4B9BFEB7 $internetcomps->Show(); $Tpl->block_path = ""; $Tpl->Parse($BlockToParse, false); $main_block = $Tpl->GetVar($BlockToParse); $CCSEventResult = CCGetEvent($CCSEvents, "BeforeOutput", $MainPage); if ($CCSEventResult) echo $main_block; //End Show Page //Unload Page @1-2694E095 $CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload", $MainPage); $DBzs41->close(); unset($internetcomps); unset($Tpl); //End Unload Page ?>