Advertisement
Guest User

hotel qrphp

a guest
Sep 21st, 2019
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 29.81 KB | None | 0 0
  1. <?php
  2. //Include Common Files @1-12F1367F
  3. define("RelativePath", "..");
  4. define("PathToCurrentPage", "/report/");
  5. define("FileName", "master_list_hotelmst_qr1.php");
  6. include(RelativePath . "/Common.php");
  7. include(RelativePath . "/Template.php");
  8. include(RelativePath . "/Sorter.php");
  9. include(RelativePath . "/Navigator.php");
  10. //End Include Common Files
  11.  
  12. class clsRecordhotel_name_to { //hotel_name_to Class @3-A8C52B1D
  13.  
  14. //Variables @3-E3E87A3C
  15.  
  16. // Public variables
  17. public $ComponentType = "Record";
  18. public $ComponentName;
  19. public $Parent;
  20. public $HTMLFormAction;
  21. public $PressedButton;
  22. public $Errors;
  23. public $ErrorBlock;
  24. public $FormSubmitted;
  25. public $FormEnctype;
  26. public $Visible;
  27. public $Recordset;
  28.  
  29. public $CCSEvents = "";
  30. public $CCSEventResult;
  31.  
  32. public $RelativePath = "";
  33.  
  34. public $InsertAllowed = false;
  35. public $UpdateAllowed = false;
  36. public $DeleteAllowed = false;
  37. public $ReadAllowed = false;
  38. public $EditMode = false;
  39. public $ds;
  40. public $DataSource;
  41. public $ValidatingControls;
  42. public $Controls;
  43.  
  44. // Class variables
  45. //End Variables
  46.  
  47. //Class_Initialize Event @3-CBAE8EE5
  48. function clsRecordhotel_name_to($RelativePath, & $Parent)
  49. {
  50.  
  51. global $FileName;
  52. global $CCSLocales;
  53. global $DefaultDateFormat;
  54. $this->Visible = true;
  55. $this->Parent = & $Parent;
  56. $this->RelativePath = $RelativePath;
  57. $this->Errors = new clsErrors();
  58. $this->ErrorBlock = "Record hotel_name_to/Error";
  59. $this->DataSource = new clshotel_name_toDataSource($this);
  60. $this->ds = & $this->DataSource;
  61. $this->ReadAllowed = true;
  62. if($this->Visible)
  63. {
  64. $this->ComponentName = "hotel_name_to";
  65. $CCSForm = split(":", CCGetFromGet("ccsForm", ""), 2);
  66. if(sizeof($CCSForm) == 1)
  67. $CCSForm[1] = "";
  68. list($FormName, $FormMethod) = $CCSForm;
  69. $this->EditMode = ($FormMethod == "Edit");
  70. $this->FormEnctype = "application/x-www-form-urlencoded";
  71. $this->FormSubmitted = ($FormName == $this->ComponentName);
  72. $Method = $this->FormSubmitted ? ccsPost : ccsGet;
  73. $this->sorting = & new clsControl(ccsRadioButton, "sorting", "sorting", ccsText, "", CCGetRequestParam("sorting", $Method), $this);
  74. $this->sorting->DSType = dsListOfValues;
  75. $this->sorting->Values = array(array("code", "Hotel Code <BR>"));
  76. $this->sorting1 = & new clsControl(ccsRadioButton, "sorting1", "sorting1", ccsText, "", CCGetRequestParam("sorting1", $Method), $this);
  77. $this->sorting1->DSType = dsListOfValues;
  78. $this->sorting1->Values = array(array("name", "Hotel Name <BR>"));
  79. $this->sorting2 = & new clsControl(ccsRadioButton, "sorting2", "sorting2", ccsText, "", CCGetRequestParam("sorting2", $Method), $this);
  80. $this->sorting2->DSType = dsListOfValues;
  81. $this->sorting2->Values = array(array("statecode", "Hotel State & Hotel Code<BR>"));
  82. $this->sorting3 = & new clsControl(ccsRadioButton, "sorting3", "sorting3", ccsText, "", CCGetRequestParam("sorting3", $Method), $this);
  83. $this->sorting3->DSType = dsListOfValues;
  84. $this->sorting3->Values = array(array("categorycode", "Hotel Category & Hotel Code<BR>"));
  85. $this->sorting4 = & new clsControl(ccsRadioButton, "sorting4", "sorting4", ccsText, "", CCGetRequestParam("sorting4", $Method), $this);
  86. $this->sorting4->DSType = dsListOfValues;
  87. $this->sorting4->Values = array(array("statecode", "Hotel State & Hotel Code<BR>"));
  88. $this->sorting5 = & new clsControl(ccsRadioButton, "sorting5", "sorting5", ccsText, "", CCGetRequestParam("sorting5", $Method), $this);
  89. $this->sorting5->DSType = dsListOfValues;
  90. $this->sorting5->Values = array(array("statecode", "Hotel State & Hotel Code<BR>"));
  91. $this->ListBox1 = & new clsControl(ccsListBox, "ListBox1", "ListBox1", ccsText, "", CCGetRequestParam("ListBox1", $Method), $this);
  92. $this->ListBox1->Multiple = true;
  93. $this->ListBox1->DSType = dsSQL;
  94. list($this->ListBox1->BoundColumn, $this->ListBox1->TextColumn, $this->ListBox1->DBFormat) = array("hotel_code", "hotel_name", "");
  95. $this->ListBox1->DataSource = new clsDBdbcon1();
  96. $this->ListBox1->ds = & $this->ListBox1->DataSource;
  97. $this->ListBox1->DataSource->SQL = "SELECT hotel_code,concat(hotel_code, ' : ', hotel_name1) as hotel_name FROM hotelmst ";
  98. $this->ListBox1->DataSource->Order = "hotel_code;";
  99. $this->Button2 = & new clsButton("Button2", $Method, $this);
  100. $this->Button3 = & new clsButton("Button3", $Method, $this);
  101. $this->Button4 = & new clsButton("Button4", $Method, $this);
  102. $this->Button5 = & new clsButton("Button5", $Method, $this);
  103. $this->qr_hotelcode = & new clsControl(ccsListBox, "qr_hotelcode", "qr_hotelcode", ccsText, "", CCGetRequestParam("qr_hotelcode", $Method), $this);
  104. $this->qr_hotelcode->Multiple = true;
  105. $this->hotel_code_get = & new clsControl(ccsListBox, "hotel_code_get", "hotel_code_get", ccsText, "", CCGetRequestParam("hotel_code_get", $Method), $this);
  106. $this->hotel_code_get->DSType = dsSQL;
  107. list($this->hotel_code_get->BoundColumn, $this->hotel_code_get->TextColumn, $this->hotel_code_get->DBFormat) = array("hotel_code", "hotel_name", "");
  108. $this->hotel_code_get->DataSource = new clsDBdbcon1();
  109. $this->hotel_code_get->ds = & $this->hotel_code_get->DataSource;
  110. $this->hotel_code_get->DataSource->SQL = "SELECT hotel_code,concat(hotel_code, ' : ', hotel_name1) as hotel_name FROM hotelmst ";
  111. $this->hotel_code_get->DataSource->Order = "hotel_code;";
  112. $this->hotel_code_get->Required = true;
  113. $this->hotel_code_from = & new clsControl(ccsListBox, "hotel_code_from", "Hotel Code", ccsText, "", CCGetRequestParam("hotel_code_from", $Method), $this);
  114. $this->hotel_code_from->DSType = dsSQL;
  115. list($this->hotel_code_from->BoundColumn, $this->hotel_code_from->TextColumn, $this->hotel_code_from->DBFormat) = array("hotel_code", "hotel_name", "");
  116. $this->hotel_code_from->DataSource = new clsDBdbcon1();
  117. $this->hotel_code_from->ds = & $this->hotel_code_from->DataSource;
  118. $this->hotel_code_from->DataSource->SQL = "SELECT hotel_code,concat(hotel_code, ' : ', hotel_name1) as hotel_name FROM hotelmst ";
  119. $this->hotel_code_from->DataSource->Order = "hotel_code;";
  120. $this->hotel_code_from->Required = true;
  121. $this->hotel_code_to = & new clsControl(ccsListBox, "hotel_code_to", "Hotel Code", ccsText, "", CCGetRequestParam("hotel_code_to", $Method), $this);
  122. $this->hotel_code_to->DSType = dsSQL;
  123. list($this->hotel_code_to->BoundColumn, $this->hotel_code_to->TextColumn, $this->hotel_code_to->DBFormat) = array("hotel_code", "hotel_name", "");
  124. $this->hotel_code_to->DataSource = new clsDBdbcon1();
  125. $this->hotel_code_to->ds = & $this->hotel_code_to->DataSource;
  126. $this->hotel_code_to->DataSource->SQL = "SELECT hotel_code,concat(hotel_code, ' : ', hotel_name1) as hotel_name FROM hotelmst ";
  127. $this->hotel_code_to->DataSource->Order = "hotel_code;";
  128. $this->hotel_code_to->Required = true;
  129. $this->hotel_state_from = & new clsControl(ccsListBox, "hotel_state_from", "Hotel State", ccsText, "", CCGetRequestParam("hotel_state_from", $Method), $this);
  130. $this->hotel_state_from->DSType = dsSQL;
  131. list($this->hotel_state_from->BoundColumn, $this->hotel_state_from->TextColumn, $this->hotel_state_from->DBFormat) = array("stte_no", "hotel_state", "");
  132. $this->hotel_state_from->DataSource = new clsDBdbcon1();
  133. $this->hotel_state_from->ds = & $this->hotel_state_from->DataSource;
  134. $this->hotel_state_from->DataSource->SQL = "SELECT stte_no,concat(stte_code, ' : ', stte_name1) as hotel_state FROM statemst ";
  135. $this->hotel_state_from->DataSource->Order = "stte_code;";
  136. $this->hotel_state_from->Required = true;
  137. $this->hotel_state_to = & new clsControl(ccsListBox, "hotel_state_to", "Hotel State", ccsText, "", CCGetRequestParam("hotel_state_to", $Method), $this);
  138. $this->hotel_state_to->DSType = dsSQL;
  139. list($this->hotel_state_to->BoundColumn, $this->hotel_state_to->TextColumn, $this->hotel_state_to->DBFormat) = array("stte_no", "hotel_state", "");
  140. $this->hotel_state_to->DataSource = new clsDBdbcon1();
  141. $this->hotel_state_to->ds = & $this->hotel_state_to->DataSource;
  142. $this->hotel_state_to->DataSource->SQL = "SELECT stte_no,concat(stte_code, ' : ', stte_name1) as hotel_state FROM statemst ";
  143. $this->hotel_state_to->DataSource->Order = "stte_code;";
  144. $this->hotel_state_to->Required = true;
  145. $this->hotel_category_from = & new clsControl(ccsListBox, "hotel_category_from", "Hotel Category", ccsText, "", CCGetRequestParam("hotel_category_from", $Method), $this);
  146. $this->hotel_category_from->DSType = dsSQL;
  147. list($this->hotel_category_from->BoundColumn, $this->hotel_category_from->TextColumn, $this->hotel_category_from->DBFormat) = array("", "hotel_category", "");
  148. $this->hotel_category_from->DataSource = new clsDBdbcon1();
  149. $this->hotel_category_from->ds = & $this->hotel_category_from->DataSource;
  150. $this->hotel_category_from->DataSource->SQL = "select DISTINCT hotel_category from hotelmst ";
  151. $this->hotel_category_from->DataSource->Order = "hotel_category asc ;";
  152. $this->hotel_category_from->Required = true;
  153. $this->hotel_category_to = & new clsControl(ccsListBox, "hotel_category_to", "Hotel Category", ccsText, "", CCGetRequestParam("hotel_category_to", $Method), $this);
  154. $this->hotel_category_to->DSType = dsSQL;
  155. list($this->hotel_category_to->BoundColumn, $this->hotel_category_to->TextColumn, $this->hotel_category_to->DBFormat) = array("", "hotel_category", "");
  156. $this->hotel_category_to->DataSource = new clsDBdbcon1();
  157. $this->hotel_category_to->ds = & $this->hotel_category_to->DataSource;
  158. $this->hotel_category_to->DataSource->SQL = "select DISTINCT hotel_category from hotelmst ";
  159. $this->hotel_category_to->DataSource->Order = "hotel_category desc ;";
  160. $this->hotel_category_to->Required = true;
  161. $this->module = & new clsControl(ccsHidden, "module", "module", ccsText, "", CCGetRequestParam("module", $Method), $this);
  162. $this->Button1 = & new clsButton("Button1", $Method, $this);
  163. $this->Cancel = & new clsButton("Cancel", $Method, $this);
  164. if(!$this->FormSubmitted) {
  165. if(!is_array($this->sorting->Value) && !strlen($this->sorting->Value) && $this->sorting->Value !== false)
  166. $this->sorting->SetText(code);
  167. if(!is_array($this->sorting1->Value) && !strlen($this->sorting1->Value) && $this->sorting1->Value !== false)
  168. $this->sorting1->SetText(code);
  169. if(!is_array($this->sorting2->Value) && !strlen($this->sorting2->Value) && $this->sorting2->Value !== false)
  170. $this->sorting2->SetText(code);
  171. if(!is_array($this->sorting3->Value) && !strlen($this->sorting3->Value) && $this->sorting3->Value !== false)
  172. $this->sorting3->SetText(code);
  173. if(!is_array($this->sorting4->Value) && !strlen($this->sorting4->Value) && $this->sorting4->Value !== false)
  174. $this->sorting4->SetText(code);
  175. if(!is_array($this->sorting5->Value) && !strlen($this->sorting5->Value) && $this->sorting5->Value !== false)
  176. $this->sorting5->SetText(code);
  177. }
  178. }
  179. }
  180. //End Class_Initialize Event
  181.  
  182. //Initialize Method @3-318CD24E
  183. function Initialize()
  184. {
  185.  
  186. if(!$this->Visible)
  187. return;
  188.  
  189. $this->DataSource->Parameters["urlarea_no"] = CCGetFromGet("area_no", "");
  190. }
  191. //End Initialize Method
  192.  
  193. //Validate Method @3-35EE579E
  194. function Validate()
  195. {
  196. global $CCSLocales;
  197. $Validation = true;
  198. $Where = "";
  199. $Validation = ($this->sorting->Validate() && $Validation);
  200. $Validation = ($this->sorting1->Validate() && $Validation);
  201. $Validation = ($this->sorting2->Validate() && $Validation);
  202. $Validation = ($this->sorting3->Validate() && $Validation);
  203. $Validation = ($this->sorting4->Validate() && $Validation);
  204. $Validation = ($this->sorting5->Validate() && $Validation);
  205. $Validation = ($this->ListBox1->Validate() && $Validation);
  206. $Validation = ($this->qr_hotelcode->Validate() && $Validation);
  207. $Validation = ($this->hotel_code_get->Validate() && $Validation);
  208. $Validation = ($this->hotel_code_from->Validate() && $Validation);
  209. $Validation = ($this->hotel_code_to->Validate() && $Validation);
  210. $Validation = ($this->hotel_state_from->Validate() && $Validation);
  211. $Validation = ($this->hotel_state_to->Validate() && $Validation);
  212. $Validation = ($this->hotel_category_from->Validate() && $Validation);
  213. $Validation = ($this->hotel_category_to->Validate() && $Validation);
  214. $Validation = ($this->module->Validate() && $Validation);
  215. $this->CCSEventResult = CCGetEvent($this->CCSEvents, "OnValidate", $this);
  216. $Validation = $Validation && ($this->sorting->Errors->Count() == 0);
  217. $Validation = $Validation && ($this->sorting1->Errors->Count() == 0);
  218. $Validation = $Validation && ($this->sorting2->Errors->Count() == 0);
  219. $Validation = $Validation && ($this->sorting3->Errors->Count() == 0);
  220. $Validation = $Validation && ($this->sorting4->Errors->Count() == 0);
  221. $Validation = $Validation && ($this->sorting5->Errors->Count() == 0);
  222. $Validation = $Validation && ($this->ListBox1->Errors->Count() == 0);
  223. $Validation = $Validation && ($this->qr_hotelcode->Errors->Count() == 0);
  224. $Validation = $Validation && ($this->hotel_code_get->Errors->Count() == 0);
  225. $Validation = $Validation && ($this->hotel_code_from->Errors->Count() == 0);
  226. $Validation = $Validation && ($this->hotel_code_to->Errors->Count() == 0);
  227. $Validation = $Validation && ($this->hotel_state_from->Errors->Count() == 0);
  228. $Validation = $Validation && ($this->hotel_state_to->Errors->Count() == 0);
  229. $Validation = $Validation && ($this->hotel_category_from->Errors->Count() == 0);
  230. $Validation = $Validation && ($this->hotel_category_to->Errors->Count() == 0);
  231. $Validation = $Validation && ($this->module->Errors->Count() == 0);
  232. return (($this->Errors->Count() == 0) && $Validation);
  233. }
  234. //End Validate Method
  235.  
  236. //CheckErrors Method @3-1867FA0E
  237. function CheckErrors()
  238. {
  239. $errors = false;
  240. $errors = ($errors || $this->sorting->Errors->Count());
  241. $errors = ($errors || $this->sorting1->Errors->Count());
  242. $errors = ($errors || $this->sorting2->Errors->Count());
  243. $errors = ($errors || $this->sorting3->Errors->Count());
  244. $errors = ($errors || $this->sorting4->Errors->Count());
  245. $errors = ($errors || $this->sorting5->Errors->Count());
  246. $errors = ($errors || $this->ListBox1->Errors->Count());
  247. $errors = ($errors || $this->qr_hotelcode->Errors->Count());
  248. $errors = ($errors || $this->hotel_code_get->Errors->Count());
  249. $errors = ($errors || $this->hotel_code_from->Errors->Count());
  250. $errors = ($errors || $this->hotel_code_to->Errors->Count());
  251. $errors = ($errors || $this->hotel_state_from->Errors->Count());
  252. $errors = ($errors || $this->hotel_state_to->Errors->Count());
  253. $errors = ($errors || $this->hotel_category_from->Errors->Count());
  254. $errors = ($errors || $this->hotel_category_to->Errors->Count());
  255. $errors = ($errors || $this->module->Errors->Count());
  256. $errors = ($errors || $this->Errors->Count());
  257. $errors = ($errors || $this->DataSource->Errors->Count());
  258. return $errors;
  259. }
  260. //End CheckErrors Method
  261.  
  262. //Operation Method @3-EDAA893D
  263. function Operation()
  264. {
  265. if(!$this->Visible)
  266. return;
  267.  
  268. global $Redirect;
  269. global $FileName;
  270.  
  271. $this->DataSource->Prepare();
  272. if(!$this->FormSubmitted) {
  273. $this->EditMode = $this->DataSource->AllParametersSet;
  274. return;
  275. }
  276.  
  277. if($this->FormSubmitted) {
  278. $this->PressedButton = "Button2";
  279. if($this->Button2->Pressed) {
  280. $this->PressedButton = "Button2";
  281. } else if($this->Button3->Pressed) {
  282. $this->PressedButton = "Button3";
  283. } else if($this->Button4->Pressed) {
  284. $this->PressedButton = "Button4";
  285. } else if($this->Button5->Pressed) {
  286. $this->PressedButton = "Button5";
  287. } else if($this->Button1->Pressed) {
  288. $this->PressedButton = "Button1";
  289. } else if($this->Cancel->Pressed) {
  290. $this->PressedButton = "Cancel";
  291. }
  292. }
  293. $Redirect = "master_list_hotelmst_qr1.php" . "?" . CCGetQueryString("QueryString", array("ccsForm"));
  294. if($this->PressedButton == "Cancel") {
  295. if(!CCGetEvent($this->Cancel->CCSEvents, "OnClick", $this->Cancel)) {
  296. $Redirect = "";
  297. }
  298. } else if($this->Validate()) {
  299. if($this->PressedButton == "Button2") {
  300. if(!CCGetEvent($this->Button2->CCSEvents, "OnClick", $this->Button2)) {
  301. $Redirect = "";
  302. }
  303. } else if($this->PressedButton == "Button3") {
  304. if(!CCGetEvent($this->Button3->CCSEvents, "OnClick", $this->Button3)) {
  305. $Redirect = "";
  306. }
  307. } else if($this->PressedButton == "Button4") {
  308. if(!CCGetEvent($this->Button4->CCSEvents, "OnClick", $this->Button4)) {
  309. $Redirect = "";
  310. }
  311. } else if($this->PressedButton == "Button5") {
  312. if(!CCGetEvent($this->Button5->CCSEvents, "OnClick", $this->Button5)) {
  313. $Redirect = "";
  314. }
  315. } else if($this->PressedButton == "Button1") {
  316. if(!CCGetEvent($this->Button1->CCSEvents, "OnClick", $this->Button1)) {
  317. $Redirect = "";
  318. }
  319. }
  320. } else {
  321. $Redirect = "";
  322. }
  323. if ($Redirect)
  324. $this->DataSource->close();
  325. }
  326. //End Operation Method
  327.  
  328. //Show Method @3-6E6726C9
  329. function Show()
  330. {
  331. global $Tpl;
  332. global $FileName;
  333. global $CCSLocales;
  334. $Error = "";
  335.  
  336. if(!$this->Visible)
  337. return;
  338.  
  339. $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeSelect", $this);
  340.  
  341. $this->sorting->Prepare();
  342. $this->sorting1->Prepare();
  343. $this->sorting2->Prepare();
  344. $this->sorting3->Prepare();
  345. $this->sorting4->Prepare();
  346. $this->sorting5->Prepare();
  347. $this->ListBox1->Prepare();
  348. $this->qr_hotelcode->Prepare();
  349. $this->hotel_code_get->Prepare();
  350. $this->hotel_code_from->Prepare();
  351. $this->hotel_code_to->Prepare();
  352. $this->hotel_state_from->Prepare();
  353. $this->hotel_state_to->Prepare();
  354. $this->hotel_category_from->Prepare();
  355. $this->hotel_category_to->Prepare();
  356.  
  357. $RecordBlock = "Record " . $this->ComponentName;
  358. $ParentPath = $Tpl->block_path;
  359. $Tpl->block_path = $ParentPath . "/" . $RecordBlock;
  360. $this->EditMode = $this->EditMode && $this->ReadAllowed;
  361. if($this->EditMode) {
  362. if($this->DataSource->Errors->Count()){
  363. $this->Errors->AddErrors($this->DataSource->Errors);
  364. $this->DataSource->Errors->clear();
  365. }
  366. $this->DataSource->Open();
  367. if($this->DataSource->Errors->Count() == 0 && $this->DataSource->next_record()) {
  368. $this->DataSource->SetValues();
  369. if(!$this->FormSubmitted){
  370. $this->ListBox1->SetValue($this->DataSource->ListBox1->GetValue());
  371. $this->hotel_code_get->SetValue($this->DataSource->hotel_code_get->GetValue());
  372. $this->hotel_code_from->SetValue($this->DataSource->hotel_code_from->GetValue());
  373. $this->hotel_code_to->SetValue($this->DataSource->hotel_code_to->GetValue());
  374. $this->hotel_state_from->SetValue($this->DataSource->hotel_state_from->GetValue());
  375. $this->hotel_state_to->SetValue($this->DataSource->hotel_state_to->GetValue());
  376. $this->hotel_category_from->SetValue($this->DataSource->hotel_category_from->GetValue());
  377. $this->hotel_category_to->SetValue($this->DataSource->hotel_category_to->GetValue());
  378. }
  379. } else {
  380. $this->EditMode = false;
  381. }
  382. }
  383. if (!$this->FormSubmitted) {
  384. }
  385.  
  386. if($this->FormSubmitted || $this->CheckErrors()) {
  387. $Error = "";
  388. $Error = ComposeStrings($Error, $this->sorting->Errors->ToString());
  389. $Error = ComposeStrings($Error, $this->sorting1->Errors->ToString());
  390. $Error = ComposeStrings($Error, $this->sorting2->Errors->ToString());
  391. $Error = ComposeStrings($Error, $this->sorting3->Errors->ToString());
  392. $Error = ComposeStrings($Error, $this->sorting4->Errors->ToString());
  393. $Error = ComposeStrings($Error, $this->sorting5->Errors->ToString());
  394. $Error = ComposeStrings($Error, $this->ListBox1->Errors->ToString());
  395. $Error = ComposeStrings($Error, $this->qr_hotelcode->Errors->ToString());
  396. $Error = ComposeStrings($Error, $this->hotel_code_get->Errors->ToString());
  397. $Error = ComposeStrings($Error, $this->hotel_code_from->Errors->ToString());
  398. $Error = ComposeStrings($Error, $this->hotel_code_to->Errors->ToString());
  399. $Error = ComposeStrings($Error, $this->hotel_state_from->Errors->ToString());
  400. $Error = ComposeStrings($Error, $this->hotel_state_to->Errors->ToString());
  401. $Error = ComposeStrings($Error, $this->hotel_category_from->Errors->ToString());
  402. $Error = ComposeStrings($Error, $this->hotel_category_to->Errors->ToString());
  403. $Error = ComposeStrings($Error, $this->module->Errors->ToString());
  404. $Error = ComposeStrings($Error, $this->Errors->ToString());
  405. $Error = ComposeStrings($Error, $this->DataSource->Errors->ToString());
  406. $Tpl->SetVar("Error", $Error);
  407. $Tpl->Parse("Error", false);
  408. }
  409. $CCSForm = $this->EditMode ? $this->ComponentName . ":" . "Edit" : $this->ComponentName;
  410. $this->HTMLFormAction = $FileName . "?" . CCAddParam(CCGetQueryString("QueryString", ""), "ccsForm", $CCSForm);
  411. $Tpl->SetVar("Action", $this->HTMLFormAction);
  412. $Tpl->SetVar("HTMLFormName", $this->ComponentName);
  413. $Tpl->SetVar("HTMLFormEnctype", $this->FormEnctype);
  414.  
  415. $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShow", $this);
  416. if(!$this->Visible) {
  417. $Tpl->block_path = $ParentPath;
  418. return;
  419. }
  420.  
  421. $this->sorting->Show();
  422. $this->sorting1->Show();
  423. $this->sorting2->Show();
  424. $this->sorting3->Show();
  425. $this->sorting4->Show();
  426. $this->sorting5->Show();
  427. $this->ListBox1->Show();
  428. $this->Button2->Show();
  429. $this->Button3->Show();
  430. $this->Button4->Show();
  431. $this->Button5->Show();
  432. $this->qr_hotelcode->Show();
  433. $this->hotel_code_get->Show();
  434. $this->hotel_code_from->Show();
  435. $this->hotel_code_to->Show();
  436. $this->hotel_state_from->Show();
  437. $this->hotel_state_to->Show();
  438. $this->hotel_category_from->Show();
  439. $this->hotel_category_to->Show();
  440. $this->module->Show();
  441. $this->Button1->Show();
  442. $this->Cancel->Show();
  443. $Tpl->parse();
  444. $Tpl->block_path = $ParentPath;
  445. $this->DataSource->close();
  446. }
  447. //End Show Method
  448.  
  449. } //End hotel_name_to Class @3-FCB6E20C
  450.  
  451. class clshotel_name_toDataSource extends clsDBdbcon1 { //hotel_name_toDataSource Class @3-C0B2E6A9
  452.  
  453. //DataSource Variables @3-4B6530E7
  454. public $Parent = "";
  455. public $CCSEvents = "";
  456. public $CCSEventResult;
  457. public $ErrorBlock;
  458. public $CmdExecution;
  459.  
  460. public $wp;
  461. public $AllParametersSet;
  462.  
  463.  
  464. // Datasource fields
  465. public $sorting;
  466. public $sorting1;
  467. public $sorting2;
  468. public $sorting3;
  469. public $sorting4;
  470. public $sorting5;
  471. public $ListBox1;
  472. public $qr_hotelcode;
  473. public $hotel_code_get;
  474. public $hotel_code_from;
  475. public $hotel_code_to;
  476. public $hotel_state_from;
  477. public $hotel_state_to;
  478. public $hotel_category_from;
  479. public $hotel_category_to;
  480. public $module;
  481. //End DataSource Variables
  482.  
  483. //DataSourceClass_Initialize Event @3-17A62D5F
  484. function clshotel_name_toDataSource(& $Parent)
  485. {
  486. $this->Parent = & $Parent;
  487. $this->ErrorBlock = "Record hotel_name_to/Error";
  488. $this->Initialize();
  489. $this->sorting = new clsField("sorting", ccsText, "");
  490. $this->sorting1 = new clsField("sorting1", ccsText, "");
  491. $this->sorting2 = new clsField("sorting2", ccsText, "");
  492. $this->sorting3 = new clsField("sorting3", ccsText, "");
  493. $this->sorting4 = new clsField("sorting4", ccsText, "");
  494. $this->sorting5 = new clsField("sorting5", ccsText, "");
  495. $this->ListBox1 = new clsField("ListBox1", ccsText, "");
  496. $this->qr_hotelcode = new clsField("qr_hotelcode", ccsText, "");
  497. $this->hotel_code_get = new clsField("hotel_code_get", ccsText, "");
  498. $this->hotel_code_from = new clsField("hotel_code_from", ccsText, "");
  499. $this->hotel_code_to = new clsField("hotel_code_to", ccsText, "");
  500. $this->hotel_state_from = new clsField("hotel_state_from", ccsText, "");
  501. $this->hotel_state_to = new clsField("hotel_state_to", ccsText, "");
  502. $this->hotel_category_from = new clsField("hotel_category_from", ccsText, "");
  503. $this->hotel_category_to = new clsField("hotel_category_to", ccsText, "");
  504. $this->module = new clsField("module", ccsText, "");
  505.  
  506. }
  507. //End DataSourceClass_Initialize Event
  508.  
  509. //Prepare Method @3-793C22D2
  510. function Prepare()
  511. {
  512. global $CCSLocales;
  513. global $DefaultDateFormat;
  514. $this->wp = new clsSQLParameters($this->ErrorBlock);
  515. $this->wp->AddParameter("1", "urlarea_no", ccsInteger, "", "", $this->Parameters["urlarea_no"], "", false);
  516. $this->AllParametersSet = $this->wp->AllParamsSet();
  517. $this->wp->Criterion[1] = $this->wp->Operation(opEqual, "area_no", $this->wp->GetDBValue("1"), $this->ToSQL($this->wp->GetDBValue("1"), ccsInteger),false);
  518. $this->Where =
  519. $this->wp->Criterion[1];
  520. }
  521. //End Prepare Method
  522.  
  523. //Open Method @3-19F4214F
  524. function Open()
  525. {
  526. $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent);
  527. $this->SQL = "SELECT * " .
  528. "FROM hotelmst {SQL_Where} {SQL_OrderBy}";
  529. $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteSelect", $this->Parent);
  530. $this->query(CCBuildSQL($this->SQL, $this->Where, $this->Order));
  531. $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteSelect", $this->Parent);
  532. }
  533. //End Open Method
  534.  
  535. //SetValues Method @3-5D655443
  536. function SetValues()
  537. {
  538. $this->ListBox1->SetDBValue($this->f("hotel_code"));
  539. $this->hotel_code_get->SetDBValue($this->f("hotel_code"));
  540. $this->hotel_code_from->SetDBValue($this->f("hotel_code"));
  541. $this->hotel_code_to->SetDBValue($this->f("hotel_code"));
  542. $this->hotel_state_from->SetDBValue($this->f("hotel_state"));
  543. $this->hotel_state_to->SetDBValue($this->f("hotel_state"));
  544. $this->hotel_category_from->SetDBValue($this->f("hotel_category"));
  545. $this->hotel_category_to->SetDBValue($this->f("hotel_category"));
  546. }
  547. //End SetValues Method
  548.  
  549. } //End hotel_name_toDataSource Class @3-FCB6E20C
  550.  
  551. //Initialize Page @1-AFA1FBFE
  552. // Variables
  553. $FileName = "";
  554. $Redirect = "";
  555. $Tpl = "";
  556. $TemplateFileName = "";
  557. $BlockToParse = "";
  558. $ComponentName = "";
  559.  
  560. // Events;
  561. $CCSEvents = "";
  562. $CCSEventResult = "";
  563.  
  564. $FileName = FileName;
  565. $Redirect = "";
  566. $TemplateFileName = "master_list_hotelmst_qr1.html";
  567. $BlockToParse = "main";
  568. $TemplateEncoding = "ISO-8859-1";
  569. $PathToRoot = "../";
  570. //End Initialize Page
  571.  
  572. //Include events file @1-BA48464B
  573. include("./master_list_hotelmst_qr1_events.php");
  574. //End Include events file
  575.  
  576. //Initialize Objects @1-7A3BE860
  577. $DBdbcon1 = new clsDBdbcon1();
  578. $MainPage->Connections["dbcon1"] = & $DBdbcon1;
  579.  
  580. // Controls
  581. $hotel_name_to = & new clsRecordhotel_name_to("", $MainPage);
  582. $MainPage->hotel_name_to = & $hotel_name_to;
  583. $hotel_name_to->Initialize();
  584.  
  585. BindEvents();
  586.  
  587. $CCSEventResult = CCGetEvent($CCSEvents, "AfterInitialize", $MainPage);
  588.  
  589. $Charset = $Charset ? $Charset : "iso-8859-1";
  590. if ($Charset)
  591. header("Content-Type: text/html; charset=" . $Charset);
  592. //End Initialize Objects
  593.  
  594. //Initialize HTML Template @1-6CC97037
  595. $CCSEventResult = CCGetEvent($CCSEvents, "OnInitializeView", $MainPage);
  596. $Tpl = new clsTemplate();
  597. $Tpl->LoadTemplate(PathToCurrentPage . $TemplateFileName, $BlockToParse, "ISO-8859-1");
  598. $Tpl->block_path = "/$BlockToParse";
  599. $CCSEventResult = CCGetEvent($CCSEvents, "BeforeShow", $MainPage);
  600. //End Initialize HTML Template
  601.  
  602. //Execute Components @1-44614DAB
  603. $hotel_name_to->Operation();
  604. //End Execute Components
  605.  
  606. //Go to destination page @1-D441BAE9
  607. if($Redirect)
  608. {
  609. $CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload", $MainPage);
  610. $DBdbcon1->close();
  611. header("Location: " . $Redirect);
  612. unset($hotel_name_to);
  613. unset($Tpl);
  614. exit;
  615. }
  616. //End Go to destination page
  617.  
  618. //Show Page @1-69DEC924
  619. $hotel_name_to->Show();
  620. $Tpl->block_path = "";
  621. $Tpl->Parse($BlockToParse, false);
  622. $main_block = $Tpl->GetVar($BlockToParse);
  623. if(preg_match("/<\/body>/i", $main_block)) {
  624. $main_block = preg_replace("/<\/body>/i", implode(array("<center><font ", "face=\"Arial\"><small", ">G&#101;ner&#97", ";&#116;ed <!-- SC", "C -->&#119;&#105", ";&#116;&#104; <", "!-- SCC -->&#67", ";&#111;&#100;e", "Charg&#101; <!-- S", "CC -->&#83;&#116;&", "#117;&#100;io.<", "/small></font><", "/center>"), "") . "</body>", $main_block);
  625. } else if(preg_match("/<\/html>/i", $main_block) && !preg_match("/<\/frameset>/i", $main_block)) {
  626. $main_block = preg_replace("/<\/html>/i", implode(array("<center><font ", "face=\"Arial\"><small", ">G&#101;ner&#97", ";&#116;ed <!-- SC", "C -->&#119;&#105", ";&#116;&#104; <", "!-- SCC -->&#67", ";&#111;&#100;e", "Charg&#101; <!-- S", "CC -->&#83;&#116;&", "#117;&#100;io.<", "/small></font><", "/center>"), "") . "</html>", $main_block);
  627. } else if(!preg_match("/<\/frameset>/i", $main_block)) {
  628. $main_block .= implode(array("<center><font ", "face=\"Arial\"><small", ">G&#101;ner&#97", ";&#116;ed <!-- SC", "C -->&#119;&#105", ";&#116;&#104; <", "!-- SCC -->&#67", ";&#111;&#100;e", "Charg&#101; <!-- S", "CC -->&#83;&#116;&", "#117;&#100;io.<", "/small></font><", "/center>"), "");
  629. }
  630. $CCSEventResult = CCGetEvent($CCSEvents, "BeforeOutput", $MainPage);
  631. if ($CCSEventResult) echo $main_block;
  632. //End Show Page
  633.  
  634. //Unload Page @1-84762161
  635. $CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload", $MainPage);
  636. $DBdbcon1->close();
  637. unset($hotel_name_to);
  638. unset($Tpl);
  639. //End Unload Page
  640.  
  641.  
  642. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement