Contact Avi Nardia Kapap Academy

Name:
Company:
E-mail:
Phone:
 
Verification code: (case insensitive)

//Include Common Files @1-F2736BC4 define("RelativePath", "."); define("PathToCurrentPage", "/"); define("FileName", "contact.php"); include_once(RelativePath . "/Common.php"); include_once(RelativePath . "/Template.php"); include_once(RelativePath . "/Sorter.php"); include_once(RelativePath . "/Navigator.php"); //End Include Common Files class clsRecordcontactform { //contactform Class @33-267B36BA //Variables @33-9E315808 // Public variables public $ComponentType = "Record"; public $ComponentName; public $Parent; public $HTMLFormAction; public $PressedButton; public $Errors; public $ErrorBlock; public $FormSubmitted; public $FormEnctype; public $Visible; public $IsEmpty; public $CCSEvents = ""; public $CCSEventResult; public $RelativePath = ""; public $InsertAllowed = false; public $UpdateAllowed = false; public $DeleteAllowed = false; public $ReadAllowed = false; public $EditMode = false; public $ds; public $DataSource; public $ValidatingControls; public $Controls; public $Attributes; // Class variables //End Variables //Class_Initialize Event @33-FCEB3582 function clsRecordcontactform($RelativePath, & $Parent) { global $FileName; global $CCSLocales; global $DefaultDateFormat; $this->Visible = true; $this->Parent = & $Parent; $this->RelativePath = $RelativePath; $this->Errors = new clsErrors(); $this->ErrorBlock = "Record contactform/Error"; $this->ReadAllowed = true; if($this->Visible) { $this->ComponentName = "contactform"; $this->Attributes = new clsAttributes($this->ComponentName . ":"); $CCSForm = split(":", CCGetFromGet("ccsForm", ""), 2); if(sizeof($CCSForm) == 1) $CCSForm[1] = ""; list($FormName, $FormMethod) = $CCSForm; $this->FormEnctype = "application/x-www-form-urlencoded"; $this->FormSubmitted = ($FormName == $this->ComponentName); $Method = $this->FormSubmitted ? ccsPost : ccsGet; $this->Name = new clsControl(ccsTextBox, "Name", "Name", ccsText, "", CCGetRequestParam("Name", $Method, NULL), $this); $this->Name->Required = true; $this->Company = new clsControl(ccsTextBox, "Company", "Company", ccsText, "", CCGetRequestParam("Company", $Method, NULL), $this); $this->Company->Required = true; $this->Email = new clsControl(ccsTextBox, "Email", "Email", ccsText, "", CCGetRequestParam("Email", $Method, NULL), $this); $this->Email->Required = true; $this->Phone = new clsControl(ccsTextBox, "Phone", "Phone", ccsText, "", CCGetRequestParam("Phone", $Method, NULL), $this); $this->Phone->Required = true; $this->Comments = new clsControl(ccsTextArea, "Comments", "Comments", ccsText, "", CCGetRequestParam("Comments", $Method, NULL), $this); $this->captcha = new clsControl(ccsLabel, "captcha", "captcha", ccsText, "", CCGetRequestParam("captcha", $Method, NULL), $this); $this->captcha->HTML = true; $this->RegisterButton = new clsButton("RegisterButton", $Method, $this); $this->sitename = new clsControl(ccsLabel, "sitename", "sitename", ccsText, "", CCGetRequestParam("sitename", $Method, NULL), $this); } } //End Class_Initialize Event //Validate Method @33-1F512E5F function Validate() { global $CCSLocales; $Validation = true; $Where = ""; if(strlen($this->Email->GetText()) && !preg_match ("/^[\w\.-]{1,}\@([\da-zA-Z-]{1,}\.){1,}[\da-zA-Z-]+$/", $this->Email->GetText())) { $this->Email->Errors->addError($CCSLocales->GetText("CCS_MaskValidation", "Email")); } $Validation = ($this->Name->Validate() && $Validation); $Validation = ($this->Company->Validate() && $Validation); $Validation = ($this->Email->Validate() && $Validation); $Validation = ($this->Phone->Validate() && $Validation); $Validation = ($this->Comments->Validate() && $Validation); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "OnValidate", $this); $Validation = $Validation && ($this->Name->Errors->Count() == 0); $Validation = $Validation && ($this->Company->Errors->Count() == 0); $Validation = $Validation && ($this->Email->Errors->Count() == 0); $Validation = $Validation && ($this->Phone->Errors->Count() == 0); $Validation = $Validation && ($this->Comments->Errors->Count() == 0); return (($this->Errors->Count() == 0) && $Validation); } //End Validate Method //CheckErrors Method @33-E3AB3342 function CheckErrors() { $errors = false; $errors = ($errors || $this->Name->Errors->Count()); $errors = ($errors || $this->Company->Errors->Count()); $errors = ($errors || $this->Email->Errors->Count()); $errors = ($errors || $this->Phone->Errors->Count()); $errors = ($errors || $this->Comments->Errors->Count()); $errors = ($errors || $this->captcha->Errors->Count()); $errors = ($errors || $this->sitename->Errors->Count()); $errors = ($errors || $this->Errors->Count()); return $errors; } //End CheckErrors Method //MasterDetail @33-ED598703 function SetPrimaryKeys($keyArray) { $this->PrimaryKeys = $keyArray; } function GetPrimaryKeys() { return $this->PrimaryKeys; } function GetPrimaryKey($keyName) { return $this->PrimaryKeys[$keyName]; } //End MasterDetail //Operation Method @33-063C3B87 function Operation() { if(!$this->Visible) return; global $Redirect; global $FileName; if(!$this->FormSubmitted) { return; } if($this->FormSubmitted) { $this->PressedButton = "RegisterButton"; if($this->RegisterButton->Pressed) { $this->PressedButton = "RegisterButton"; } } $Redirect = "thankyou.php"; if($this->Validate()) { if($this->PressedButton == "RegisterButton") { if(!CCGetEvent($this->RegisterButton->CCSEvents, "OnClick", $this->RegisterButton)) { $Redirect = ""; } } } else { $Redirect = ""; } } //End Operation Method //Show Method @33-9EEF861F function Show() { global $CCSUseAmp; global $Tpl; global $FileName; global $CCSLocales; $Error = ""; if(!$this->Visible) return; $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeSelect", $this); $RecordBlock = "Record " . $this->ComponentName; $ParentPath = $Tpl->block_path; $Tpl->block_path = $ParentPath . "/" . $RecordBlock; $this->EditMode = $this->EditMode && $this->ReadAllowed; if (!$this->FormSubmitted) { } if($this->FormSubmitted || $this->CheckErrors()) { $Error = ""; $Error = ComposeStrings($Error, $this->Name->Errors->ToString()); $Error = ComposeStrings($Error, $this->Company->Errors->ToString()); $Error = ComposeStrings($Error, $this->Email->Errors->ToString()); $Error = ComposeStrings($Error, $this->Phone->Errors->ToString()); $Error = ComposeStrings($Error, $this->Comments->Errors->ToString()); $Error = ComposeStrings($Error, $this->captcha->Errors->ToString()); $Error = ComposeStrings($Error, $this->sitename->Errors->ToString()); $Error = ComposeStrings($Error, $this->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->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShow", $this); $this->Attributes->Show(); if(!$this->Visible) { $Tpl->block_path = $ParentPath; return; } $this->Name->Show(); $this->Company->Show(); $this->Email->Show(); $this->Phone->Show(); $this->Comments->Show(); $this->captcha->Show(); $this->RegisterButton->Show(); $this->sitename->Show(); $Tpl->parse(); $Tpl->block_path = $ParentPath; } //End Show Method } //End contactform Class @33-FCB6E20C //Include Page implementation @5-8EACA429 include_once(RelativePath . "/header.php"); //End Include Page implementation //Include Page implementation @6-04423D1F include_once(RelativePath . "/imagegallery.php"); //End Include Page implementation //Include Page implementation @7-8D9920A0 include_once(RelativePath . "/maintop.php"); //End Include Page implementation //Include Page implementation @2-B724B777 include_once(RelativePath . "/menusidebar.php"); //End Include Page implementation //Include Page implementation @3-3A31ABB2 include_once(RelativePath . "/contentsidebar.php"); //End Include Page implementation //Include Page implementation @4-EBA5EA16 include_once(RelativePath . "/footer.php"); //End Include Page implementation //Initialize Page @1-A2A33545 // Variables $FileName = ""; $Redirect = ""; $Tpl = ""; $TemplateFileName = ""; $BlockToParse = ""; $ComponentName = ""; $Attributes = ""; // Events; $CCSEvents = ""; $CCSEventResult = ""; $FileName = FileName; $Redirect = ""; $TemplateFileName = "contact.html"; $BlockToParse = "main"; $TemplateEncoding = "UTF-8"; $ContentType = "text/html"; $PathToRoot = "./"; $Charset = $Charset ? $Charset : "utf-8"; //End Initialize Page //Include events file @1-9D64B846 include_once("./contact_events.php"); //End Include events file //Before Initialize @1-E870CEBC $CCSEventResult = CCGetEvent($CCSEvents, "BeforeInitialize", $MainPage); //End Before Initialize //Initialize Objects @1-4F880D1F $DBkapap = new clsDBkapap(); $MainPage->Connections["kapap"] = & $DBkapap; $Attributes = new clsAttributes("page:"); $MainPage->Attributes = & $Attributes; // Controls $contactform = new clsRecordcontactform("", $MainPage); $header = new clsheader("", "header", $MainPage); $header->Initialize(); $imagegallery = new clsimagegallery("", "imagegallery", $MainPage); $imagegallery->Initialize(); $maintop = new clsmaintop("", "maintop", $MainPage); $maintop->Initialize(); $theme = new clsControl(ccsLabel, "theme", "theme", ccsText, "", CCGetRequestParam("theme", ccsGet, NULL), $MainPage); $sitename = new clsControl(ccsLabel, "sitename", "sitename", ccsText, "", CCGetRequestParam("sitename", ccsGet, NULL), $MainPage); $menusidebar = new clsmenusidebar("", "menusidebar", $MainPage); $menusidebar->Initialize(); $contentsidebar = new clscontentsidebar("", "contentsidebar", $MainPage); $contentsidebar->Initialize(); $footer = new clsfooter("", "footer", $MainPage); $footer->Initialize(); $analytics = new clsControl(ccsLabel, "analytics", "analytics", ccsText, "", CCGetRequestParam("analytics", ccsGet, NULL), $MainPage); $analytics->HTML = true; $MainPage->contactform = & $contactform; $MainPage->header = & $header; $MainPage->imagegallery = & $imagegallery; $MainPage->maintop = & $maintop; $MainPage->theme = & $theme; $MainPage->sitename = & $sitename; $MainPage->menusidebar = & $menusidebar; $MainPage->contentsidebar = & $contentsidebar; $MainPage->footer = & $footer; $MainPage->analytics = & $analytics; 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-AE9E3E7B $contactform->Operation(); $header->Operations(); $imagegallery->Operations(); $maintop->Operations(); $menusidebar->Operations(); $contentsidebar->Operations(); $footer->Operations(); //End Execute Components //Go to destination page @1-1528F7D8 if($Redirect) { $CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload", $MainPage); $DBkapap->close(); header("Location: " . $Redirect); unset($contactform); $header->Class_Terminate(); unset($header); $imagegallery->Class_Terminate(); unset($imagegallery); $maintop->Class_Terminate(); unset($maintop); $menusidebar->Class_Terminate(); unset($menusidebar); $contentsidebar->Class_Terminate(); unset($contentsidebar); $footer->Class_Terminate(); unset($footer); unset($Tpl); exit; } //End Go to destination page //Show Page @1-867C4503 $contactform->Show(); $header->Show(); $imagegallery->Show(); $maintop->Show(); $menusidebar->Show(); $contentsidebar->Show(); $footer->Show(); $theme->Show(); $sitename->Show(); $analytics->Show(); $Tpl->block_path = ""; $Tpl->Parse($BlockToParse, false); if (!isset($main_block)) $main_block = $Tpl->GetVar($BlockToParse); $main_block = CCConvertEncoding($main_block, $FileEncoding, $CCSLocales->GetFormatInfo("Encoding")); $CCSEventResult = CCGetEvent($CCSEvents, "BeforeOutput", $MainPage); if ($CCSEventResult) echo $main_block; //End Show Page //Unload Page @1-1C32664D $CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload", $MainPage); $DBkapap->close(); unset($contactform); $header->Class_Terminate(); unset($header); $imagegallery->Class_Terminate(); unset($imagegallery); $maintop->Class_Terminate(); unset($maintop); $menusidebar->Class_Terminate(); unset($menusidebar); $contentsidebar->Class_Terminate(); unset($contentsidebar); $footer->Class_Terminate(); unset($footer); unset($Tpl); //End Unload Page