Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //Include Common Files @1-12F1367F
- define("RelativePath", "..");
- define("PathToCurrentPage", "/report/");
- define("FileName", "master_list_hotelmst_qr1.php");
- include(RelativePath . "/Common.php");
- include(RelativePath . "/Template.php");
- include(RelativePath . "/Sorter.php");
- include(RelativePath . "/Navigator.php");
- //End Include Common Files
- class clsRecordhotel_name_to { //hotel_name_to Class @3-A8C52B1D
- //Variables @3-E3E87A3C
- // Public variables
- public $ComponentType = "Record";
- public $ComponentName;
- public $Parent;
- public $HTMLFormAction;
- public $PressedButton;
- public $Errors;
- public $ErrorBlock;
- public $FormSubmitted;
- public $FormEnctype;
- public $Visible;
- public $Recordset;
- 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;
- // Class variables
- //End Variables
- //Class_Initialize Event @3-CBAE8EE5
- function clsRecordhotel_name_to($RelativePath, & $Parent)
- {
- global $FileName;
- global $CCSLocales;
- global $DefaultDateFormat;
- $this->Visible = true;
- $this->Parent = & $Parent;
- $this->RelativePath = $RelativePath;
- $this->Errors = new clsErrors();
- $this->ErrorBlock = "Record hotel_name_to/Error";
- $this->DataSource = new clshotel_name_toDataSource($this);
- $this->ds = & $this->DataSource;
- $this->ReadAllowed = true;
- if($this->Visible)
- {
- $this->ComponentName = "hotel_name_to";
- $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->sorting = & new clsControl(ccsRadioButton, "sorting", "sorting", ccsText, "", CCGetRequestParam("sorting", $Method), $this);
- $this->sorting->DSType = dsListOfValues;
- $this->sorting->Values = array(array("code", "Hotel Code <BR>"));
- $this->sorting1 = & new clsControl(ccsRadioButton, "sorting1", "sorting1", ccsText, "", CCGetRequestParam("sorting1", $Method), $this);
- $this->sorting1->DSType = dsListOfValues;
- $this->sorting1->Values = array(array("name", "Hotel Name <BR>"));
- $this->sorting2 = & new clsControl(ccsRadioButton, "sorting2", "sorting2", ccsText, "", CCGetRequestParam("sorting2", $Method), $this);
- $this->sorting2->DSType = dsListOfValues;
- $this->sorting2->Values = array(array("statecode", "Hotel State & Hotel Code<BR>"));
- $this->sorting3 = & new clsControl(ccsRadioButton, "sorting3", "sorting3", ccsText, "", CCGetRequestParam("sorting3", $Method), $this);
- $this->sorting3->DSType = dsListOfValues;
- $this->sorting3->Values = array(array("categorycode", "Hotel Category & Hotel Code<BR>"));
- $this->sorting4 = & new clsControl(ccsRadioButton, "sorting4", "sorting4", ccsText, "", CCGetRequestParam("sorting4", $Method), $this);
- $this->sorting4->DSType = dsListOfValues;
- $this->sorting4->Values = array(array("statecode", "Hotel State & Hotel Code<BR>"));
- $this->sorting5 = & new clsControl(ccsRadioButton, "sorting5", "sorting5", ccsText, "", CCGetRequestParam("sorting5", $Method), $this);
- $this->sorting5->DSType = dsListOfValues;
- $this->sorting5->Values = array(array("statecode", "Hotel State & Hotel Code<BR>"));
- $this->ListBox1 = & new clsControl(ccsListBox, "ListBox1", "ListBox1", ccsText, "", CCGetRequestParam("ListBox1", $Method), $this);
- $this->ListBox1->Multiple = true;
- $this->ListBox1->DSType = dsSQL;
- list($this->ListBox1->BoundColumn, $this->ListBox1->TextColumn, $this->ListBox1->DBFormat) = array("hotel_code", "hotel_name", "");
- $this->ListBox1->DataSource = new clsDBdbcon1();
- $this->ListBox1->ds = & $this->ListBox1->DataSource;
- $this->ListBox1->DataSource->SQL = "SELECT hotel_code,concat(hotel_code, ' : ', hotel_name1) as hotel_name FROM hotelmst ";
- $this->ListBox1->DataSource->Order = "hotel_code;";
- $this->Button2 = & new clsButton("Button2", $Method, $this);
- $this->Button3 = & new clsButton("Button3", $Method, $this);
- $this->Button4 = & new clsButton("Button4", $Method, $this);
- $this->Button5 = & new clsButton("Button5", $Method, $this);
- $this->qr_hotelcode = & new clsControl(ccsListBox, "qr_hotelcode", "qr_hotelcode", ccsText, "", CCGetRequestParam("qr_hotelcode", $Method), $this);
- $this->qr_hotelcode->Multiple = true;
- $this->hotel_code_get = & new clsControl(ccsListBox, "hotel_code_get", "hotel_code_get", ccsText, "", CCGetRequestParam("hotel_code_get", $Method), $this);
- $this->hotel_code_get->DSType = dsSQL;
- list($this->hotel_code_get->BoundColumn, $this->hotel_code_get->TextColumn, $this->hotel_code_get->DBFormat) = array("hotel_code", "hotel_name", "");
- $this->hotel_code_get->DataSource = new clsDBdbcon1();
- $this->hotel_code_get->ds = & $this->hotel_code_get->DataSource;
- $this->hotel_code_get->DataSource->SQL = "SELECT hotel_code,concat(hotel_code, ' : ', hotel_name1) as hotel_name FROM hotelmst ";
- $this->hotel_code_get->DataSource->Order = "hotel_code;";
- $this->hotel_code_get->Required = true;
- $this->hotel_code_from = & new clsControl(ccsListBox, "hotel_code_from", "Hotel Code", ccsText, "", CCGetRequestParam("hotel_code_from", $Method), $this);
- $this->hotel_code_from->DSType = dsSQL;
- list($this->hotel_code_from->BoundColumn, $this->hotel_code_from->TextColumn, $this->hotel_code_from->DBFormat) = array("hotel_code", "hotel_name", "");
- $this->hotel_code_from->DataSource = new clsDBdbcon1();
- $this->hotel_code_from->ds = & $this->hotel_code_from->DataSource;
- $this->hotel_code_from->DataSource->SQL = "SELECT hotel_code,concat(hotel_code, ' : ', hotel_name1) as hotel_name FROM hotelmst ";
- $this->hotel_code_from->DataSource->Order = "hotel_code;";
- $this->hotel_code_from->Required = true;
- $this->hotel_code_to = & new clsControl(ccsListBox, "hotel_code_to", "Hotel Code", ccsText, "", CCGetRequestParam("hotel_code_to", $Method), $this);
- $this->hotel_code_to->DSType = dsSQL;
- list($this->hotel_code_to->BoundColumn, $this->hotel_code_to->TextColumn, $this->hotel_code_to->DBFormat) = array("hotel_code", "hotel_name", "");
- $this->hotel_code_to->DataSource = new clsDBdbcon1();
- $this->hotel_code_to->ds = & $this->hotel_code_to->DataSource;
- $this->hotel_code_to->DataSource->SQL = "SELECT hotel_code,concat(hotel_code, ' : ', hotel_name1) as hotel_name FROM hotelmst ";
- $this->hotel_code_to->DataSource->Order = "hotel_code;";
- $this->hotel_code_to->Required = true;
- $this->hotel_state_from = & new clsControl(ccsListBox, "hotel_state_from", "Hotel State", ccsText, "", CCGetRequestParam("hotel_state_from", $Method), $this);
- $this->hotel_state_from->DSType = dsSQL;
- list($this->hotel_state_from->BoundColumn, $this->hotel_state_from->TextColumn, $this->hotel_state_from->DBFormat) = array("stte_no", "hotel_state", "");
- $this->hotel_state_from->DataSource = new clsDBdbcon1();
- $this->hotel_state_from->ds = & $this->hotel_state_from->DataSource;
- $this->hotel_state_from->DataSource->SQL = "SELECT stte_no,concat(stte_code, ' : ', stte_name1) as hotel_state FROM statemst ";
- $this->hotel_state_from->DataSource->Order = "stte_code;";
- $this->hotel_state_from->Required = true;
- $this->hotel_state_to = & new clsControl(ccsListBox, "hotel_state_to", "Hotel State", ccsText, "", CCGetRequestParam("hotel_state_to", $Method), $this);
- $this->hotel_state_to->DSType = dsSQL;
- list($this->hotel_state_to->BoundColumn, $this->hotel_state_to->TextColumn, $this->hotel_state_to->DBFormat) = array("stte_no", "hotel_state", "");
- $this->hotel_state_to->DataSource = new clsDBdbcon1();
- $this->hotel_state_to->ds = & $this->hotel_state_to->DataSource;
- $this->hotel_state_to->DataSource->SQL = "SELECT stte_no,concat(stte_code, ' : ', stte_name1) as hotel_state FROM statemst ";
- $this->hotel_state_to->DataSource->Order = "stte_code;";
- $this->hotel_state_to->Required = true;
- $this->hotel_category_from = & new clsControl(ccsListBox, "hotel_category_from", "Hotel Category", ccsText, "", CCGetRequestParam("hotel_category_from", $Method), $this);
- $this->hotel_category_from->DSType = dsSQL;
- list($this->hotel_category_from->BoundColumn, $this->hotel_category_from->TextColumn, $this->hotel_category_from->DBFormat) = array("", "hotel_category", "");
- $this->hotel_category_from->DataSource = new clsDBdbcon1();
- $this->hotel_category_from->ds = & $this->hotel_category_from->DataSource;
- $this->hotel_category_from->DataSource->SQL = "select DISTINCT hotel_category from hotelmst ";
- $this->hotel_category_from->DataSource->Order = "hotel_category asc ;";
- $this->hotel_category_from->Required = true;
- $this->hotel_category_to = & new clsControl(ccsListBox, "hotel_category_to", "Hotel Category", ccsText, "", CCGetRequestParam("hotel_category_to", $Method), $this);
- $this->hotel_category_to->DSType = dsSQL;
- list($this->hotel_category_to->BoundColumn, $this->hotel_category_to->TextColumn, $this->hotel_category_to->DBFormat) = array("", "hotel_category", "");
- $this->hotel_category_to->DataSource = new clsDBdbcon1();
- $this->hotel_category_to->ds = & $this->hotel_category_to->DataSource;
- $this->hotel_category_to->DataSource->SQL = "select DISTINCT hotel_category from hotelmst ";
- $this->hotel_category_to->DataSource->Order = "hotel_category desc ;";
- $this->hotel_category_to->Required = true;
- $this->module = & new clsControl(ccsHidden, "module", "module", ccsText, "", CCGetRequestParam("module", $Method), $this);
- $this->Button1 = & new clsButton("Button1", $Method, $this);
- $this->Cancel = & new clsButton("Cancel", $Method, $this);
- if(!$this->FormSubmitted) {
- if(!is_array($this->sorting->Value) && !strlen($this->sorting->Value) && $this->sorting->Value !== false)
- $this->sorting->SetText(code);
- if(!is_array($this->sorting1->Value) && !strlen($this->sorting1->Value) && $this->sorting1->Value !== false)
- $this->sorting1->SetText(code);
- if(!is_array($this->sorting2->Value) && !strlen($this->sorting2->Value) && $this->sorting2->Value !== false)
- $this->sorting2->SetText(code);
- if(!is_array($this->sorting3->Value) && !strlen($this->sorting3->Value) && $this->sorting3->Value !== false)
- $this->sorting3->SetText(code);
- if(!is_array($this->sorting4->Value) && !strlen($this->sorting4->Value) && $this->sorting4->Value !== false)
- $this->sorting4->SetText(code);
- if(!is_array($this->sorting5->Value) && !strlen($this->sorting5->Value) && $this->sorting5->Value !== false)
- $this->sorting5->SetText(code);
- }
- }
- }
- //End Class_Initialize Event
- //Initialize Method @3-318CD24E
- function Initialize()
- {
- if(!$this->Visible)
- return;
- $this->DataSource->Parameters["urlarea_no"] = CCGetFromGet("area_no", "");
- }
- //End Initialize Method
- //Validate Method @3-35EE579E
- function Validate()
- {
- global $CCSLocales;
- $Validation = true;
- $Where = "";
- $Validation = ($this->sorting->Validate() && $Validation);
- $Validation = ($this->sorting1->Validate() && $Validation);
- $Validation = ($this->sorting2->Validate() && $Validation);
- $Validation = ($this->sorting3->Validate() && $Validation);
- $Validation = ($this->sorting4->Validate() && $Validation);
- $Validation = ($this->sorting5->Validate() && $Validation);
- $Validation = ($this->ListBox1->Validate() && $Validation);
- $Validation = ($this->qr_hotelcode->Validate() && $Validation);
- $Validation = ($this->hotel_code_get->Validate() && $Validation);
- $Validation = ($this->hotel_code_from->Validate() && $Validation);
- $Validation = ($this->hotel_code_to->Validate() && $Validation);
- $Validation = ($this->hotel_state_from->Validate() && $Validation);
- $Validation = ($this->hotel_state_to->Validate() && $Validation);
- $Validation = ($this->hotel_category_from->Validate() && $Validation);
- $Validation = ($this->hotel_category_to->Validate() && $Validation);
- $Validation = ($this->module->Validate() && $Validation);
- $this->CCSEventResult = CCGetEvent($this->CCSEvents, "OnValidate", $this);
- $Validation = $Validation && ($this->sorting->Errors->Count() == 0);
- $Validation = $Validation && ($this->sorting1->Errors->Count() == 0);
- $Validation = $Validation && ($this->sorting2->Errors->Count() == 0);
- $Validation = $Validation && ($this->sorting3->Errors->Count() == 0);
- $Validation = $Validation && ($this->sorting4->Errors->Count() == 0);
- $Validation = $Validation && ($this->sorting5->Errors->Count() == 0);
- $Validation = $Validation && ($this->ListBox1->Errors->Count() == 0);
- $Validation = $Validation && ($this->qr_hotelcode->Errors->Count() == 0);
- $Validation = $Validation && ($this->hotel_code_get->Errors->Count() == 0);
- $Validation = $Validation && ($this->hotel_code_from->Errors->Count() == 0);
- $Validation = $Validation && ($this->hotel_code_to->Errors->Count() == 0);
- $Validation = $Validation && ($this->hotel_state_from->Errors->Count() == 0);
- $Validation = $Validation && ($this->hotel_state_to->Errors->Count() == 0);
- $Validation = $Validation && ($this->hotel_category_from->Errors->Count() == 0);
- $Validation = $Validation && ($this->hotel_category_to->Errors->Count() == 0);
- $Validation = $Validation && ($this->module->Errors->Count() == 0);
- return (($this->Errors->Count() == 0) && $Validation);
- }
- //End Validate Method
- //CheckErrors Method @3-1867FA0E
- function CheckErrors()
- {
- $errors = false;
- $errors = ($errors || $this->sorting->Errors->Count());
- $errors = ($errors || $this->sorting1->Errors->Count());
- $errors = ($errors || $this->sorting2->Errors->Count());
- $errors = ($errors || $this->sorting3->Errors->Count());
- $errors = ($errors || $this->sorting4->Errors->Count());
- $errors = ($errors || $this->sorting5->Errors->Count());
- $errors = ($errors || $this->ListBox1->Errors->Count());
- $errors = ($errors || $this->qr_hotelcode->Errors->Count());
- $errors = ($errors || $this->hotel_code_get->Errors->Count());
- $errors = ($errors || $this->hotel_code_from->Errors->Count());
- $errors = ($errors || $this->hotel_code_to->Errors->Count());
- $errors = ($errors || $this->hotel_state_from->Errors->Count());
- $errors = ($errors || $this->hotel_state_to->Errors->Count());
- $errors = ($errors || $this->hotel_category_from->Errors->Count());
- $errors = ($errors || $this->hotel_category_to->Errors->Count());
- $errors = ($errors || $this->module->Errors->Count());
- $errors = ($errors || $this->Errors->Count());
- $errors = ($errors || $this->DataSource->Errors->Count());
- return $errors;
- }
- //End CheckErrors Method
- //Operation Method @3-EDAA893D
- 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 = "Button2";
- if($this->Button2->Pressed) {
- $this->PressedButton = "Button2";
- } else if($this->Button3->Pressed) {
- $this->PressedButton = "Button3";
- } else if($this->Button4->Pressed) {
- $this->PressedButton = "Button4";
- } else if($this->Button5->Pressed) {
- $this->PressedButton = "Button5";
- } else if($this->Button1->Pressed) {
- $this->PressedButton = "Button1";
- } else if($this->Cancel->Pressed) {
- $this->PressedButton = "Cancel";
- }
- }
- $Redirect = "master_list_hotelmst_qr1.php" . "?" . CCGetQueryString("QueryString", array("ccsForm"));
- if($this->PressedButton == "Cancel") {
- if(!CCGetEvent($this->Cancel->CCSEvents, "OnClick", $this->Cancel)) {
- $Redirect = "";
- }
- } else if($this->Validate()) {
- if($this->PressedButton == "Button2") {
- if(!CCGetEvent($this->Button2->CCSEvents, "OnClick", $this->Button2)) {
- $Redirect = "";
- }
- } else if($this->PressedButton == "Button3") {
- if(!CCGetEvent($this->Button3->CCSEvents, "OnClick", $this->Button3)) {
- $Redirect = "";
- }
- } else if($this->PressedButton == "Button4") {
- if(!CCGetEvent($this->Button4->CCSEvents, "OnClick", $this->Button4)) {
- $Redirect = "";
- }
- } else if($this->PressedButton == "Button5") {
- if(!CCGetEvent($this->Button5->CCSEvents, "OnClick", $this->Button5)) {
- $Redirect = "";
- }
- } else if($this->PressedButton == "Button1") {
- if(!CCGetEvent($this->Button1->CCSEvents, "OnClick", $this->Button1)) {
- $Redirect = "";
- }
- }
- } else {
- $Redirect = "";
- }
- if ($Redirect)
- $this->DataSource->close();
- }
- //End Operation Method
- //Show Method @3-6E6726C9
- function Show()
- {
- global $Tpl;
- global $FileName;
- global $CCSLocales;
- $Error = "";
- if(!$this->Visible)
- return;
- $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeSelect", $this);
- $this->sorting->Prepare();
- $this->sorting1->Prepare();
- $this->sorting2->Prepare();
- $this->sorting3->Prepare();
- $this->sorting4->Prepare();
- $this->sorting5->Prepare();
- $this->ListBox1->Prepare();
- $this->qr_hotelcode->Prepare();
- $this->hotel_code_get->Prepare();
- $this->hotel_code_from->Prepare();
- $this->hotel_code_to->Prepare();
- $this->hotel_state_from->Prepare();
- $this->hotel_state_to->Prepare();
- $this->hotel_category_from->Prepare();
- $this->hotel_category_to->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->ListBox1->SetValue($this->DataSource->ListBox1->GetValue());
- $this->hotel_code_get->SetValue($this->DataSource->hotel_code_get->GetValue());
- $this->hotel_code_from->SetValue($this->DataSource->hotel_code_from->GetValue());
- $this->hotel_code_to->SetValue($this->DataSource->hotel_code_to->GetValue());
- $this->hotel_state_from->SetValue($this->DataSource->hotel_state_from->GetValue());
- $this->hotel_state_to->SetValue($this->DataSource->hotel_state_to->GetValue());
- $this->hotel_category_from->SetValue($this->DataSource->hotel_category_from->GetValue());
- $this->hotel_category_to->SetValue($this->DataSource->hotel_category_to->GetValue());
- }
- } else {
- $this->EditMode = false;
- }
- }
- if (!$this->FormSubmitted) {
- }
- if($this->FormSubmitted || $this->CheckErrors()) {
- $Error = "";
- $Error = ComposeStrings($Error, $this->sorting->Errors->ToString());
- $Error = ComposeStrings($Error, $this->sorting1->Errors->ToString());
- $Error = ComposeStrings($Error, $this->sorting2->Errors->ToString());
- $Error = ComposeStrings($Error, $this->sorting3->Errors->ToString());
- $Error = ComposeStrings($Error, $this->sorting4->Errors->ToString());
- $Error = ComposeStrings($Error, $this->sorting5->Errors->ToString());
- $Error = ComposeStrings($Error, $this->ListBox1->Errors->ToString());
- $Error = ComposeStrings($Error, $this->qr_hotelcode->Errors->ToString());
- $Error = ComposeStrings($Error, $this->hotel_code_get->Errors->ToString());
- $Error = ComposeStrings($Error, $this->hotel_code_from->Errors->ToString());
- $Error = ComposeStrings($Error, $this->hotel_code_to->Errors->ToString());
- $Error = ComposeStrings($Error, $this->hotel_state_from->Errors->ToString());
- $Error = ComposeStrings($Error, $this->hotel_state_to->Errors->ToString());
- $Error = ComposeStrings($Error, $this->hotel_category_from->Errors->ToString());
- $Error = ComposeStrings($Error, $this->hotel_category_to->Errors->ToString());
- $Error = ComposeStrings($Error, $this->module->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->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShow", $this);
- if(!$this->Visible) {
- $Tpl->block_path = $ParentPath;
- return;
- }
- $this->sorting->Show();
- $this->sorting1->Show();
- $this->sorting2->Show();
- $this->sorting3->Show();
- $this->sorting4->Show();
- $this->sorting5->Show();
- $this->ListBox1->Show();
- $this->Button2->Show();
- $this->Button3->Show();
- $this->Button4->Show();
- $this->Button5->Show();
- $this->qr_hotelcode->Show();
- $this->hotel_code_get->Show();
- $this->hotel_code_from->Show();
- $this->hotel_code_to->Show();
- $this->hotel_state_from->Show();
- $this->hotel_state_to->Show();
- $this->hotel_category_from->Show();
- $this->hotel_category_to->Show();
- $this->module->Show();
- $this->Button1->Show();
- $this->Cancel->Show();
- $Tpl->parse();
- $Tpl->block_path = $ParentPath;
- $this->DataSource->close();
- }
- //End Show Method
- } //End hotel_name_to Class @3-FCB6E20C
- class clshotel_name_toDataSource extends clsDBdbcon1 { //hotel_name_toDataSource Class @3-C0B2E6A9
- //DataSource Variables @3-4B6530E7
- public $Parent = "";
- public $CCSEvents = "";
- public $CCSEventResult;
- public $ErrorBlock;
- public $CmdExecution;
- public $wp;
- public $AllParametersSet;
- // Datasource fields
- public $sorting;
- public $sorting1;
- public $sorting2;
- public $sorting3;
- public $sorting4;
- public $sorting5;
- public $ListBox1;
- public $qr_hotelcode;
- public $hotel_code_get;
- public $hotel_code_from;
- public $hotel_code_to;
- public $hotel_state_from;
- public $hotel_state_to;
- public $hotel_category_from;
- public $hotel_category_to;
- public $module;
- //End DataSource Variables
- //DataSourceClass_Initialize Event @3-17A62D5F
- function clshotel_name_toDataSource(& $Parent)
- {
- $this->Parent = & $Parent;
- $this->ErrorBlock = "Record hotel_name_to/Error";
- $this->Initialize();
- $this->sorting = new clsField("sorting", ccsText, "");
- $this->sorting1 = new clsField("sorting1", ccsText, "");
- $this->sorting2 = new clsField("sorting2", ccsText, "");
- $this->sorting3 = new clsField("sorting3", ccsText, "");
- $this->sorting4 = new clsField("sorting4", ccsText, "");
- $this->sorting5 = new clsField("sorting5", ccsText, "");
- $this->ListBox1 = new clsField("ListBox1", ccsText, "");
- $this->qr_hotelcode = new clsField("qr_hotelcode", ccsText, "");
- $this->hotel_code_get = new clsField("hotel_code_get", ccsText, "");
- $this->hotel_code_from = new clsField("hotel_code_from", ccsText, "");
- $this->hotel_code_to = new clsField("hotel_code_to", ccsText, "");
- $this->hotel_state_from = new clsField("hotel_state_from", ccsText, "");
- $this->hotel_state_to = new clsField("hotel_state_to", ccsText, "");
- $this->hotel_category_from = new clsField("hotel_category_from", ccsText, "");
- $this->hotel_category_to = new clsField("hotel_category_to", ccsText, "");
- $this->module = new clsField("module", ccsText, "");
- }
- //End DataSourceClass_Initialize Event
- //Prepare Method @3-793C22D2
- function Prepare()
- {
- global $CCSLocales;
- global $DefaultDateFormat;
- $this->wp = new clsSQLParameters($this->ErrorBlock);
- $this->wp->AddParameter("1", "urlarea_no", ccsInteger, "", "", $this->Parameters["urlarea_no"], "", false);
- $this->AllParametersSet = $this->wp->AllParamsSet();
- $this->wp->Criterion[1] = $this->wp->Operation(opEqual, "area_no", $this->wp->GetDBValue("1"), $this->ToSQL($this->wp->GetDBValue("1"), ccsInteger),false);
- $this->Where =
- $this->wp->Criterion[1];
- }
- //End Prepare Method
- //Open Method @3-19F4214F
- function Open()
- {
- $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent);
- $this->SQL = "SELECT * " .
- "FROM hotelmst {SQL_Where} {SQL_OrderBy}";
- $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteSelect", $this->Parent);
- $this->query(CCBuildSQL($this->SQL, $this->Where, $this->Order));
- $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteSelect", $this->Parent);
- }
- //End Open Method
- //SetValues Method @3-5D655443
- function SetValues()
- {
- $this->ListBox1->SetDBValue($this->f("hotel_code"));
- $this->hotel_code_get->SetDBValue($this->f("hotel_code"));
- $this->hotel_code_from->SetDBValue($this->f("hotel_code"));
- $this->hotel_code_to->SetDBValue($this->f("hotel_code"));
- $this->hotel_state_from->SetDBValue($this->f("hotel_state"));
- $this->hotel_state_to->SetDBValue($this->f("hotel_state"));
- $this->hotel_category_from->SetDBValue($this->f("hotel_category"));
- $this->hotel_category_to->SetDBValue($this->f("hotel_category"));
- }
- //End SetValues Method
- } //End hotel_name_toDataSource Class @3-FCB6E20C
- //Initialize Page @1-AFA1FBFE
- // Variables
- $FileName = "";
- $Redirect = "";
- $Tpl = "";
- $TemplateFileName = "";
- $BlockToParse = "";
- $ComponentName = "";
- // Events;
- $CCSEvents = "";
- $CCSEventResult = "";
- $FileName = FileName;
- $Redirect = "";
- $TemplateFileName = "master_list_hotelmst_qr1.html";
- $BlockToParse = "main";
- $TemplateEncoding = "ISO-8859-1";
- $PathToRoot = "../";
- //End Initialize Page
- //Include events file @1-BA48464B
- include("./master_list_hotelmst_qr1_events.php");
- //End Include events file
- //Initialize Objects @1-7A3BE860
- $DBdbcon1 = new clsDBdbcon1();
- $MainPage->Connections["dbcon1"] = & $DBdbcon1;
- // Controls
- $hotel_name_to = & new clsRecordhotel_name_to("", $MainPage);
- $MainPage->hotel_name_to = & $hotel_name_to;
- $hotel_name_to->Initialize();
- BindEvents();
- $CCSEventResult = CCGetEvent($CCSEvents, "AfterInitialize", $MainPage);
- $Charset = $Charset ? $Charset : "iso-8859-1";
- if ($Charset)
- header("Content-Type: text/html; charset=" . $Charset);
- //End Initialize Objects
- //Initialize HTML Template @1-6CC97037
- $CCSEventResult = CCGetEvent($CCSEvents, "OnInitializeView", $MainPage);
- $Tpl = new clsTemplate();
- $Tpl->LoadTemplate(PathToCurrentPage . $TemplateFileName, $BlockToParse, "ISO-8859-1");
- $Tpl->block_path = "/$BlockToParse";
- $CCSEventResult = CCGetEvent($CCSEvents, "BeforeShow", $MainPage);
- //End Initialize HTML Template
- //Execute Components @1-44614DAB
- $hotel_name_to->Operation();
- //End Execute Components
- //Go to destination page @1-D441BAE9
- if($Redirect)
- {
- $CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload", $MainPage);
- $DBdbcon1->close();
- header("Location: " . $Redirect);
- unset($hotel_name_to);
- unset($Tpl);
- exit;
- }
- //End Go to destination page
- //Show Page @1-69DEC924
- $hotel_name_to->Show();
- $Tpl->block_path = "";
- $Tpl->Parse($BlockToParse, false);
- $main_block = $Tpl->GetVar($BlockToParse);
- if(preg_match("/<\/body>/i", $main_block)) {
- $main_block = preg_replace("/<\/body>/i", implode(array("<center><font ", "face=\"Arial\"><small", ">Genera", ";ted <!-- SC", "C -->wi", ";th <", "!-- SCC -->C", ";ode", "Charge <!-- S", "CC -->St&", "#117;dio.<", "/small></font><", "/center>"), "") . "</body>", $main_block);
- } else if(preg_match("/<\/html>/i", $main_block) && !preg_match("/<\/frameset>/i", $main_block)) {
- $main_block = preg_replace("/<\/html>/i", implode(array("<center><font ", "face=\"Arial\"><small", ">Genera", ";ted <!-- SC", "C -->wi", ";th <", "!-- SCC -->C", ";ode", "Charge <!-- S", "CC -->St&", "#117;dio.<", "/small></font><", "/center>"), "") . "</html>", $main_block);
- } else if(!preg_match("/<\/frameset>/i", $main_block)) {
- $main_block .= implode(array("<center><font ", "face=\"Arial\"><small", ">Genera", ";ted <!-- SC", "C -->wi", ";th <", "!-- SCC -->C", ";ode", "Charge <!-- S", "CC -->St&", "#117;dio.<", "/small></font><", "/center>"), "");
- }
- $CCSEventResult = CCGetEvent($CCSEvents, "BeforeOutput", $MainPage);
- if ($CCSEventResult) echo $main_block;
- //End Show Page
- //Unload Page @1-84762161
- $CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload", $MainPage);
- $DBdbcon1->close();
- unset($hotel_name_to);
- unset($Tpl);
- //End Unload Page
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement