function Show($Name) { global $Tpl; $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShow"); if (!$this->Enabled) { return ""; } $Tpl->LoadTemplate($this->TemplatePath . $this->TemplateFileName, $Name); $Tpl->Parse($Name, false); $Tpl->SetVar($Name, $Tpl->GetVar($Name)); }
function Delete() { $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildDelete"); $SQL = "DELETE FROM `users` WHERE " . $this->Where; $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteDelete"); $this->query($SQL); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteDelete"); if ($this->Errors->Count() > 0) { $this->Errors->AddError($this->Errors->ToString()); } }
header("Location: " . $Redirect); $header_outofbound->Class_Terminate(); unset($header_outofbound); $footer->Class_Terminate(); unset($footer); unset($Tpl); exit; } //End Go to destination page //Show Page @1-65A57857 $header_outofbound->Show(); $footer->Show(); $Tpl->block_path = ""; $Tpl->Parse($BlockToParse, false); if (!isset($main_block)) { $main_block = $Tpl->GetVar($BlockToParse); } $main_block = CCConvertEncoding($main_block, $FileEncoding, $TemplateEncoding); $CCSEventResult = CCGetEvent($CCSEvents, "BeforeOutput", $MainPage); if ($CCSEventResult) { echo $main_block; } //End Show Page //Unload Page @1-1F225DEA $CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload", $MainPage); $header_outofbound->Class_Terminate(); unset($header_outofbound); $footer->Class_Terminate(); unset($footer); unset($Tpl); //End Unload Page
function Open() { $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect"); $this->CountSQL = "SELECT COUNT(*) " . "FROM feedback"; $this->SQL = "SELECT * " . "FROM feedback"; $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteSelect"); $this->RecordsCount = CCGetDBValue(CCBuildSQL($this->CountSQL, $this->Where, ""), $this); $this->query(CCBuildSQL($this->SQL, $this->Where, $this->Order)); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteSelect"); $this->MoveToPage($this->AbsolutePage); }
function Delete() { global $CCSLocales; global $DefaultDateFormat; $this->CmdExecution = true; $Where = ""; $wp = new clsSQLParameters($this->ErrorBlock); $wp->AddParameter("1", "ctrlp_user_attribute_id", ccsFloat, "", "", $this->p_user_attribute_id->GetValue(true), "", false); if (!$wp->AllParamsSet()) { $this->Errors->addError($CCSLocales->GetText("CCS_CustomOperationError_MissingParameters")); } $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildDelete", $this->Parent); $wp->Criterion[1] = $wp->Operation(opEqual, "p_user_attribute_id", $wp->GetDBValue("1"), $this->ToSQL($wp->GetDBValue("1"), ccsFloat), false); $Where = $wp->Criterion[1]; $this->SQL = "DELETE FROM p_user_attribute"; $this->SQL = CCBuildSQL($this->SQL, $Where, ""); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteDelete", $this->Parent); if ($this->Errors->Count() == 0 && $this->CmdExecution) { $this->query($this->SQL); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteDelete", $this->Parent); } }
function Delete() { global $CCSLocales; global $DefaultDateFormat; $this->CmdExecution = true; $this->cp["t_cust_order_legal_doc_id"] = new clsSQLParameter("ctrlt_cust_order_legal_doc_id", ccsFloat, "", "", $this->t_cust_order_legal_doc_id->GetValue(true), 0, false, $this->ErrorBlock); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildDelete", $this->Parent); if (!is_null($this->cp["t_cust_order_legal_doc_id"]->GetValue()) and !strlen($this->cp["t_cust_order_legal_doc_id"]->GetText()) and !is_bool($this->cp["t_cust_order_legal_doc_id"]->GetValue())) { $this->cp["t_cust_order_legal_doc_id"]->SetValue($this->t_cust_order_legal_doc_id->GetValue(true)); } if (!strlen($this->cp["t_cust_order_legal_doc_id"]->GetText()) and !is_bool($this->cp["t_cust_order_legal_doc_id"]->GetValue(true))) { $this->cp["t_cust_order_legal_doc_id"]->SetText(0); } $this->SQL = "DELETE FROM t_cust_order_legal_doc\n" . "WHERE t_cust_order_legal_doc_id = " . $this->SQLValue($this->cp["t_cust_order_legal_doc_id"]->GetDBValue(), ccsFloat) . ""; $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteDelete", $this->Parent); if ($this->Errors->Count() == 0 && $this->CmdExecution) { $this->query($this->SQL); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteDelete", $this->Parent); } }
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->creation_date->Errors->ToString()); $Error = ComposeStrings($Error, $this->created_by->Errors->ToString()); $Error = ComposeStrings($Error, $this->updated_date->Errors->ToString()); $Error = ComposeStrings($Error, $this->updated_by->Errors->ToString()); $Error = ComposeStrings($Error, $this->qty_room_sold->Errors->ToString()); $Error = ComposeStrings($Error, $this->npwd->Errors->ToString()); $Error = ComposeStrings($Error, $this->t_cust_account_id->Errors->ToString()); $Error = ComposeStrings($Error, $this->finance_period_code->Errors->ToString()); $Error = ComposeStrings($Error, $this->p_finance_period_id->Errors->ToString()); $Error = ComposeStrings($Error, $this->p_year_period_id->Errors->ToString()); $Error = ComposeStrings($Error, $this->year_code->Errors->ToString()); $Error = ComposeStrings($Error, $this->total_trans_amount->Errors->ToString()); $Error = ComposeStrings($Error, $this->start_period->Errors->ToString()); $Error = ComposeStrings($Error, $this->DatePicker_start_period->Errors->ToString()); $Error = ComposeStrings($Error, $this->end_period->Errors->ToString()); $Error = ComposeStrings($Error, $this->DatePicker_end_period->Errors->ToString()); $Error = ComposeStrings($Error, $this->company_name->Errors->ToString()); $Error = ComposeStrings($Error, $this->vat_code->Errors->ToString()); $Error = ComposeStrings($Error, $this->p_vat_type_id->Errors->ToString()); $Error = ComposeStrings($Error, $this->vat_code_dtl->Errors->ToString()); $Error = ComposeStrings($Error, $this->p_vat_type_dtl_id->Errors->ToString()); $Error = ComposeStrings($Error, $this->vat_code_dtl_cls->Errors->ToString()); $Error = ComposeStrings($Error, $this->p_vat_type_dtl_cls_id->Errors->ToString()); $Error = ComposeStrings($Error, $this->mode_denda->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->creation_date->Show(); $this->created_by->Show(); $this->updated_date->Show(); $this->updated_by->Show(); $this->qty_room_sold->Show(); $this->npwd->Show(); $this->t_cust_account_id->Show(); $this->finance_period_code->Show(); $this->p_finance_period_id->Show(); $this->p_year_period_id->Show(); $this->year_code->Show(); $this->total_trans_amount->Show(); $this->start_period->Show(); $this->DatePicker_start_period->Show(); $this->end_period->Show(); $this->DatePicker_end_period->Show(); $this->Button1->Show(); $this->company_name->Show(); $this->vat_code->Show(); $this->p_vat_type_id->Show(); $this->vat_code_dtl->Show(); $this->p_vat_type_dtl_id->Show(); $this->vat_code_dtl_cls->Show(); $this->p_vat_type_dtl_cls_id->Show(); $this->mode_denda->Show(); $Tpl->parse(); $Tpl->block_path = $ParentPath; }
function Show() { global $Tpl; if ($this->Visible) { $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShow"); $Tpl->Parse("Button " . $this->Name, false); } }
function Open() { $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent); $this->CountSQL = "SELECT COUNT(*) FROM (select * from f_status_sudah_transaksi(" . $this->SQLValue($this->wp->GetDBValue("1"), ccsFloat) . ")) cnt"; $this->SQL = "select * from f_status_sudah_transaksi(" . $this->SQLValue($this->wp->GetDBValue("1"), ccsFloat) . ")"; $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteSelect", $this->Parent); if ($this->CountSQL) { $this->RecordsCount = CCGetDBValue(CCBuildSQL($this->CountSQL, $this->Where, ""), $this); } else { $this->RecordsCount = "CCS not counted"; } $this->query($this->OptimizeSQL(CCBuildSQL($this->SQL, $this->Where, $this->Order))); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteSelect", $this->Parent); }
function Open() { $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent); $this->CountSQL = "SELECT COUNT(*)\n\n" . "FROM v_vat_reg_employee"; $this->SQL = "SELECT * \n\n" . "FROM v_vat_reg_employee {SQL_Where} {SQL_OrderBy}"; $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteSelect", $this->Parent); if ($this->CountSQL) { $this->RecordsCount = CCGetDBValue(CCBuildSQL($this->CountSQL, $this->Where, ""), $this); } else { $this->RecordsCount = "CCS not counted"; } $this->query($this->OptimizeSQL(CCBuildSQL($this->SQL, $this->Where, $this->Order))); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteSelect", $this->Parent); }
function Open() { $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent); $this->CountSQL = "SELECT COUNT(*) FROM (SELECT x.receipt_no,\n" . "x.p_finance_period_id,\n" . "x.description,\n" . "f_per.*\n" . "FROM p_finance_period f_per,\n" . "(select sett.p_finance_period_id,\n" . "receipt_no,sett_type.description\n" . "\t\t\t\t\t\tfrom\n" . "\t\t\t\t\t\t\tt_vat_setllement sett,\n" . "\t\t\t\t\t\t\tp_settlement_type sett_type,\n" . "t_payment_receipt rec\n" . "\t\t\t\t\t\t\tWHERE sett.t_cust_account_id = " . $this->SQLValue($this->wp->GetDBValue("2"), ccsText) . "\n" . "\t\t\t\t\t\t\tand sett.p_settlement_type_id = sett_type.p_settlement_type_id\n" . "\t\t\t\t\t\t\tand sett.t_vat_setllement_id = rec.t_vat_setllement_id (+)\n" . "\t\t\t\t\t\t\tand sett.p_settlement_type_id <> 7) as x\n" . "\t\t\t\t\twhere f_per.p_finance_period_id = x.p_finance_period_id(+)\n" . "\t\t\t\t\tand f_per.end_date < (select start_date from p_finance_period where p_finance_period_id = " . $this->SQLValue($this->wp->GetDBValue("1"), ccsText) . ")\n" . "\t\t\t\t\tand f_per.start_date >= '01-01-2013'\n" . "\t\t\t\t\tand (receipt_no is null or receipt_no ='')\n" . "\t\t\t\t\tand f_per.start_date >= '" . $this->SQLValue($this->wp->GetDBValue("3"), ccsText) . "') cnt"; $this->SQL = "SELECT x.receipt_no,\n" . "x.p_finance_period_id,\n" . "x.description,\n" . "f_per.*\n" . "FROM p_finance_period f_per,\n" . "(select sett.p_finance_period_id,\n" . "receipt_no,sett_type.description\n" . "\t\t\t\t\t\tfrom\n" . "\t\t\t\t\t\t\tt_vat_setllement sett,\n" . "\t\t\t\t\t\t\tp_settlement_type sett_type,\n" . "t_payment_receipt rec\n" . "\t\t\t\t\t\t\tWHERE sett.t_cust_account_id = " . $this->SQLValue($this->wp->GetDBValue("2"), ccsText) . "\n" . "\t\t\t\t\t\t\tand sett.p_settlement_type_id = sett_type.p_settlement_type_id\n" . "\t\t\t\t\t\t\tand sett.t_vat_setllement_id = rec.t_vat_setllement_id (+)\n" . "\t\t\t\t\t\t\tand sett.p_settlement_type_id <> 7) as x\n" . "\t\t\t\t\twhere f_per.p_finance_period_id = x.p_finance_period_id(+)\n" . "\t\t\t\t\tand f_per.end_date < (select start_date from p_finance_period where p_finance_period_id = " . $this->SQLValue($this->wp->GetDBValue("1"), ccsText) . ")\n" . "\t\t\t\t\tand f_per.start_date >= '01-01-2013'\n" . "\t\t\t\t\tand (receipt_no is null or receipt_no ='')\n" . "\t\t\t\t\tand f_per.start_date >= '" . $this->SQLValue($this->wp->GetDBValue("3"), ccsText) . "'\n" . "\t\t\t\t\t {SQL_OrderBy}"; $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteSelect", $this->Parent); if ($this->CountSQL) { $this->RecordsCount = CCGetDBValue(CCBuildSQL($this->CountSQL, $this->Where, ""), $this); } else { $this->RecordsCount = "CCS not counted"; } $this->query($this->OptimizeSQL(CCBuildSQL($this->SQL, $this->Where, $this->Order))); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteSelect", $this->Parent); }
function Open() { $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent); $this->CountSQL = "SELECT COUNT(*) FROM (select left(no_spt,length(no_spt)-3) as no_spt_2,\n" . "left(no_kohir,length(no_kohir)-3) as no_kohir_2,\n" . "left(no_bukti_set,length(no_bukti_set)-3) as no_bukti_set_2,\n" . "* from tuuset98 where npwpd_set = '" . $this->SQLValue($this->wp->GetDBValue("2"), ccsText) . "') cnt"; $this->SQL = "select left(no_spt,length(no_spt)-3) as no_spt_2,\n" . "left(no_kohir,length(no_kohir)-3) as no_kohir_2,\n" . "left(no_bukti_set,length(no_bukti_set)-3) as no_bukti_set_2,\n" . "* from tuuset98 where npwpd_set = '" . $this->SQLValue($this->wp->GetDBValue("2"), ccsText) . "' {SQL_OrderBy}"; $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteSelect", $this->Parent); if ($this->CountSQL) { $this->RecordsCount = CCGetDBValue(CCBuildSQL($this->CountSQL, $this->Where, ""), $this); } else { $this->RecordsCount = "CCS not counted"; } $this->query($this->OptimizeSQL(CCBuildSQL($this->SQL, $this->Where, $this->Order))); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteSelect", $this->Parent); }
function Show() { global $Tpl, $PathToCurrentMasterPage; $this->EventResult = CCGetEvent($this->CCSEvents, "BeforeShow", $this); if (!$this->Visible) { return; } $this->Attributes->Show(); $QueryString = CCGetQueryString("QueryString", array($this->TargetName . "Page", "ccsForm")); $SorterBlock = "Sorter " . $this->SorterName; $AscOnPath = $SorterBlock . "/Asc_On"; $AscOffPath = $SorterBlock . "/Asc_Off"; $DescOnPath = $SorterBlock . "/Desc_On"; $DescOffPath = $SorterBlock . "/Desc_Off"; $QueryString = CCAddParam($QueryString, $this->TargetName . "Order", $this->SorterName); $AscOnExist = $Tpl->BlockExists($AscOnPath); $AscOffExist = $Tpl->BlockExists($AscOffPath); $DescOnExist = $Tpl->BlockExists($DescOnPath); $DescOffExist = $Tpl->BlockExists($DescOffPath); if ($this->IsOn) { if ($this->IsAsc) { $this->OrderDirection = "DESC"; $Tpl->SetVar("CCS_PathToMasterPage", RelativePath . $PathToCurrentMasterPage); if ($AscOnExist) { $Tpl->Parse($AscOnPath, false); } if ($AscOffExist) { $Tpl->SetVar($AscOffPath, ""); } if ($DescOnExist) { $Tpl->SetVar($DescOnPath, ""); } if ($DescOffExist) { $Tpl->SetVar("Desc_URL", $this->GetLink($this->FileName . "?" . CCAddParam($QueryString, $this->TargetName . "Dir", "DESC"))); $Tpl->SetVar("CCS_PathToMasterPage", RelativePath . $PathToCurrentMasterPage); $Tpl->Parse($DescOffPath, false); } } else { $this->OrderDirection = "ASC"; if ($AscOnExist) { $Tpl->SetVar($AscOnPath, ""); } if ($AscOffExist) { $Tpl->SetVar("Asc_URL", $this->GetLink($this->FileName . "?" . CCAddParam($QueryString, $this->TargetName . "Dir", "ASC"))); $Tpl->SetVar("CCS_PathToMasterPage", RelativePath . $PathToCurrentMasterPage); $Tpl->Parse($AscOffPath, false); } if ($DescOnExist) { $Tpl->SetVar("CCS_PathToMasterPage", RelativePath . $PathToCurrentMasterPage); $Tpl->Parse($DescOnPath, false); } if ($DescOffExist) { $Tpl->SetVar($DescOffPath, ""); } } } else { $this->OrderDirection = "ASC"; if ($AscOnExist) { $Tpl->SetVar($AscOnPath, ""); } if ($AscOffExist) { $Tpl->SetVar("Asc_URL", $this->GetLink($this->FileName . "?" . CCAddParam($QueryString, $this->TargetName . "Dir", "ASC"))); $Tpl->SetVar("CCS_PathToMasterPage", RelativePath . $PathToCurrentMasterPage); $Tpl->Parse($AscOffPath, false); } if ($DescOnExist) { $Tpl->SetVar($DescOnPath, ""); } if ($DescOffExist) { $Tpl->SetVar("Desc_URL", $this->GetLink($this->FileName . "?" . CCAddParam($QueryString, $this->TargetName . "Dir", "DESC"))); $Tpl->SetVar("CCS_PathToMasterPage", RelativePath . $PathToCurrentMasterPage); $Tpl->Parse($DescOffPath, false); } } $QueryString = CCAddParam($QueryString, $this->TargetName . "Dir", $this->OrderDirection); $Tpl->SetVar("Sort_URL", $this->GetLink($this->FileName . "?" . $QueryString)); $Tpl->Parse($SorterBlock, false); }
function Delete() { global $CCSLocales; global $DefaultDateFormat; $this->CmdExecution = true; $this->cp["t_vat_setllement_id"] = new clsSQLParameter("ctrlt_vat_setllement_id", ccsFloat, "", "", $this->t_vat_setllement_id->GetValue(true), 0, false, $this->ErrorBlock); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildDelete", $this->Parent); if (!is_null($this->cp["t_vat_setllement_id"]->GetValue()) and !strlen($this->cp["t_vat_setllement_id"]->GetText()) and !is_bool($this->cp["t_vat_setllement_id"]->GetValue())) { $this->cp["t_vat_setllement_id"]->SetValue($this->t_vat_setllement_id->GetValue(true)); } if (!strlen($this->cp["t_vat_setllement_id"]->GetText()) and !is_bool($this->cp["t_vat_setllement_id"]->GetValue(true))) { $this->cp["t_vat_setllement_id"]->SetText(0); } $this->SQL = "select * from f_del_vat_setllement(" . $this->SQLValue($this->cp["t_vat_setllement_id"]->GetDBValue(), ccsFloat) . ",null,null)"; $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteDelete", $this->Parent); if ($this->Errors->Count() == 0 && $this->CmdExecution) { $this->query($this->SQL); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteDelete", $this->Parent); } }
function Update() { $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildUpdate"); $SQL = "UPDATE `settings_general` SET " . "`sitename`=" . $this->ToSQL($this->sitename->GetDBValue(), $this->sitename->DataType) . ", " . "`siteemail`=" . $this->ToSQL($this->siteemail->GetDBValue(), $this->siteemail->DataType) . ", " . "`homeurl`=" . $this->ToSQL($this->homeurl->GetDBValue(), $this->homeurl->DataType) . ", " . "`secureurl`=" . $this->ToSQL($this->secureurl->GetDBValue(), $this->secureurl->DataType) . ", " . "`uploadurl`=" . $this->ToSQL($this->uploadurl->GetDBValue(), $this->uploadurl->DataType) . ", " . "`pagentrys`=" . $this->ToSQL($this->pagentrys->GetDBValue(), $this->pagentrys->DataType) . ", " . "`frontentrys`=" . $this->ToSQL($this->frontentrys->GetDBValue(), $this->frontentrys->DataType) . ", " . "`notify`=" . $this->ToSQL($this->notify->GetDBValue(), $this->notify->DataType) . ", " . "`has_gd`=" . $this->ToSQL($this->has_gd->GetDBValue(), $this->has_gd->DataType) . ", " . "`approv_priority`=" . $this->ToSQL($this->approv_priority->GetDBValue(), $this->approv_priority->DataType) . ", " . "`notifyads`=" . $this->ToSQL($this->notifyads->GetDBValue(), $this->notifyads->DataType) . ", " . "`notifyemail`=" . $this->ToSQL($this->notifyemail->GetDBValue(), $this->notifyemail->DataType) . ", " . "`bounceout`=" . $this->ToSQL($this->bounceout->GetDBValue(), $this->bounceout->DataType) . ", " . "`bounceout_id`=" . $this->ToSQL($this->bounce_id->GetDBValue(), $this->bounce_id->DataType) . ", " . "`language_id`=" . $this->ToSQL($this->langg_id->GetDBValue(), $this->langg_id->DataType) . ", " . "`timeout`=" . $this->ToSQL($this->timeout->GetDBValue(), $this->timeout->DataType) . ", " . "`set_id`=" . $this->ToSQL($this->set_id->GetDBValue(), $this->set_id->DataType); $SQL = CCBuildSQL($SQL, $this->Where, ""); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteUpdate"); $this->query($SQL); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteUpdate"); if ($this->Errors->Count() > 0) { $this->Errors->AddError($this->Errors->ToString()); } }
function Show() { global $Tpl; global $CCSLocales; $block_path = $Tpl->block_path; $Tpl->LoadTemplate("/" . $this->TemplateFileName, $this->ComponentName, $this->TemplateEncoding, "remove"); $Tpl->block_path = $Tpl->block_path . "/" . $this->ComponentName; $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShow", $this); if (!$this->Visible) { $Tpl->block_path = $block_path; $Tpl->SetVar($this->ComponentName, ""); return ""; } $this->Attributes->Show(); $this->pnsidebar->Show(); $this->pnmaintenance->Show(); $Tpl->Parse(); $Tpl->block_path = $block_path; $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeOutput", $this); $Tpl->SetVar($this->ComponentName, $Tpl->GetVar($this->ComponentName)); }
function Insert() { global $CCSLocales; global $DefaultDateFormat; $this->CmdExecution = true; $this->cp["t_vat_setllement_id"] = new clsSQLParameter("ctrlt_vat_setllement_id", ccsInteger, "", "", $this->t_vat_setllement_id->GetValue(true), 0, false, $this->ErrorBlock); $this->cp["alasan"] = new clsSQLParameter("ctrlalasan", ccsText, "", "", $this->alasan->GetValue(true), "", false, $this->ErrorBlock); $this->cp["user_name"] = new clsSQLParameter("sesUserLogin", ccsText, "", "", CCGetSession("UserLogin", NULL), "", false, $this->ErrorBlock); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildInsert", $this->Parent); if (!is_null($this->cp["t_vat_setllement_id"]->GetValue()) and !strlen($this->cp["t_vat_setllement_id"]->GetText()) and !is_bool($this->cp["t_vat_setllement_id"]->GetValue())) { $this->cp["t_vat_setllement_id"]->SetValue($this->t_vat_setllement_id->GetValue(true)); } if (!strlen($this->cp["t_vat_setllement_id"]->GetText()) and !is_bool($this->cp["t_vat_setllement_id"]->GetValue(true))) { $this->cp["t_vat_setllement_id"]->SetText(0); } if (!is_null($this->cp["alasan"]->GetValue()) and !strlen($this->cp["alasan"]->GetText()) and !is_bool($this->cp["alasan"]->GetValue())) { $this->cp["alasan"]->SetValue($this->alasan->GetValue(true)); } if (!is_null($this->cp["user_name"]->GetValue()) and !strlen($this->cp["user_name"]->GetText()) and !is_bool($this->cp["user_name"]->GetValue())) { $this->cp["user_name"]->SetValue(CCGetSession("UserLogin", NULL)); } $this->SQL = "SELECT f_reject_trans(" . $this->SQLValue($this->cp["t_vat_setllement_id"]->GetDBValue(), ccsInteger) . ",'" . $this->SQLValue($this->cp["user_name"]->GetDBValue(), ccsText) . "','" . $this->SQLValue($this->cp["alasan"]->GetDBValue(), ccsText) . "', 0, '') AS msg"; $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteInsert", $this->Parent); if ($this->Errors->Count() == 0 && $this->CmdExecution) { $this->itemResult = $this->query($this->SQL); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteInsert", $this->Parent); } }
function Delete() { global $CCSLocales; global $DefaultDateFormat; $this->CmdExecution = true; $Where = ""; $this->cp["p_role_id"] = new clsSQLParameter("ctrlp_role_id", ccsInteger, "", "", $this->p_role_id->GetValue(true), 0, false, $this->ErrorBlock); $this->cp["struser"] = new clsSQLParameter("sesUserName", ccsText, "", "", CCGetSession("UserName", NULL), "", false, $this->ErrorBlock); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildDelete", $this->Parent); if (!is_null($this->cp["p_role_id"]->GetValue()) and !strlen($this->cp["p_role_id"]->GetText()) and !is_bool($this->cp["p_role_id"]->GetValue())) { $this->cp["p_role_id"]->SetValue($this->p_role_id->GetValue(true)); } if (!strlen($this->cp["p_role_id"]->GetText()) and !is_bool($this->cp["p_role_id"]->GetValue(true))) { $this->cp["p_role_id"]->SetText(0); } if (!is_null($this->cp["struser"]->GetValue()) and !strlen($this->cp["struser"]->GetText()) and !is_bool($this->cp["struser"]->GetValue())) { $this->cp["struser"]->SetValue(CCGetSession("UserName", NULL)); } $this->SQL = "select * from f_crud_p_role\n" . "(" . $this->SQLValue($this->cp["p_role_id"]->GetDBValue(), ccsInteger) . ", \n" . "null,\n" . "null,\n" . "null,\n" . "null,\n" . "null,\n" . "'" . $this->SQLValue($this->cp["struser"]->GetDBValue(), ccsText) . "',\n" . "'D')"; $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteDelete", $this->Parent); if ($this->Errors->Count() == 0 && $this->CmdExecution) { $this->query($this->SQL); //begin-tambahan $Result = $this->next_record(); if ($this->f('oint_result') != 1) { $this->Errors->AddError($this->f('ostr_msg')); return; } //end-tambahan $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteDelete", $this->Parent); } }
function Show() { global $CCSUseAmp; global $Tpl; global $FileName; global $CCSLocales; $Error = ""; if (!$this->Visible) { return; } $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeSelect", $this); $this->ListBox1->Prepare(); $this->ListBox2->Prepare(); $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->code->Errors->ToString()); $Error = ComposeStrings($Error, $this->p_finance_period_id->Errors->ToString()); $Error = ComposeStrings($Error, $this->p_year_period_id->Errors->ToString()); $Error = ComposeStrings($Error, $this->year_code->Errors->ToString()); $Error = ComposeStrings($Error, $this->ListBox1->Errors->ToString()); $Error = ComposeStrings($Error, $this->p_vat_type_id->Errors->ToString()); $Error = ComposeStrings($Error, $this->vat_code->Errors->ToString()); $Error = ComposeStrings($Error, $this->code1->Errors->ToString()); $Error = ComposeStrings($Error, $this->p_finance_period_id1->Errors->ToString()); $Error = ComposeStrings($Error, $this->ListBox2->Errors->ToString()); $Error = ComposeStrings($Error, $this->tgl_penerimaan->Errors->ToString()); $Error = ComposeStrings($Error, $this->DatePicker_tgl_penerimaan->Errors->ToString()); $Error = ComposeStrings($Error, $this->tgl_penerimaan_last->Errors->ToString()); $Error = ComposeStrings($Error, $this->DatePicker_tgl_penerimaan_last->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->code->Show(); $this->p_finance_period_id->Show(); $this->p_year_period_id->Show(); $this->year_code->Show(); $this->Button_DoSearch->Show(); $this->ListBox1->Show(); $this->p_vat_type_id->Show(); $this->vat_code->Show(); $this->code1->Show(); $this->p_finance_period_id1->Show(); $this->ListBox2->Show(); $this->Button_DoSearch1->Show(); $this->tgl_penerimaan->Show(); $this->DatePicker_tgl_penerimaan->Show(); $this->tgl_penerimaan_last->Show(); $this->DatePicker_tgl_penerimaan_last->Show(); $Tpl->parse(); $Tpl->block_path = $ParentPath; }
function Open() { $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent); $this->CountSQL = "SELECT COUNT(*) FROM (select * from p_survey_question \n" . "WHERE p_survey_type_id=2) cnt"; $this->SQL = "select * from p_survey_question \n" . "WHERE p_survey_type_id=2 {SQL_OrderBy}"; $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteSelect", $this->Parent); if ($this->CountSQL) { $this->RecordsCount = CCGetDBValue(CCBuildSQL($this->CountSQL, $this->Where, ""), $this); } else { $this->RecordsCount = "CCS not counted"; } $this->query($this->OptimizeSQL(CCBuildSQL($this->SQL, $this->Where, $this->Order))); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteSelect", $this->Parent); }
function Open() { $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent); $this->CountSQL = "SELECT COUNT(*) FROM (select to_char(i,'dd') as tanggal,nvl(realisasi_harian,0) as realisasi \n" . "from (select i::date from generate_series((select start_date from p_finance_period where p_finance_period_id=" . $this->SQLValue($this->wp->GetDBValue("1"), ccsFloat) . "), \n" . " (select end_date from p_finance_period where p_finance_period_id=" . $this->SQLValue($this->wp->GetDBValue("1"), ccsFloat) . "), '1 day'::interval) i) as hari\n" . "left join \n" . "\t(select \n" . "\t\ttrunc(b.payment_date)as tanggal_bayar,\n" . "\t\tcount(b.payment_amount) as realisasi_harian \n" . "\t\tfrom t_vat_setllement a\n" . "\t\tleft join t_payment_receipt b on a.t_vat_setllement_id=b.t_vat_setllement_id\n" . "\t\twhere a.p_vat_type_dtl_id in (select p_vat_type_dtl_id from p_vat_type_dtl where p_vat_type_id=" . $this->SQLValue($this->wp->GetDBValue("2"), ccsInteger) . ")\n" . "\t\tand b.t_vat_setllement_id is not null\n" . "\t\tand b.payment_date \n" . "\t\t\tBETWEEN \n" . "\t\t\t\t(select start_date from p_finance_period where p_finance_period_id=" . $this->SQLValue($this->wp->GetDBValue("1"), ccsFloat) . ")\n" . "\t\t\tand \n" . "\t\t\t\t(select end_date from p_finance_period where p_finance_period_id=" . $this->SQLValue($this->wp->GetDBValue("1"), ccsFloat) . ")\n" . "\t\tGROUP BY tanggal_bayar\n" . "\t\tORDER BY tanggal_bayar) pembayaran\n" . "\tON pembayaran.tanggal_bayar=hari.i) cnt"; $this->SQL = "select to_char(i,'dd') as tanggal,nvl(realisasi_harian,0) as realisasi \n" . "from (select i::date from generate_series((select start_date from p_finance_period where p_finance_period_id=" . $this->SQLValue($this->wp->GetDBValue("1"), ccsFloat) . "), \n" . " (select end_date from p_finance_period where p_finance_period_id=" . $this->SQLValue($this->wp->GetDBValue("1"), ccsFloat) . "), '1 day'::interval) i) as hari\n" . "left join \n" . "\t(select \n" . "\t\ttrunc(b.payment_date)as tanggal_bayar,\n" . "\t\tcount(b.payment_amount) as realisasi_harian \n" . "\t\tfrom t_vat_setllement a\n" . "\t\tleft join t_payment_receipt b on a.t_vat_setllement_id=b.t_vat_setllement_id\n" . "\t\twhere a.p_vat_type_dtl_id in (select p_vat_type_dtl_id from p_vat_type_dtl where p_vat_type_id=" . $this->SQLValue($this->wp->GetDBValue("2"), ccsInteger) . ")\n" . "\t\tand b.t_vat_setllement_id is not null\n" . "\t\tand b.payment_date \n" . "\t\t\tBETWEEN \n" . "\t\t\t\t(select start_date from p_finance_period where p_finance_period_id=" . $this->SQLValue($this->wp->GetDBValue("1"), ccsFloat) . ")\n" . "\t\t\tand \n" . "\t\t\t\t(select end_date from p_finance_period where p_finance_period_id=" . $this->SQLValue($this->wp->GetDBValue("1"), ccsFloat) . ")\n" . "\t\tGROUP BY tanggal_bayar\n" . "\t\tORDER BY tanggal_bayar) pembayaran\n" . "\tON pembayaran.tanggal_bayar=hari.i"; $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteSelect", $this->Parent); if ($this->CountSQL) { $this->RecordsCount = CCGetDBValue(CCBuildSQL($this->CountSQL, $this->Where, ""), $this); } else { $this->RecordsCount = "CCS not counted"; } $this->query($this->OptimizeSQL(CCBuildSQL($this->SQL, $this->Where, $this->Order))); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteSelect", $this->Parent); }
function Update() { global $CCSLocales; global $DefaultDateFormat; $this->CmdExecution = true; $this->cp["block_status"] = new clsSQLParameter("ctrlblock_status", ccsText, "", "", $this->block_status->GetValue(true), "", false, $this->ErrorBlock); $this->cp["alasan"] = new clsSQLParameter("ctrlalasan", ccsText, "", "", $this->alasan->GetValue(true), "", false, $this->ErrorBlock); $this->cp["username"] = new clsSQLParameter("expr47", ccsText, "", "", CCGetUserLogin(), "", false, $this->ErrorBlock); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildUpdate", $this->Parent); if (!is_null($this->cp["block_status"]->GetValue()) and !strlen($this->cp["block_status"]->GetText()) and !is_bool($this->cp["block_status"]->GetValue())) { $this->cp["block_status"]->SetValue($this->block_status->GetValue(true)); } if (!is_null($this->cp["alasan"]->GetValue()) and !strlen($this->cp["alasan"]->GetText()) and !is_bool($this->cp["alasan"]->GetValue())) { $this->cp["alasan"]->SetValue($this->alasan->GetValue(true)); } if (!is_null($this->cp["username"]->GetValue()) and !strlen($this->cp["username"]->GetText()) and !is_bool($this->cp["username"]->GetValue())) { $this->cp["username"]->SetValue(CCGetUserLogin()); } $this->SQL = "select * from f_update_block_piutang\n" . "('" . $this->SQLValue($this->cp["block_status"]->GetDBValue(), ccsText) . "','" . $this->SQLValue($this->cp["alasan"]->GetDBValue(), ccsText) . "','" . $this->SQLValue($this->cp["username"]->GetDBValue(), ccsText) . "')"; $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteUpdate", $this->Parent); if ($this->Errors->Count() == 0 && $this->CmdExecution) { $this->query($this->SQL); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteUpdate", $this->Parent); } }
if ($Redirect) { $CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload"); header("Location: " . $Redirect); exit; } //End Go to destination page //Initialize HTML Template @1-A0111C9D $CCSEventResult = CCGetEvent($CCSEvents, "OnInitializeView"); $Tpl = new clsTemplate(); $Tpl->LoadTemplate(TemplatePath . $TemplateFileName, "main"); $CCSEventResult = CCGetEvent($CCSEvents, "BeforeShow"); //End Initialize HTML Template //Show Page @1-F9F38336 $Header->Show("Header"); $Footer->Show("Footer"); $Tpl->SetVar("GroupOptions", $groupoptions); $Tpl->SetVar("NotInGroup", $notinoptions); $Tpl->SetVar("InGroup", $inoptions); $Tpl->SetVar("selected", $selected); $Tpl->SetVar("GroupName", $name); $Tpl->SetVar("GroupDesc", $description); $Tpl->SetVar("GroupNameTitle", "<font class=\"ItechClsFormHeaderFont\">The \"" . $name . "\" Group Has Access to These Categories</font>"); $Tpl->PParse("main", false); //End Show Page //Unload Page @1-AB7622EF $CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload"); unset($Tpl); //End Unload Page ?>
function Update() { $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildUpdate"); $SQL = "UPDATE users SET " . "newsletter=" . $this->ToSQL($this->newsletter->DBValue, $this->newsletter->DataType) . " WHERE " . $this->Where; $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteUpdate"); $this->query($SQL); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteUpdate"); if ($this->Errors->Count() > 0) { $this->Errors->AddError($this->Errors->ToString()); } }
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->date_start_laporan->Errors->ToString()); $Error = ComposeStrings($Error, $this->DatePicker_date_start_laporan1->Errors->ToString()); $Error = ComposeStrings($Error, $this->date_end_laporan->Errors->ToString()); $Error = ComposeStrings($Error, $this->DatePicker_end_start_laporan1->Errors->ToString()); $Error = ComposeStrings($Error, $this->cetak_laporan->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->Button1->Show(); $this->date_start_laporan->Show(); $this->DatePicker_date_start_laporan1->Show(); $this->date_end_laporan->Show(); $this->DatePicker_end_start_laporan1->Show(); $this->cetak_laporan->Show(); $Tpl->parse(); $Tpl->block_path = $ParentPath; }
function Update() { $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildUpdate"); $SQL = "UPDATE settings_images SET " . "maxuploadwidth=" . $this->ToSQL($this->maxuploadwidth->DBValue, $this->maxuploadwidth->DataType) . ", " . "maxuploadheight=" . $this->ToSQL($this->maxuploadheight->DBValue, $this->maxuploadheight->DataType) . " WHERE " . $this->Where; $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteUpdate"); $this->query($SQL); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteUpdate"); if ($this->Errors->Count() > 0) { $this->Errors->AddError($this->Errors->ToString()); } }
function Show() { global $Tpl; global $CCSLocales; $block_path = $Tpl->block_path; if ($this->TemplateSource) { $Tpl->LoadTemplateFromStr($this->TemplateSource, $this->ComponentName, $this->TemplateEncoding); } else { $Tpl->LoadTemplate("/includes/" . $this->TemplateFileName, $this->ComponentName, $this->TemplateEncoding, "remove"); } $Tpl->block_path = $Tpl->block_path . "/" . $this->ComponentName; $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShow", $this); if (!$this->Visible) { $Tpl->block_path = $block_path; $Tpl->SetVar($this->ComponentName, ""); return ""; } $this->Attributes->Show(); $Tpl->Parse(); $Tpl->block_path = $block_path; $TplData = $Tpl->GetVar($this->ComponentName); $Tpl->SetVar($this->ComponentName, $TplData); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeOutput", $this); }
function Open() { $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent); $this->CountSQL = "SELECT COUNT(*) FROM ((SELECT t_revenue_target_id, p_year_period_id, p_vat_type_id, vat_code, year_code, target_amount, realisasi_amt\n" . "FROM v_revenue_target_vs_realisasi\n" . "WHERE p_year_period_id = " . $this->SQLValue($this->wp->GetDBValue("1"), ccsFloat) . "\n" . "and p_vat_group_id=" . $this->SQLValue($this->wp->GetDBValue("2"), ccsInteger) . "\n" . "ORDER BY p_vat_type_id)\n" . "UNION\n" . "(SELECT\n" . "\t'999',\n" . "\t" . $this->SQLValue($this->wp->GetDBValue("1"), ccsFloat) . "\n" . "\t,\n" . "\tMAX (p_vat_type_id),\n" . "\t'DENDA',\n" . "\t'',\n" . "\t0,\n" . "\tSUM (round(jml_sd_hari_ini))\n" . "FROM\n" . "\tsikp.f_rep_lap_harian_bdhr_baru (" . $this->SQLValue($this->wp->GetDBValue("1"), ccsFloat) . ")\n" . "where nomor_ayat IN('140701','140702','140703','140707')\n" . "and p_vat_group_id = " . $this->SQLValue($this->wp->GetDBValue("2"), ccsInteger) . ")) cnt"; $this->SQL = "(SELECT t_revenue_target_id, p_year_period_id, p_vat_type_id, vat_code, year_code, target_amount, realisasi_amt\n" . "FROM v_revenue_target_vs_realisasi\n" . "WHERE p_year_period_id = " . $this->SQLValue($this->wp->GetDBValue("1"), ccsFloat) . "\n" . "and p_vat_group_id=" . $this->SQLValue($this->wp->GetDBValue("2"), ccsInteger) . "\n" . "ORDER BY p_vat_type_id)\n" . "UNION\n" . "(SELECT\n" . "\t'999',\n" . "\t" . $this->SQLValue($this->wp->GetDBValue("1"), ccsFloat) . "\n" . "\t,\n" . "\tMAX (p_vat_type_id),\n" . "\t'DENDA',\n" . "\t'',\n" . "\t0,\n" . "\tSUM (round(jml_sd_hari_ini))\n" . "FROM\n" . "\tsikp.f_rep_lap_harian_bdhr_baru (" . $this->SQLValue($this->wp->GetDBValue("1"), ccsFloat) . ")\n" . "where nomor_ayat IN('140701','140702','140703','140707')\n" . "and p_vat_group_id = " . $this->SQLValue($this->wp->GetDBValue("2"), ccsInteger) . ")"; $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteSelect", $this->Parent); if ($this->CountSQL) { $this->RecordsCount = CCGetDBValue(CCBuildSQL($this->CountSQL, $this->Where, ""), $this); } else { $this->RecordsCount = "CCS not counted"; } $this->query($this->OptimizeSQL(CCBuildSQL($this->SQL, $this->Where, $this->Order))); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteSelect", $this->Parent); }
function Insert() { global $CCSLocales; global $DefaultDateFormat; $this->CmdExecution = true; $this->cp["description"] = new clsSQLParameter("ctrldescription", ccsText, "", "", $this->description->GetValue(true), "", false, $this->ErrorBlock); $this->cp["activity"] = new clsSQLParameter("ctrlactivity", ccsText, "", "", $this->activity->GetValue(true), "", false, $this->ErrorBlock); $this->cp["create_by"] = new clsSQLParameter("expr789", ccsText, "", "", CCGetUserLogin(), "", false, $this->ErrorBlock); $this->cp["update_by"] = new clsSQLParameter("expr790", ccsText, "", "", CCGetUserLogin(), "", false, $this->ErrorBlock); $this->cp["CURR_DOC_ID"] = new clsSQLParameter("ctrlCURR_DOC_ID", ccsFloat, "", "", $this->CURR_DOC_ID->GetValue(true), 0, false, $this->ErrorBlock); $this->cp["USER_ID_LOGIN"] = new clsSQLParameter("ctrlUSER_ID_LOGIN", ccsFloat, "", "", $this->USER_ID_LOGIN->GetValue(true), 0, false, $this->ErrorBlock); $this->cp["CURR_PROC_ID"] = new clsSQLParameter("ctrlCURR_PROC_ID", ccsFloat, "", "", $this->CURR_PROC_ID->GetValue(true), 0, false, $this->ErrorBlock); $this->cp["input_type"] = new clsSQLParameter("ctrlinput_type", ccsText, "", "", $this->input_type->GetValue(true), "", false, $this->ErrorBlock); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildInsert", $this->Parent); if (!is_null($this->cp["description"]->GetValue()) and !strlen($this->cp["description"]->GetText()) and !is_bool($this->cp["description"]->GetValue())) { $this->cp["description"]->SetValue($this->description->GetValue(true)); } if (!is_null($this->cp["activity"]->GetValue()) and !strlen($this->cp["activity"]->GetText()) and !is_bool($this->cp["activity"]->GetValue())) { $this->cp["activity"]->SetValue($this->activity->GetValue(true)); } if (!is_null($this->cp["create_by"]->GetValue()) and !strlen($this->cp["create_by"]->GetText()) and !is_bool($this->cp["create_by"]->GetValue())) { $this->cp["create_by"]->SetValue(CCGetUserLogin()); } if (!is_null($this->cp["update_by"]->GetValue()) and !strlen($this->cp["update_by"]->GetText()) and !is_bool($this->cp["update_by"]->GetValue())) { $this->cp["update_by"]->SetValue(CCGetUserLogin()); } if (!is_null($this->cp["CURR_DOC_ID"]->GetValue()) and !strlen($this->cp["CURR_DOC_ID"]->GetText()) and !is_bool($this->cp["CURR_DOC_ID"]->GetValue())) { $this->cp["CURR_DOC_ID"]->SetValue($this->CURR_DOC_ID->GetValue(true)); } if (!strlen($this->cp["CURR_DOC_ID"]->GetText()) and !is_bool($this->cp["CURR_DOC_ID"]->GetValue(true))) { $this->cp["CURR_DOC_ID"]->SetText(0); } if (!is_null($this->cp["USER_ID_LOGIN"]->GetValue()) and !strlen($this->cp["USER_ID_LOGIN"]->GetText()) and !is_bool($this->cp["USER_ID_LOGIN"]->GetValue())) { $this->cp["USER_ID_LOGIN"]->SetValue($this->USER_ID_LOGIN->GetValue(true)); } if (!strlen($this->cp["USER_ID_LOGIN"]->GetText()) and !is_bool($this->cp["USER_ID_LOGIN"]->GetValue(true))) { $this->cp["USER_ID_LOGIN"]->SetText(0); } if (!is_null($this->cp["CURR_PROC_ID"]->GetValue()) and !strlen($this->cp["CURR_PROC_ID"]->GetText()) and !is_bool($this->cp["CURR_PROC_ID"]->GetValue())) { $this->cp["CURR_PROC_ID"]->SetValue($this->CURR_PROC_ID->GetValue(true)); } if (!strlen($this->cp["CURR_PROC_ID"]->GetText()) and !is_bool($this->cp["CURR_PROC_ID"]->GetValue(true))) { $this->cp["CURR_PROC_ID"]->SetText(0); } if (!is_null($this->cp["input_type"]->GetValue()) and !strlen($this->cp["input_type"]->GetText()) and !is_bool($this->cp["input_type"]->GetValue())) { $this->cp["input_type"]->SetValue($this->input_type->GetValue(true)); } $this->SQL = "INSERT INTO t_order_log_kronologis(\n" . " description, \n" . " create_date, \n" . " update_date, \n" . " activity, \n" . " create_by, \n" . " update_by, \n" . " counter_no, \n" . " t_customer_order_id, \n" . " p_app_user_id, \n" . " employee_no,\n" . " log_date,\n" . " p_procedure_id,\n" . " input_type) \n" . "VALUES(\n" . " '" . $this->SQLValue($this->cp["description"]->GetDBValue(), ccsText) . "', \n" . " SYSDATE, \n" . " SYSDATE, \n" . " '" . $this->SQLValue($this->cp["activity"]->GetDBValue(), ccsText) . "', \n" . " '" . $this->SQLValue($this->cp["create_by"]->GetDBValue(), ccsText) . "', \n" . " '" . $this->SQLValue($this->cp["update_by"]->GetDBValue(), ccsText) . "', \n" . " (SELECT NVL(MAX(counter_no),0)+1 FROM t_order_log_kronologis WHERE t_customer_order_id=" . $this->SQLValue($this->cp["CURR_DOC_ID"]->GetDBValue(), ccsFloat) . "), \n" . " " . $this->SQLValue($this->cp["CURR_DOC_ID"]->GetDBValue(), ccsFloat) . ", \n" . " " . $this->SQLValue($this->cp["USER_ID_LOGIN"]->GetDBValue(), ccsFloat) . ", \n" . " null,\n" . " SYSDATE,\n" . " " . $this->SQLValue($this->cp["CURR_PROC_ID"]->GetDBValue(), ccsFloat) . ",\n" . " '" . $this->SQLValue($this->cp["input_type"]->GetDBValue(), ccsText) . "')"; $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); } }
function Open() { $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent); $this->CountSQL = "SELECT COUNT(*)\n\n" . "FROM (p_role_menu INNER JOIN p_menu ON\n\n" . "p_role_menu.p_menu_id = p_menu.p_menu_id) INNER JOIN p_role ON\n\n" . "p_role_menu.p_role_id = p_role.p_role_id"; $this->SQL = "SELECT p_role.code AS role_name, p_role_menu.*, p_menu.code AS menu_name \n\n" . "FROM (p_role_menu INNER JOIN p_menu ON\n\n" . "p_role_menu.p_menu_id = p_menu.p_menu_id) INNER JOIN p_role ON\n\n" . "p_role_menu.p_role_id = p_role.p_role_id {SQL_Where} {SQL_OrderBy}"; $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteSelect", $this->Parent); if ($this->CountSQL) { $this->RecordsCount = CCGetDBValue(CCBuildSQL($this->CountSQL, $this->Where, ""), $this); } else { $this->RecordsCount = "CCS not counted"; } $this->query($this->OptimizeSQL(CCBuildSQL($this->SQL, $this->Where, $this->Order))); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteSelect", $this->Parent); }