本文整理汇总了PHP中ProjectSettings::getSQLQuery方法的典型用法代码示例。如果您正苦于以下问题:PHP ProjectSettings::getSQLQuery方法的具体用法?PHP ProjectSettings::getSQLQuery怎么用?PHP ProjectSettings::getSQLQuery使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ProjectSettings
的用法示例。
在下文中一共展示了ProjectSettings::getSQLQuery方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ProjectSettings
/**
* Static function for create list page
* Read params from setting
* Create object of class in accordance with mode displaying page
* @param String strTableName
* @param Array options
*/
static function &createListPage($strTableName, $options)
{
global $isGroupSecurity;
$gSettings = new ProjectSettings($strTableName, $options['pageType']);
$gQuery = $gSettings->getSQLQuery();
$params = $options;
$params['tName'] = $strTableName;
$params['origTName'] = $gSettings->getOriginalTableName();
$params['gPageSize'] = $gSettings->getInitialPageSize();
$params['gOrderIndexes'] = $gSettings->getOrderIndexes();
$params['gstrOrderBy'] = $gQuery->OrderByToSql();
$params['gsqlHead'] = $gQuery->HeadToSql();
$params['gsqlFrom'] = $gQuery->FromToSql();
$params['gsqlWhereExpr'] = $gQuery->WhereToSql();
$params['gsqlGroupBy'] = $gQuery->GroupByToSql();
$params['gsqlHaving'] = $gQuery->Having()->toSql($gQuery);
$params['nSecOptions'] = $gSettings->getAdvancedSecurityType();
$params['nLoginMethod'] = GetGlobalData("nLoginMethod", 0);
$params['recsPerRowList'] = isMobile() ? 1 : $gSettings->getRecordsPerRowList();
$params['mainTableOwnerID'] = $gSettings->getTableOwnerIdField();
$params['exportTo'] = $gSettings->hasExportPage();
$params['printFriendly'] = $gSettings->hasPrintPage();
$params['deleteRecs'] = $gSettings->hasDelete();
$params["isGroupSecurity"] = $isGroupSecurity;
$params['arrKeyFields'] = $gSettings->getTableKeys();
$params["isUseInlineAdd"] = $gSettings->hasInlineAdd();
$params["isUseInlineEdit"] = $gSettings->hasInlineEdit();
$params["panelSearchFields"] = $gSettings->getPanelSearchFields();
$params['listGridLayout'] = $gSettings->getListGridLayout();
$params['createLoginPage'] = GetGlobalData("createLoginPage", false);
$params['noRecordsFirstPage'] = $gSettings->noRecordsOnFirstPage();
$params['totalsFields'] = $gSettings->getTotalsFields();
$params['listAjax'] = $gSettings->ajaxBasedListPage();
$params['arrRecsPerPage'] = $gSettings->getRecordsPerPageArray();
$params['isScrollGridBody'] = $gSettings->getScrollGridBody();
$params['viewPDF'] = $gSettings->isViewPagePDF() || $gSettings->isPrinterPagePDF();
$params['audit'] = GetAuditObject($table);
$params['listFields'] = array();
$allfields = $gSettings->getListFields();
foreach ($allfields as $f) {
if (!$gSettings->appearOnListPage($f)) {
continue;
}
$params['listFields'][] = array("fName" => $f, "goodFieldName" => GoodFieldName($f), "valueFieldName" => GoodFieldName($f) . "_value", "viewFormat" => $gSettings->getViewFormat($f), "editFormat" => $gSettings->getEditFormat($f));
}
// choose class by mode
if ($params["mode"] == LIST_SIMPLE) {
$pageObject = new ListPage_Simple($params);
} else {
if ($params["mode"] == LIST_AJAX) {
$pageObject = new ListPage_Ajax($params);
} else {
if ($params["mode"] == LIST_LOOKUP) {
$pageObject = new ListPage_Lookup($params);
} else {
if ($params["mode"] == LIST_DETAILS || $params["mode"] == LIST_DASHDETAILS) {
$pageObject = new ListPage_DPInline($params);
} else {
if ($params["mode"] == RIGHTS_PAGE) {
$pageObject = new RightsPage($params);
} else {
if ($params["mode"] == MEMBERS_PAGE) {
$pageObject = new MembersPage($params);
} else {
if ($params["mode"] == LIST_DASHBOARD) {
$pageObject = new ListPage_Dashboard($params);
}
}
}
}
}
}
}
$pageObject->init();
return $pageObject;
}
示例2: DisplayMasterTableInfo_pad_pad_kelurahan
function DisplayMasterTableInfo_pad_pad_kelurahan($params)
{
$detailtable = $params["detailtable"];
$keys = $params["keys"];
$detailPageObj = $params["detailPageObj"];
global $conn, $strTableName;
$xt = new Xtempl();
$oldTableName = $strTableName;
$strTableName = "pad.pad_kelurahan";
$settings = new ProjectSettings($strTableName, PAGE_LIST);
$cipherer = new RunnerCipherer($strTableName);
$masterQuery = $settings->getSQLQuery();
$viewControls = new ViewControlsContainer($settings, PAGE_LIST);
$where = "";
$mKeys = array();
$showKeys = "";
global $page_styles, $page_layouts, $page_layout_names, $container_styles;
$layout = new TLayout("masterlist", "RoundedGreen", "MobileGreen");
$layout->blocks["bare"] = array();
$layout->containers["0"] = array();
$layout->containers["0"][] = array("name" => "masterlistheader", "block" => "", "substyle" => 1);
$layout->skins["0"] = "empty";
$layout->blocks["bare"][] = "0";
$layout->containers["mastergrid"] = array();
$layout->containers["mastergrid"][] = array("name" => "masterlistfields", "block" => "", "substyle" => 1);
$layout->skins["mastergrid"] = "grid";
$layout->blocks["bare"][] = "mastergrid";
$page_layouts["pad_pad_kelurahan_masterlist"] = $layout;
if ($detailtable == "pad.pad_customer_usaha") {
$where .= GetFullFieldName("id", "", false) . "=" . $cipherer->MakeDBValue("id", $keys[1 - 1], "", "", true);
$showKeys .= " " . "Id" . ": " . $keys[1 - 1];
$xt->assign('showKeys', $showKeys);
}
if ($detailtable == "pad.pad_customer") {
$where .= GetFullFieldName("id", "", false) . "=" . $cipherer->MakeDBValue("id", $keys[1 - 1], "", "", true);
$showKeys .= " " . "Id" . ": " . $keys[1 - 1];
$xt->assign('showKeys', $showKeys);
}
if ($detailtable == "pad.pad_daftar") {
$where .= GetFullFieldName("id", "", false) . "=" . $cipherer->MakeDBValue("id", $keys[1 - 1], "", "", true);
$showKeys .= " " . "Id" . ": " . $keys[1 - 1];
$where .= " and ";
$showKeys .= " , ";
$where .= GetFullFieldName("id", "", false) . "=" . $cipherer->MakeDBValue("id", $keys[2 - 1], "", "", true);
$showKeys .= " " . "Id" . ": " . $keys[2 - 1];
$xt->assign('showKeys', $showKeys);
}
if (!$where) {
$strTableName = $oldTableName;
return;
}
$str = SecuritySQL("Search");
if (strlen($str)) {
$where .= " and " . $str;
}
$strWhere = whereAdd($masterQuery->WhereToSql(), $where);
if (strlen($strWhere)) {
$strWhere = " where " . $strWhere . " ";
}
$strSQL = $masterQuery->HeadToSql() . ' ' . $masterQuery->FromToSql() . $strWhere . $masterQuery->TailToSql();
// $strSQL = AddWhere($strSQL,$where);
LogInfo($strSQL);
$rs = db_query($strSQL, $conn);
$data = $cipherer->DecryptFetchedArray($rs);
if (!$data) {
$strTableName = $oldTableName;
return;
}
$keylink = "";
$keylink .= "&key1=" . htmlspecialchars(rawurlencode(@$data["id"]));
// id -
$value = "";
$xt->assign("id_mastervalue", $viewControls->showDBValue("id", $data, $keylink));
// kecamatan_id -
$value = "";
$xt->assign("kecamatan_id_mastervalue", $viewControls->showDBValue("kecamatan_id", $data, $keylink));
// kode -
$value = "";
$xt->assign("kode_mastervalue", $viewControls->showDBValue("kode", $data, $keylink));
// nama -
$value = "";
$xt->assign("nama_mastervalue", $viewControls->showDBValue("nama", $data, $keylink));
// tmt - Short Date
$value = "";
$xt->assign("tmt_mastervalue", $viewControls->showDBValue("tmt", $data, $keylink));
// enabled -
$value = "";
$xt->assign("enabled_mastervalue", $viewControls->showDBValue("enabled", $data, $keylink));
// created - Short Date
$value = "";
$xt->assign("created_mastervalue", $viewControls->showDBValue("created", $data, $keylink));
// create_uid -
$value = "";
$xt->assign("create_uid_mastervalue", $viewControls->showDBValue("create_uid", $data, $keylink));
// updated - Short Date
$value = "";
$xt->assign("updated_mastervalue", $viewControls->showDBValue("updated", $data, $keylink));
// update_uid -
$value = "";
$xt->assign("update_uid_mastervalue", $viewControls->showDBValue("update_uid", $data, $keylink));
//.........这里部分代码省略.........
示例3: DisplayMasterTableInfo_app_users
function DisplayMasterTableInfo_app_users($params)
{
$detailtable = $params["detailtable"];
$keys = $params["keys"];
global $conn, $strTableName;
$xt = new Xtempl();
$oldTableName = $strTableName;
$strTableName = "app.users";
//$strSQL = "SELECT userid, nama, created, disabled, passwd, id, kd_kantor, kd_kanwil, kd_tp, kd_kanwil_bank, kd_kppbb_bank, kd_bank_tunggal, kd_bank_persepsi, nip, jabatan, handphone, create_uid, update_uid, updated, last_login, is_login, is_logout, last_ip FROM app.users ";
$cipherer = new RunnerCipherer($strTableName);
$settings = new ProjectSettings($strTableName, PAGE_PRINT);
$masterQuery = $settings->getSQLQuery();
$viewControls = new ViewControlsContainer($settings, PAGE_PRINT);
$where = "";
global $pageObject, $page_styles, $page_layouts, $page_layout_names, $container_styles;
$layout = new TLayout("masterprint", "RoundedGreen", "MobileGreen");
$layout->blocks["bare"] = array();
$layout->containers["0"] = array();
$layout->containers["0"][] = array("name" => "masterprintheader", "block" => "", "substyle" => 1);
$layout->skins["0"] = "empty";
$layout->blocks["bare"][] = "0";
$layout->containers["mastergrid"] = array();
$layout->containers["mastergrid"][] = array("name" => "masterprintfields", "block" => "", "substyle" => 1);
$layout->skins["mastergrid"] = "grid";
$layout->blocks["bare"][] = "mastergrid";
$page_layouts["app_users_masterprint"] = $layout;
$showKeys = "";
if ($detailtable == "app.user_groups") {
$where .= GetFullFieldName("id", "", false) . "=" . $cipherer->MakeDBValue("id", $keys[1 - 1], "", "", true);
$showKeys .= " " . "Id" . ": " . $keys[1 - 1];
$xt->assign('showKeys', $showKeys);
}
if (!$where) {
$strTableName = $oldTableName;
return;
}
$str = SecuritySQL("Export");
if (strlen($str)) {
$where .= " and " . $str;
}
$strWhere = whereAdd($masterQuery->m_where->toSql($masterQuery), $where);
if (strlen($strWhere)) {
$strWhere = " where " . $strWhere . " ";
}
$strSQL = $masterQuery->HeadToSql() . ' ' . $masterQuery->FromToSql() . $strWhere . $masterQuery->TailToSql();
// $strSQL=AddWhere($strSQL,$where);
LogInfo($strSQL);
$rs = db_query($strSQL, $conn);
$data = $cipherer->DecryptFetchedArray($rs);
if (!$data) {
$strTableName = $oldTableName;
return;
}
$keylink = "";
$keylink .= "&key1=" . htmlspecialchars(rawurlencode(@$data["id"]));
// userid -
$xt->assign("userid_mastervalue", $viewControls->showDBValue("userid", $data, $keylink));
// nama -
$xt->assign("nama_mastervalue", $viewControls->showDBValue("nama", $data, $keylink));
// created - Short Date
$xt->assign("created_mastervalue", $viewControls->showDBValue("created", $data, $keylink));
// disabled -
$xt->assign("disabled_mastervalue", $viewControls->showDBValue("disabled", $data, $keylink));
// passwd -
$xt->assign("passwd_mastervalue", $viewControls->showDBValue("passwd", $data, $keylink));
// id -
$xt->assign("id_mastervalue", $viewControls->showDBValue("id", $data, $keylink));
// kd_kantor -
$xt->assign("kd_kantor_mastervalue", $viewControls->showDBValue("kd_kantor", $data, $keylink));
// kd_kanwil -
$xt->assign("kd_kanwil_mastervalue", $viewControls->showDBValue("kd_kanwil", $data, $keylink));
// kd_tp -
$xt->assign("kd_tp_mastervalue", $viewControls->showDBValue("kd_tp", $data, $keylink));
// kd_kanwil_bank -
$xt->assign("kd_kanwil_bank_mastervalue", $viewControls->showDBValue("kd_kanwil_bank", $data, $keylink));
// kd_kppbb_bank -
$xt->assign("kd_kppbb_bank_mastervalue", $viewControls->showDBValue("kd_kppbb_bank", $data, $keylink));
// kd_bank_tunggal -
$xt->assign("kd_bank_tunggal_mastervalue", $viewControls->showDBValue("kd_bank_tunggal", $data, $keylink));
// kd_bank_persepsi -
$xt->assign("kd_bank_persepsi_mastervalue", $viewControls->showDBValue("kd_bank_persepsi", $data, $keylink));
// nip -
$xt->assign("nip_mastervalue", $viewControls->showDBValue("nip", $data, $keylink));
// jabatan -
$xt->assign("jabatan_mastervalue", $viewControls->showDBValue("jabatan", $data, $keylink));
// handphone -
$xt->assign("handphone_mastervalue", $viewControls->showDBValue("handphone", $data, $keylink));
// create_uid -
$xt->assign("create_uid_mastervalue", $viewControls->showDBValue("create_uid", $data, $keylink));
// update_uid -
$xt->assign("update_uid_mastervalue", $viewControls->showDBValue("update_uid", $data, $keylink));
// updated - Short Date
$xt->assign("updated_mastervalue", $viewControls->showDBValue("updated", $data, $keylink));
// last_login - Short Date
$xt->assign("last_login_mastervalue", $viewControls->showDBValue("last_login", $data, $keylink));
// is_login -
$xt->assign("is_login_mastervalue", $viewControls->showDBValue("is_login", $data, $keylink));
// is_logout -
$xt->assign("is_logout_mastervalue", $viewControls->showDBValue("is_logout", $data, $keylink));
// last_ip -
//.........这里部分代码省略.........
示例4: strlen
} else {
$connId = $gSettings->getNotProjectLookupTableConnId($f);
$lookupConnection = strlen($connId) ? $cman->byId($connId) : $cman->getDefault();
}
$linkFieldName = $gSettings->getLinkField($f);
$displayFieldName = $gSettings->getDisplayField($f);
$linkAndDisplaySame = $displayFieldName == $linkFieldName;
$lookupOrderBy = $gSettings->getLookupOrderBy($f);
$lwDisplayField = RunnerPage::sqlFormattedDisplayField($f, $lookupConnection, $gSettings);
if ($lookupConnection->dbType == nDATABASE_MSSQLServer) {
$strUniqueOrderBy = $lookupOrderBy;
}
if ($LookupType == LT_QUERY) {
$lookupPSet = new ProjectSettings($lookupTable, $pageType);
$lookupCipherer = new RunnerCipherer($lookupTable);
$lookupQueryObj = $lookupPSet->getSQLQuery();
if ($gSettings->getCustomDisplay($f)) {
$lookupQueryObj->AddCustomExpression($displayFieldName, $lookupPSet, $strTableName, $f);
}
$lookupQueryObj->ReplaceFieldsWithDummies($lookupPSet->getBinaryFieldsIndices());
} else {
$LookupSQLTable = "SELECT ";
$lwLinkField = $lookupConnection->addFieldWrappers($gSettings->getLinkField($f));
if ($gSettings->isLookupUnique($f)) {
$LookupSQLTable .= "DISTINCT ";
}
$LookupSQLTable .= $cipherer->GetLookupFieldName($lwLinkField, $f, null, true);
if ($lookupConnection->dbType == nDATABASE_MSSQLServer) {
if ($strUniqueOrderBy && $gSettings->isLookupUnique($f)) {
$LookupSQLTable .= "," . $lookupConnection->addFieldWrappers($strUniqueOrderBy);
}
示例5: ProjectSettings
/**
* Static function for create list page
* Read params from setting
* Create object of class in accordance with mode displaying page
*/
function &createListPage($table, $options)
{
global $bSubqueriesSupported, $strTableName, $conn, $locale_info, $isGroupSecurity;
$gSettings = new ProjectSettings($strTableName, $options['pageType']);
$gQuery = $gSettings->getSQLQuery();
$params = array();
$params = $options;
$params['origTName'] = $gSettings->getOriginalTableName();
$params['sessionPrefix'] = $strTableName;
$params['tName'] = $table;
$params['conn'] =& $conn;
$params['gPageSize'] = $gSettings->getInitialPageSize();
$params['gOrderIndexes'] = $gSettings->getOrderIndexes();
$params['gstrOrderBy'] = $gQuery->OrderByToSql();
$params['gsqlHead'] = $gQuery->HeadToSql();
$params['gsqlFrom'] = $gQuery->FromToSql();
$params['gsqlWhereExpr'] = $gQuery->WhereToSql();
$params['gsqlGroupBy'] = $gQuery->GroupByToSql();
$params['gsqlHaving'] = $gQuery->Having()->toSql($gQuery);
$params['locale_info'] =& $locale_info;
$params["subQueriesSupp"] = $bSubqueriesSupported;
$params['nSecOptions'] = $gSettings->getAdvancedSecurityType();
$params['nLoginMethod'] = GetGlobalData("nLoginMethod", 0);
$params['recsPerRowList'] = $gSettings->getRecordsPerRowList();
$params['dbType'] = GetGlobalData("dbType", 0);
$params['mainTableOwnerID'] = $gSettings->getTableOwnerIdField();
$params['moveNext'] = $gSettings->useMoveNext();
$params['exportTo'] = $gSettings->hasExportPage();
$params['printFriendly'] = $gSettings->hasPrintPage();
$params['deleteRecs'] = $gSettings->hasDelete();
$params['rowHighlite'] = $gSettings->highlightRows();
$params["isGroupSecurity"] = $isGroupSecurity;
$params['arrKeyFields'] = $gSettings->getTableKeys();
$params["isUseInlineAdd"] = $gSettings->hasInlineAdd();
$params["isUseInlineEdit"] = $gSettings->hasInlineEdit();
$params["isUseInlineJs"] = $params["isUseInlineAdd"] || $params["isUseInlineEdit"];
$params["panelSearchFields"] = $gSettings->getPanelSearchFields();
$params['isVerLayout'] = $gSettings->isVerticalLayoutList();
$params['isDisplayLoading'] = $gSettings->displayLoading();
$params['createLoginPage'] = GetGlobalData("createLoginPage", false);
$params['subQueriesSupAccess'] = $gSettings->tableSupportsSubqueries();
$params['noRecordsFirstPage'] = $gSettings->noRecordsOnFirstPage();
$params['totalsFields'] = $gSettings->getTotalsFields();
$params['listIcons'] = $gSettings->iconsOnList();
$params['edit'] = $gSettings->hasEditPage();
$params['inlineEdit'] = $gSettings->hasInlineEdit();
$params['iCopy'] = $gSettings->hasCopyPage();
$params['iView'] = $gSettings->hasViewPage();
$params['listAjax'] = $gSettings->ajaxBasedListPage();
$params['arrRecsPerPage'] = $gSettings->getRecordsPerPageArray();
$params['isScrollGridBody'] = $gSettings->getScrollGridBody();
$params['audit'] = GetAuditObject($table);
$params['listFields'] = array();
$allfields = $gSettings->getListFields();
foreach ($allfields as $f) {
if (!$gSettings->appearOnListPage($f)) {
continue;
}
$params['listFields'][] = array("fName" => $f, "goodFieldName" => GoodFieldName($f), "valueFieldName" => GoodFieldName($f) . "_value", "viewFormat" => $gSettings->getViewFormat($f), "editFormat" => $gSettings->getEditFormat($f));
}
// choose class by mode
if ($params["mode"] == LIST_SIMPLE) {
$pageObject = new ListPage_Simple($params);
} else {
if ($params["mode"] == LIST_AJAX) {
$pageObject = new ListPage_Ajax($params);
} else {
if ($params["mode"] == LIST_LOOKUP) {
$pageObject = new ListPage_Lookup($params);
} else {
if ($params["mode"] == LIST_DETAILS) {
$pageObject = new ListPage_DPInline($params);
} else {
if ($params["mode"] == RIGHTS_PAGE) {
$pageObject = new RightsPage($params);
} else {
if ($params["mode"] == MEMBERS_PAGE) {
$pageObject = new MembersPage($params);
}
}
}
}
}
}
return $pageObject;
}
示例6: DisplayMasterTableInfo_pad_pad_jenis_pajak
function DisplayMasterTableInfo_pad_pad_jenis_pajak($params)
{
$detailtable = $params["detailtable"];
$keys = $params["keys"];
global $conn, $strTableName;
$xt = new Xtempl();
$oldTableName = $strTableName;
$strTableName = "pad.pad_jenis_pajak";
//$strSQL = "SELECT id, usaha_id, nama, rekening_id, rekening_kd_sub, rekdenda_id, masapajak, jatuhtempo, multiple, jalan_kelas_id, tmt, enabled, created, create_uid, updated, update_uid FROM \"pad\".pad_jenis_pajak ";
$cipherer = new RunnerCipherer($strTableName);
$settings = new ProjectSettings($strTableName, PAGE_PRINT);
$masterQuery = $settings->getSQLQuery();
$viewControls = new ViewControlsContainer($settings, PAGE_PRINT);
$where = "";
global $pageObject, $page_styles, $page_layouts, $page_layout_names, $container_styles;
$layout = new TLayout("masterprint", "RoundedGreen", "MobileGreen");
$layout->blocks["bare"] = array();
$layout->containers["0"] = array();
$layout->containers["0"][] = array("name" => "masterprintheader", "block" => "", "substyle" => 1);
$layout->skins["0"] = "empty";
$layout->blocks["bare"][] = "0";
$layout->containers["mastergrid"] = array();
$layout->containers["mastergrid"][] = array("name" => "masterprintfields", "block" => "", "substyle" => 1);
$layout->skins["mastergrid"] = "grid";
$layout->blocks["bare"][] = "mastergrid";
$page_layouts["pad_pad_jenis_pajak_masterprint"] = $layout;
$showKeys = "";
if ($detailtable == "pad.pad_spt") {
$where .= GetFullFieldName("id", "", false) . "=" . $cipherer->MakeDBValue("id", $keys[1 - 1], "", "", true);
$showKeys .= " " . "Id" . ": " . $keys[1 - 1];
$xt->assign('showKeys', $showKeys);
}
if ($detailtable == "pad.pad_tarif_pajak") {
$where .= GetFullFieldName("id", "", false) . "=" . $cipherer->MakeDBValue("id", $keys[1 - 1], "", "", true);
$showKeys .= " " . "Id" . ": " . $keys[1 - 1];
$where .= " and ";
$showKeys .= " , ";
$where .= GetFullFieldName("id", "", false) . "=" . $cipherer->MakeDBValue("id", $keys[2 - 1], "", "", true);
$showKeys .= " " . "Id" . ": " . $keys[2 - 1];
$xt->assign('showKeys', $showKeys);
}
if ($detailtable == "pad.pad_terima_line") {
$where .= GetFullFieldName("id", "", false) . "=" . $cipherer->MakeDBValue("id", $keys[1 - 1], "", "", true);
$showKeys .= " " . "Id" . ": " . $keys[1 - 1];
$xt->assign('showKeys', $showKeys);
}
if (!$where) {
$strTableName = $oldTableName;
return;
}
$str = SecuritySQL("Export");
if (strlen($str)) {
$where .= " and " . $str;
}
$strWhere = whereAdd($masterQuery->m_where->toSql($masterQuery), $where);
if (strlen($strWhere)) {
$strWhere = " where " . $strWhere . " ";
}
$strSQL = $masterQuery->HeadToSql() . ' ' . $masterQuery->FromToSql() . $strWhere . $masterQuery->TailToSql();
// $strSQL=AddWhere($strSQL,$where);
LogInfo($strSQL);
$rs = db_query($strSQL, $conn);
$data = $cipherer->DecryptFetchedArray($rs);
if (!$data) {
$strTableName = $oldTableName;
return;
}
$keylink = "";
$keylink .= "&key1=" . htmlspecialchars(rawurlencode(@$data["id"]));
// id -
$xt->assign("id_mastervalue", $viewControls->showDBValue("id", $data, $keylink));
// usaha_id -
$xt->assign("usaha_id_mastervalue", $viewControls->showDBValue("usaha_id", $data, $keylink));
// nama -
$xt->assign("nama_mastervalue", $viewControls->showDBValue("nama", $data, $keylink));
// rekening_id -
$xt->assign("rekening_id_mastervalue", $viewControls->showDBValue("rekening_id", $data, $keylink));
// rekening_kd_sub -
$xt->assign("rekening_kd_sub_mastervalue", $viewControls->showDBValue("rekening_kd_sub", $data, $keylink));
// rekdenda_id -
$xt->assign("rekdenda_id_mastervalue", $viewControls->showDBValue("rekdenda_id", $data, $keylink));
// masapajak -
$xt->assign("masapajak_mastervalue", $viewControls->showDBValue("masapajak", $data, $keylink));
// jatuhtempo -
$xt->assign("jatuhtempo_mastervalue", $viewControls->showDBValue("jatuhtempo", $data, $keylink));
// multiple -
$xt->assign("multiple_mastervalue", $viewControls->showDBValue("multiple", $data, $keylink));
// jalan_kelas_id -
$xt->assign("jalan_kelas_id_mastervalue", $viewControls->showDBValue("jalan_kelas_id", $data, $keylink));
// tmt - Short Date
$xt->assign("tmt_mastervalue", $viewControls->showDBValue("tmt", $data, $keylink));
// enabled -
$xt->assign("enabled_mastervalue", $viewControls->showDBValue("enabled", $data, $keylink));
// created - Short Date
$xt->assign("created_mastervalue", $viewControls->showDBValue("created", $data, $keylink));
// create_uid -
$xt->assign("create_uid_mastervalue", $viewControls->showDBValue("create_uid", $data, $keylink));
// updated - Short Date
$xt->assign("updated_mastervalue", $viewControls->showDBValue("updated", $data, $keylink));
// update_uid -
//.........这里部分代码省略.........
示例7: getMasterRecord
/**
* Get master record
*
* User function
* Using only in events by users
* @return{array}
* @intellisense
*/
function getMasterRecord()
{
if (!is_null($this->masterRecordData))
return $this->masterRecordData;
if(!$this->masterTable)
return null;
global $detailsTablesData, $masterTablesData;
$settings = new ProjectSettings($this->masterTable, PAGE_LIST);
$where = "";
$masterTablesInfoArr = $this->pSet->getMasterTablesArr($this->tName);
for($i=0; $i < count($masterTablesInfoArr); $i++)
{
if($this->masterTable == $masterTablesInfoArr[$i]['mDataSourceTable'])
{
$masterKeys = $this->getActiveMasterKeys();
$cipherer = new RunnerCipherer($this->masterTable);
for($j=0; $j < count($masterTablesInfoArr[$i]['masterKeys']); $j++)
{
if($j)
$where.= " and ";
$mKey = $masterTablesInfoArr[$i]['masterKeys'][$j];
$where.= $settings->getFullNameField($mKey)."=".$cipherer->MakeDBValue($mKey, $masterKeys[$j], "", "", true);
}
}
}
if(!$where)
return null;
$masterQuery = $settings->getSQLQuery();
$str = SecuritySQL("Search");
if(strlen($str))
$where.= " and ".$str;
$strWhere = whereAdd($masterQuery->WhereToSql(),$where);
if(strlen($strWhere))
$strWhere = " where ".$strWhere." ";
$strSQL = $masterQuery->HeadToSql().' '.$masterQuery->FromToSql().$strWhere.$masterQuery->TailToSql();
global $conn;
LogInfo($strSQL);
$rs = db_query($strSQL,$conn);
$this->masterRecordData = $cipherer->DecryptFetchedArray($rs);
return $this->masterRecordData;
}
示例8: DisplayMasterTableInfo_BranchMaster
function DisplayMasterTableInfo_BranchMaster($params)
{
global $cman;
$detailtable = $params["detailtable"];
$keys = $params["keys"];
$xt = new Xtempl();
$tName = "BranchMaster";
$xt->eventsObject = getEventObject($tName);
$settings = new ProjectSettings($tName, PAGE_LIST);
$cipherer = new RunnerCipherer($tName);
$connection = $cman->byTable($tName);
$masterQuery = $settings->getSQLQuery();
$viewControls = new ViewControlsContainer($settings, PAGE_LIST);
$where = "";
$keysAssoc = array();
$showKeys = "";
if ($detailtable == "Fact_SalesTransaction") {
$keysAssoc["GroupID"] = $keys[1 - 1];
$keysAssoc["CompanyID"] = $keys[2 - 1];
$where .= RunnerPage::_getFieldSQLDecrypt("GroupID", $connection, $settings, $cipherer) . "=" . $cipherer->MakeDBValue("GroupID", $keys[1 - 1], "", true);
$keyValue = $viewControls->showDBValue("GroupID", $keysAssoc);
$showKeys .= " " . GetFieldLabel("BranchMaster", "GroupID") . ": " . $keyValue;
$where .= " and ";
$showKeys .= " , ";
$where .= RunnerPage::_getFieldSQLDecrypt("CompanyID", $connection, $settings, $cipherer) . "=" . $cipherer->MakeDBValue("CompanyID", $keys[2 - 1], "", true);
$keyValue = $viewControls->showDBValue("CompanyID", $keysAssoc);
$showKeys .= " " . GetFieldLabel("BranchMaster", "CompanyID") . ": " . $keyValue;
$xt->assign('showKeys', $showKeys);
}
if (!$where) {
return;
}
$str = SecuritySQL("Search", $tName);
if (strlen($str)) {
$where .= " and " . $str;
}
$strWhere = whereAdd($masterQuery->WhereToSql(), $where);
if (strlen($strWhere)) {
$strWhere = " where " . $strWhere . " ";
}
$strSQL = $masterQuery->HeadToSql() . ' ' . $masterQuery->FromToSql() . $strWhere . $masterQuery->TailToSql();
LogInfo($strSQL);
$data = $cipherer->DecryptFetchedArray($connection->query($strSQL)->fetchAssoc());
if (!$data) {
return;
}
// reassign pagetitlelabel function adding extra params
$xt->assign_function("pagetitlelabel", "xt_pagetitlelabel", array("record" => $data, "settings" => $settings));
$keylink = "";
$xt->assign("BranchCloudFolder_mastervalue", $viewControls->showDBValue("BranchCloudFolder", $data, $keylink));
$format = $settings->getViewFormat("BranchCloudFolder");
$class = " rnr-field-text";
if ($format == FORMAT_FILE) {
$class = ' rnr-field-file';
}
if ($format == FORMAT_AUDIO) {
$class = ' rnr-field-audio';
}
if ($format == FORMAT_CHECKBOX) {
$class = ' rnr-field-checkbox';
}
if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("BranchCloudFolder"))) {
$class = ' rnr-field-number';
}
$xt->assign("BranchCloudFolder_class", $class);
// add class for field header as field value
$xt->assign("BranchLastSyncDate_mastervalue", $viewControls->showDBValue("BranchLastSyncDate", $data, $keylink));
$format = $settings->getViewFormat("BranchLastSyncDate");
$class = " rnr-field-text";
if ($format == FORMAT_FILE) {
$class = ' rnr-field-file';
}
if ($format == FORMAT_AUDIO) {
$class = ' rnr-field-audio';
}
if ($format == FORMAT_CHECKBOX) {
$class = ' rnr-field-checkbox';
}
if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("BranchLastSyncDate"))) {
$class = ' rnr-field-number';
}
$xt->assign("BranchLastSyncDate_class", $class);
// add class for field header as field value
$xt->assign("l_mastervalue", $viewControls->showDBValue("l", $data, $keylink));
$format = $settings->getViewFormat("l");
$class = " rnr-field-text";
if ($format == FORMAT_FILE) {
$class = ' rnr-field-file';
}
if ($format == FORMAT_AUDIO) {
$class = ' rnr-field-audio';
}
if ($format == FORMAT_CHECKBOX) {
$class = ' rnr-field-checkbox';
}
if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("l"))) {
$class = ' rnr-field-number';
}
$xt->assign("l_class", $class);
// add class for field header as field value
//.........这里部分代码省略.........
示例9: DisplayMasterTableInfo_pad_pad_daftar_status
function DisplayMasterTableInfo_pad_pad_daftar_status($params)
{
$detailtable = $params["detailtable"];
$keys = $params["keys"];
global $conn, $strTableName;
$xt = new Xtempl();
$oldTableName = $strTableName;
$strTableName = "pad.pad_daftar_status";
//$strSQL = "SELECT id, kode, uraian FROM \"pad\".pad_daftar_status ";
$cipherer = new RunnerCipherer($strTableName);
$settings = new ProjectSettings($strTableName, PAGE_PRINT);
$masterQuery = $settings->getSQLQuery();
$viewControls = new ViewControlsContainer($settings, PAGE_PRINT);
$where = "";
global $pageObject, $page_styles, $page_layouts, $page_layout_names, $container_styles;
$layout = new TLayout("masterprint", "RoundedGreen", "MobileGreen");
$layout->blocks["bare"] = array();
$layout->containers["0"] = array();
$layout->containers["0"][] = array("name" => "masterprintheader", "block" => "", "substyle" => 1);
$layout->skins["0"] = "empty";
$layout->blocks["bare"][] = "0";
$layout->containers["mastergrid"] = array();
$layout->containers["mastergrid"][] = array("name" => "masterprintfields", "block" => "", "substyle" => 1);
$layout->skins["mastergrid"] = "grid";
$layout->blocks["bare"][] = "mastergrid";
$page_layouts["pad_pad_daftar_status_masterprint"] = $layout;
$showKeys = "";
if ($detailtable == "pad.pad_daftar_hist") {
$where .= GetFullFieldName("id", "", false) . "=" . $cipherer->MakeDBValue("id", $keys[1 - 1], "", "", true);
$showKeys .= " " . "Id" . ": " . $keys[1 - 1];
$xt->assign('showKeys', $showKeys);
}
if (!$where) {
$strTableName = $oldTableName;
return;
}
$str = SecuritySQL("Export");
if (strlen($str)) {
$where .= " and " . $str;
}
$strWhere = whereAdd($masterQuery->m_where->toSql($masterQuery), $where);
if (strlen($strWhere)) {
$strWhere = " where " . $strWhere . " ";
}
$strSQL = $masterQuery->HeadToSql() . ' ' . $masterQuery->FromToSql() . $strWhere . $masterQuery->TailToSql();
// $strSQL=AddWhere($strSQL,$where);
LogInfo($strSQL);
$rs = db_query($strSQL, $conn);
$data = $cipherer->DecryptFetchedArray($rs);
if (!$data) {
$strTableName = $oldTableName;
return;
}
$keylink = "";
$keylink .= "&key1=" . htmlspecialchars(rawurlencode(@$data["id"]));
// id -
$xt->assign("id_mastervalue", $viewControls->showDBValue("id", $data, $keylink));
// kode -
$xt->assign("kode_mastervalue", $viewControls->showDBValue("kode", $data, $keylink));
// uraian -
$xt->assign("uraian_mastervalue", $viewControls->showDBValue("uraian", $data, $keylink));
$xt->display("pad_pad_daftar_status_masterprint.htm");
$strTableName = $oldTableName;
}
示例10: getMasterRecord
/**
* Get master record
*
* User function
* Using only in events by users
* @return{array}
* @intellisense
*/
function getMasterRecord()
{
if (!is_null($this->masterRecordData)) {
return $this->masterRecordData;
}
if (!$this->masterTable) {
return null;
}
$where = "";
$masterTablesInfoArr = $this->pSet->getMasterTablesArr($this->tName);
for ($i = 0; $i < count($masterTablesInfoArr); $i++) {
if ($this->masterTable == $masterTablesInfoArr[$i]['mDataSourceTable']) {
for ($j = 0; $j < count($masterTablesInfoArr[$i]['detailKeys']); $j++) {
$masterKeys[] = @$_SESSION[$this->sessionPrefix . "_masterkey" . ($j + 1)];
}
$cipherer = new RunnerCipherer($this->masterTable);
for ($j = 0; $j < count($masterTablesInfoArr[$i]['masterKeys']); $j++) {
if ($j) {
$where .= " and ";
}
$mKey = $masterTablesInfoArr[$i]['masterKeys'][$j];
$where .= GetFullFieldName($mKey, "", false) . "=" . $cipherer->MakeDBValue($mKey, $masterKeys[$j], "", "", true);
}
}
}
if (!$where) {
return null;
}
global $conn;
$settings = new ProjectSettings($this->masterTable, PAGE_LIST);
$masterQuery = $settings->getSQLQuery();
$str = SecuritySQL("Search");
if (strlen($str)) {
$where .= " and " . $str;
}
$strWhere = whereAdd($masterQuery->WhereToSql(), $where);
if (strlen($strWhere)) {
$strWhere = " where " . $strWhere . " ";
}
$strSQL = $masterQuery->HeadToSql() . ' ' . $masterQuery->FromToSql() . $strWhere . $masterQuery->TailToSql();
LogInfo($strSQL);
$rs = db_query($strSQL, $conn);
$this->masterRecordData = $cipherer->DecryptFetchedArray($rs);
return $this->masterRecordData;
}
示例11: DisplayMasterTableInfoForPrint_calendar_table
function DisplayMasterTableInfoForPrint_calendar_table($params)
{
global $cman;
$detailtable = $params["detailtable"];
$keys = $params["keys"];
$xt = new Xtempl();
$tName = "calendar_table";
$xt->eventsObject = getEventObject($tName);
$cipherer = new RunnerCipherer($tName);
$settings = new ProjectSettings($tName, PAGE_PRINT);
$connection = $cman->byTable($tName);
$masterQuery = $settings->getSQLQuery();
$viewControls = new ViewControlsContainer($settings, PAGE_PRINT);
$where = "";
$keysAssoc = array();
$showKeys = "";
if ($detailtable == "Fact_SalesTransaction") {
$keysAssoc["dt"] = $keys[1 - 1];
$where .= RunnerPage::_getFieldSQLDecrypt("dt", $connection, $settings, $cipherer) . "=" . $cipherer->MakeDBValue("dt", $keys[1 - 1], "", true);
$keyValue = $viewControls->showDBValue("dt", $keysAssoc);
$showKeys .= " " . GetFieldLabel("calendar_table", "dt") . ": " . $keyValue;
$xt->assign('showKeys', $showKeys);
}
if ($detailtable == "Current Year Sales") {
$keysAssoc["dt"] = $keys[1 - 1];
$where .= RunnerPage::_getFieldSQLDecrypt("dt", $connection, $settings, $cipherer) . "=" . $cipherer->MakeDBValue("dt", $keys[1 - 1], "", true);
$keyValue = $viewControls->showDBValue("dt", $keysAssoc);
$showKeys .= " " . GetFieldLabel("calendar_table", "dt") . ": " . $keyValue;
$xt->assign('showKeys', $showKeys);
}
if (!$where) {
return;
}
$str = SecuritySQL("Export", $tName);
if (strlen($str)) {
$where .= " and " . $str;
}
$strWhere = whereAdd($masterQuery->m_where->toSql($masterQuery), $where);
if (strlen($strWhere)) {
$strWhere = " where " . $strWhere . " ";
}
$strSQL = $masterQuery->HeadToSql() . ' ' . $masterQuery->FromToSql() . $strWhere . $masterQuery->TailToSql();
LogInfo($strSQL);
$data = $cipherer->DecryptFetchedArray($connection->query($strSQL)->fetchAssoc());
if (!$data) {
return;
}
// reassign pagetitlelabel function adding extra params
$xt->assign_function("pagetitlelabel", "xt_pagetitlelabel", array("record" => $data, "settings" => $settings));
$keylink = "";
$keylink .= "&key1=" . runner_htmlspecialchars(rawurlencode(@$data["dt"]));
$xt->assign("dt_mastervalue", $viewControls->showDBValue("dt", $data, $keylink));
$format = $settings->getViewFormat("dt");
$class = " rnr-field-text";
if ($format == FORMAT_FILE) {
$class = ' rnr-field-file';
}
if ($format == FORMAT_AUDIO) {
$class = ' rnr-field-audio';
}
if ($format == FORMAT_CHECKBOX) {
$class = ' rnr-field-checkbox';
}
if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("dt"))) {
$class = ' rnr-field-number';
}
$xt->assign("dt_class", $class);
// add class for field header as field value
$xt->assign("y_mastervalue", $viewControls->showDBValue("y", $data, $keylink));
$format = $settings->getViewFormat("y");
$class = " rnr-field-text";
if ($format == FORMAT_FILE) {
$class = ' rnr-field-file';
}
if ($format == FORMAT_AUDIO) {
$class = ' rnr-field-audio';
}
if ($format == FORMAT_CHECKBOX) {
$class = ' rnr-field-checkbox';
}
if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("y"))) {
$class = ' rnr-field-number';
}
$xt->assign("y_class", $class);
// add class for field header as field value
$xt->assign("q_mastervalue", $viewControls->showDBValue("q", $data, $keylink));
$format = $settings->getViewFormat("q");
$class = " rnr-field-text";
if ($format == FORMAT_FILE) {
$class = ' rnr-field-file';
}
if ($format == FORMAT_AUDIO) {
$class = ' rnr-field-audio';
}
if ($format == FORMAT_CHECKBOX) {
$class = ' rnr-field-checkbox';
}
if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("q"))) {
$class = ' rnr-field-number';
}
//.........这里部分代码省略.........
示例12: DisplayMasterTableInfo_pad_pad_spt
function DisplayMasterTableInfo_pad_pad_spt($params)
{
$detailtable = $params["detailtable"];
$keys = $params["keys"];
$detailPageObj = $params["detailPageObj"];
global $conn, $strTableName;
$xt = new Xtempl();
$oldTableName = $strTableName;
$strTableName = "pad.pad_spt";
$settings = new ProjectSettings($strTableName, PAGE_LIST);
$cipherer = new RunnerCipherer($strTableName);
$masterQuery = $settings->getSQLQuery();
$viewControls = new ViewControlsContainer($settings, PAGE_LIST);
$where = "";
$mKeys = array();
$showKeys = "";
global $page_styles, $page_layouts, $page_layout_names, $container_styles;
$layout = new TLayout("masterlist", "RoundedGreen", "MobileGreen");
$layout->blocks["bare"] = array();
$layout->containers["0"] = array();
$layout->containers["0"][] = array("name" => "masterlistheader", "block" => "", "substyle" => 1);
$layout->skins["0"] = "empty";
$layout->blocks["bare"][] = "0";
$layout->containers["mastergrid"] = array();
$layout->containers["mastergrid"][] = array("name" => "masterlistfields", "block" => "", "substyle" => 1);
$layout->skins["mastergrid"] = "grid";
$layout->blocks["bare"][] = "mastergrid";
$page_layouts["pad_pad_spt_masterlist"] = $layout;
if ($detailtable == "pad.pad_air_tanah_hit") {
$where .= GetFullFieldName("id", "", false) . "=" . $cipherer->MakeDBValue("id", $keys[1 - 1], "", "", true);
$showKeys .= " " . "Id" . ": " . $keys[1 - 1];
$xt->assign('showKeys', $showKeys);
}
if ($detailtable == "pad.pad_stpd") {
$where .= GetFullFieldName("id", "", false) . "=" . $cipherer->MakeDBValue("id", $keys[1 - 1], "", "", true);
$showKeys .= " " . "Id" . ": " . $keys[1 - 1];
$xt->assign('showKeys', $showKeys);
}
if (!$where) {
$strTableName = $oldTableName;
return;
}
$str = SecuritySQL("Search");
if (strlen($str)) {
$where .= " and " . $str;
}
$strWhere = whereAdd($masterQuery->WhereToSql(), $where);
if (strlen($strWhere)) {
$strWhere = " where " . $strWhere . " ";
}
$strSQL = $masterQuery->HeadToSql() . ' ' . $masterQuery->FromToSql() . $strWhere . $masterQuery->TailToSql();
// $strSQL = AddWhere($strSQL,$where);
LogInfo($strSQL);
$rs = db_query($strSQL, $conn);
$data = $cipherer->DecryptFetchedArray($rs);
if (!$data) {
$strTableName = $oldTableName;
return;
}
$keylink = "";
$keylink .= "&key1=" . htmlspecialchars(rawurlencode(@$data["id"]));
// id -
$value = "";
$xt->assign("id_mastervalue", $viewControls->showDBValue("id", $data, $keylink));
// tahun -
$value = "";
$xt->assign("tahun_mastervalue", $viewControls->showDBValue("tahun", $data, $keylink));
// sptno -
$value = "";
$xt->assign("sptno_mastervalue", $viewControls->showDBValue("sptno", $data, $keylink));
// customer_id -
$value = "";
$xt->assign("customer_id_mastervalue", $viewControls->showDBValue("customer_id", $data, $keylink));
// customer_usaha_id -
$value = "";
$xt->assign("customer_usaha_id_mastervalue", $viewControls->showDBValue("customer_usaha_id", $data, $keylink));
// rekening_id -
$value = "";
$xt->assign("rekening_id_mastervalue", $viewControls->showDBValue("rekening_id", $data, $keylink));
// pajak_id -
$value = "";
$xt->assign("pajak_id_mastervalue", $viewControls->showDBValue("pajak_id", $data, $keylink));
// type_id -
$value = "";
$xt->assign("type_id_mastervalue", $viewControls->showDBValue("type_id", $data, $keylink));
// so -
$value = "";
$xt->assign("so_mastervalue", $viewControls->showDBValue("so", $data, $keylink));
// masadari - Short Date
$value = "";
$xt->assign("masadari_mastervalue", $viewControls->showDBValue("masadari", $data, $keylink));
// masasd - Short Date
$value = "";
$xt->assign("masasd_mastervalue", $viewControls->showDBValue("masasd", $data, $keylink));
// jatuhtempotgl - Short Date
$value = "";
$xt->assign("jatuhtempotgl_mastervalue", $viewControls->showDBValue("jatuhtempotgl", $data, $keylink));
// r_bayarid -
$value = "";
$xt->assign("r_bayarid_mastervalue", $viewControls->showDBValue("r_bayarid", $data, $keylink));
//.........这里部分代码省略.........
示例13: DisplayMasterTableInfo_pad_pad_customer_usaha
function DisplayMasterTableInfo_pad_pad_customer_usaha($params)
{
$detailtable = $params["detailtable"];
$keys = $params["keys"];
$detailPageObj = $params["detailPageObj"];
global $conn, $strTableName;
$xt = new Xtempl();
$oldTableName = $strTableName;
$strTableName = "pad.pad_customer_usaha";
$settings = new ProjectSettings($strTableName, PAGE_LIST);
$cipherer = new RunnerCipherer($strTableName);
$masterQuery = $settings->getSQLQuery();
$viewControls = new ViewControlsContainer($settings, PAGE_LIST);
$where = "";
$mKeys = array();
$showKeys = "";
global $page_styles, $page_layouts, $page_layout_names, $container_styles;
$layout = new TLayout("masterlist", "RoundedGreen", "MobileGreen");
$layout->blocks["bare"] = array();
$layout->containers["0"] = array();
$layout->containers["0"][] = array("name" => "masterlistheader", "block" => "", "substyle" => 1);
$layout->skins["0"] = "empty";
$layout->blocks["bare"][] = "0";
$layout->containers["mastergrid"] = array();
$layout->containers["mastergrid"][] = array("name" => "masterlistfields", "block" => "", "substyle" => 1);
$layout->skins["mastergrid"] = "grid";
$layout->blocks["bare"][] = "mastergrid";
$page_layouts["pad_pad_customer_usaha_masterlist"] = $layout;
if ($detailtable == "pad.pad_spt") {
$where .= GetFullFieldName("id", "", false) . "=" . $cipherer->MakeDBValue("id", $keys[1 - 1], "", "", true);
$showKeys .= " " . "Id" . ": " . $keys[1 - 1];
$xt->assign('showKeys', $showKeys);
}
if (!$where) {
$strTableName = $oldTableName;
return;
}
$str = SecuritySQL("Search");
if (strlen($str)) {
$where .= " and " . $str;
}
$strWhere = whereAdd($masterQuery->WhereToSql(), $where);
if (strlen($strWhere)) {
$strWhere = " where " . $strWhere . " ";
}
$strSQL = $masterQuery->HeadToSql() . ' ' . $masterQuery->FromToSql() . $strWhere . $masterQuery->TailToSql();
// $strSQL = AddWhere($strSQL,$where);
LogInfo($strSQL);
$rs = db_query($strSQL, $conn);
$data = $cipherer->DecryptFetchedArray($rs);
if (!$data) {
$strTableName = $oldTableName;
return;
}
$keylink = "";
$keylink .= "&key1=" . htmlspecialchars(rawurlencode(@$data["id"]));
// id -
$value = "";
$xt->assign("id_mastervalue", $viewControls->showDBValue("id", $data, $keylink));
// konterid -
$value = "";
$xt->assign("konterid_mastervalue", $viewControls->showDBValue("konterid", $data, $keylink));
// reg_date - Short Date
$value = "";
$xt->assign("reg_date_mastervalue", $viewControls->showDBValue("reg_date", $data, $keylink));
// customer_id -
$value = "";
$xt->assign("customer_id_mastervalue", $viewControls->showDBValue("customer_id", $data, $keylink));
// usaha_id -
$value = "";
$xt->assign("usaha_id_mastervalue", $viewControls->showDBValue("usaha_id", $data, $keylink));
// so -
$value = "";
$xt->assign("so_mastervalue", $viewControls->showDBValue("so", $data, $keylink));
// kecamatan_id -
$value = "";
$xt->assign("kecamatan_id_mastervalue", $viewControls->showDBValue("kecamatan_id", $data, $keylink));
// kelurahan_id -
$value = "";
$xt->assign("kelurahan_id_mastervalue", $viewControls->showDBValue("kelurahan_id", $data, $keylink));
// notes -
$value = "";
$xt->assign("notes_mastervalue", $viewControls->showDBValue("notes", $data, $keylink));
// enabled -
$value = "";
$xt->assign("enabled_mastervalue", $viewControls->showDBValue("enabled", $data, $keylink));
// create_uid -
$value = "";
$xt->assign("create_uid_mastervalue", $viewControls->showDBValue("create_uid", $data, $keylink));
// customer_status_id -
$value = "";
$xt->assign("customer_status_id_mastervalue", $viewControls->showDBValue("customer_status_id", $data, $keylink));
// aktifnotes -
$value = "";
$xt->assign("aktifnotes_mastervalue", $viewControls->showDBValue("aktifnotes", $data, $keylink));
// tmt - Short Date
$value = "";
$xt->assign("tmt_mastervalue", $viewControls->showDBValue("tmt", $data, $keylink));
// air_zona_id -
$value = "";
//.........这里部分代码省略.........
示例14: DisplayMasterTableInfo_pad_pad_daftar
function DisplayMasterTableInfo_pad_pad_daftar($params)
{
$detailtable = $params["detailtable"];
$keys = $params["keys"];
global $conn, $strTableName;
$xt = new Xtempl();
$oldTableName = $strTableName;
$strTableName = "pad.pad_daftar";
//$strSQL = "SELECT id, rp, pb, formno, reg_date, customernm, kecamatan_id, kelurahan_id, kabupaten, alamat, kodepos, telphone, wpnama, wpalamat, wpkelurahan, wpkecamatan, wpkabupaten, wptelp, wpkodepos, pnama, palamat, pkelurahan, pkecamatan, pkabupaten, ptelp, pkodepos, ijin1, ijin1no, ijin1tgl, ijin1tglakhir, ijin2, ijin2no, ijin2tgl, ijin2tglakhir, ijin3, ijin3no, ijin3tgl, ijin3tglakhir, ijin4, ijin4no, ijin4tgl, ijin4tglakhir, enabled, create_date, create_uid, write_date, write_uid, op_nm, op_alamat, op_usaha_id, op_so, op_kecamatan_id, op_kelurahan_id, op_latitude, op_longitude, kd_restojmlmeja, kd_restojmlkursi, kd_restojmltamu, kd_filmkursi, kd_filmpertunjukan, kd_filmtarif, kd_bilyarmeja, kd_bilyartarif, kd_bilyarkegiatan, kd_diskopengunjung, kd_diskotarif, kd_waletvolume, email, op_pajak_id, npwpd, passwd FROM \"pad\".pad_daftar ";
$cipherer = new RunnerCipherer($strTableName);
$settings = new ProjectSettings($strTableName, PAGE_PRINT);
$masterQuery = $settings->getSQLQuery();
$viewControls = new ViewControlsContainer($settings, PAGE_PRINT);
$where = "";
global $pageObject, $page_styles, $page_layouts, $page_layout_names, $container_styles;
$layout = new TLayout("masterprint", "RoundedGreen", "MobileGreen");
$layout->blocks["bare"] = array();
$layout->containers["0"] = array();
$layout->containers["0"][] = array("name" => "masterprintheader", "block" => "", "substyle" => 1);
$layout->skins["0"] = "empty";
$layout->blocks["bare"][] = "0";
$layout->containers["mastergrid"] = array();
$layout->containers["mastergrid"][] = array("name" => "masterprintfields", "block" => "", "substyle" => 1);
$layout->skins["mastergrid"] = "grid";
$layout->blocks["bare"][] = "mastergrid";
$page_layouts["pad_pad_daftar_masterprint"] = $layout;
$showKeys = "";
if ($detailtable == "pad.pad_daftar_hist") {
$where .= GetFullFieldName("id", "", false) . "=" . $cipherer->MakeDBValue("id", $keys[1 - 1], "", "", true);
$showKeys .= " " . "Id" . ": " . $keys[1 - 1];
$xt->assign('showKeys', $showKeys);
}
if ($detailtable == "pad.pad_daftar_kd_det") {
$where .= GetFullFieldName("id", "", false) . "=" . $cipherer->MakeDBValue("id", $keys[1 - 1], "", "", true);
$showKeys .= " " . "Id" . ": " . $keys[1 - 1];
$xt->assign('showKeys', $showKeys);
}
if (!$where) {
$strTableName = $oldTableName;
return;
}
$str = SecuritySQL("Export");
if (strlen($str)) {
$where .= " and " . $str;
}
$strWhere = whereAdd($masterQuery->m_where->toSql($masterQuery), $where);
if (strlen($strWhere)) {
$strWhere = " where " . $strWhere . " ";
}
$strSQL = $masterQuery->HeadToSql() . ' ' . $masterQuery->FromToSql() . $strWhere . $masterQuery->TailToSql();
// $strSQL=AddWhere($strSQL,$where);
LogInfo($strSQL);
$rs = db_query($strSQL, $conn);
$data = $cipherer->DecryptFetchedArray($rs);
if (!$data) {
$strTableName = $oldTableName;
return;
}
$keylink = "";
$keylink .= "&key1=" . htmlspecialchars(rawurlencode(@$data["id"]));
// id -
$xt->assign("id_mastervalue", $viewControls->showDBValue("id", $data, $keylink));
// rp -
$xt->assign("rp_mastervalue", $viewControls->showDBValue("rp", $data, $keylink));
// pb -
$xt->assign("pb_mastervalue", $viewControls->showDBValue("pb", $data, $keylink));
// formno -
$xt->assign("formno_mastervalue", $viewControls->showDBValue("formno", $data, $keylink));
// reg_date - Short Date
$xt->assign("reg_date_mastervalue", $viewControls->showDBValue("reg_date", $data, $keylink));
// customernm -
$xt->assign("customernm_mastervalue", $viewControls->showDBValue("customernm", $data, $keylink));
// kecamatan_id -
$xt->assign("kecamatan_id_mastervalue", $viewControls->showDBValue("kecamatan_id", $data, $keylink));
// kelurahan_id -
$xt->assign("kelurahan_id_mastervalue", $viewControls->showDBValue("kelurahan_id", $data, $keylink));
// kabupaten -
$xt->assign("kabupaten_mastervalue", $viewControls->showDBValue("kabupaten", $data, $keylink));
// alamat -
$xt->assign("alamat_mastervalue", $viewControls->showDBValue("alamat", $data, $keylink));
// kodepos -
$xt->assign("kodepos_mastervalue", $viewControls->showDBValue("kodepos", $data, $keylink));
// telphone -
$xt->assign("telphone_mastervalue", $viewControls->showDBValue("telphone", $data, $keylink));
// wpnama -
$xt->assign("wpnama_mastervalue", $viewControls->showDBValue("wpnama", $data, $keylink));
// wpalamat -
$xt->assign("wpalamat_mastervalue", $viewControls->showDBValue("wpalamat", $data, $keylink));
// wpkelurahan -
$xt->assign("wpkelurahan_mastervalue", $viewControls->showDBValue("wpkelurahan", $data, $keylink));
// wpkecamatan -
$xt->assign("wpkecamatan_mastervalue", $viewControls->showDBValue("wpkecamatan", $data, $keylink));
// wpkabupaten -
$xt->assign("wpkabupaten_mastervalue", $viewControls->showDBValue("wpkabupaten", $data, $keylink));
// wptelp -
$xt->assign("wptelp_mastervalue", $viewControls->showDBValue("wptelp", $data, $keylink));
// wpkodepos -
$xt->assign("wpkodepos_mastervalue", $viewControls->showDBValue("wpkodepos", $data, $keylink));
// pnama -
$xt->assign("pnama_mastervalue", $viewControls->showDBValue("pnama", $data, $keylink));
//.........这里部分代码省略.........
示例15: DisplayMasterTableInfo_pad_pad_sspd
function DisplayMasterTableInfo_pad_pad_sspd($params)
{
$detailtable = $params["detailtable"];
$keys = $params["keys"];
global $conn, $strTableName;
$xt = new Xtempl();
$oldTableName = $strTableName;
$strTableName = "pad.pad_sspd";
//$strSQL = "SELECT id, tahun, sspdno, sspdtgl, sspdjam, invoice_id, keterangan, bulan_telat, hitung_bunga, denda, bunga, jml_bayar, sisa, jenis_bayar, printed, tp_id, is_validated, is_valid, enabled, created, create_uid, updated, update_uid, petugas_id, pejabat_id FROM \"pad\".pad_sspd ";
$cipherer = new RunnerCipherer($strTableName);
$settings = new ProjectSettings($strTableName, PAGE_PRINT);
$masterQuery = $settings->getSQLQuery();
$viewControls = new ViewControlsContainer($settings, PAGE_PRINT);
$where = "";
global $pageObject, $page_styles, $page_layouts, $page_layout_names, $container_styles;
$layout = new TLayout("masterprint", "RoundedGreen", "MobileGreen");
$layout->blocks["bare"] = array();
$layout->containers["0"] = array();
$layout->containers["0"][] = array("name" => "masterprintheader", "block" => "", "substyle" => 1);
$layout->skins["0"] = "empty";
$layout->blocks["bare"][] = "0";
$layout->containers["mastergrid"] = array();
$layout->containers["mastergrid"][] = array("name" => "masterprintfields", "block" => "", "substyle" => 1);
$layout->skins["mastergrid"] = "grid";
$layout->blocks["bare"][] = "mastergrid";
$page_layouts["pad_pad_sspd_masterprint"] = $layout;
$showKeys = "";
if ($detailtable == "public.pad_payment") {
$where .= GetFullFieldName("id", "", false) . "=" . $cipherer->MakeDBValue("id", $keys[1 - 1], "", "", true);
$showKeys .= " " . "Id" . ": " . $keys[1 - 1];
$xt->assign('showKeys', $showKeys);
}
if (!$where) {
$strTableName = $oldTableName;
return;
}
$str = SecuritySQL("Export");
if (strlen($str)) {
$where .= " and " . $str;
}
$strWhere = whereAdd($masterQuery->m_where->toSql($masterQuery), $where);
if (strlen($strWhere)) {
$strWhere = " where " . $strWhere . " ";
}
$strSQL = $masterQuery->HeadToSql() . ' ' . $masterQuery->FromToSql() . $strWhere . $masterQuery->TailToSql();
// $strSQL=AddWhere($strSQL,$where);
LogInfo($strSQL);
$rs = db_query($strSQL, $conn);
$data = $cipherer->DecryptFetchedArray($rs);
if (!$data) {
$strTableName = $oldTableName;
return;
}
$keylink = "";
$keylink .= "&key1=" . htmlspecialchars(rawurlencode(@$data["id"]));
// id -
$xt->assign("id_mastervalue", $viewControls->showDBValue("id", $data, $keylink));
// tahun -
$xt->assign("tahun_mastervalue", $viewControls->showDBValue("tahun", $data, $keylink));
// sspdno -
$xt->assign("sspdno_mastervalue", $viewControls->showDBValue("sspdno", $data, $keylink));
// sspdtgl - Short Date
$xt->assign("sspdtgl_mastervalue", $viewControls->showDBValue("sspdtgl", $data, $keylink));
// sspdjam - Time
$xt->assign("sspdjam_mastervalue", $viewControls->showDBValue("sspdjam", $data, $keylink));
// invoice_id -
$xt->assign("invoice_id_mastervalue", $viewControls->showDBValue("invoice_id", $data, $keylink));
// keterangan -
$xt->assign("keterangan_mastervalue", $viewControls->showDBValue("keterangan", $data, $keylink));
// bulan_telat -
$xt->assign("bulan_telat_mastervalue", $viewControls->showDBValue("bulan_telat", $data, $keylink));
// hitung_bunga -
$xt->assign("hitung_bunga_mastervalue", $viewControls->showDBValue("hitung_bunga", $data, $keylink));
// denda - Number
$xt->assign("denda_mastervalue", $viewControls->showDBValue("denda", $data, $keylink));
// bunga - Number
$xt->assign("bunga_mastervalue", $viewControls->showDBValue("bunga", $data, $keylink));
// jml_bayar -
$xt->assign("jml_bayar_mastervalue", $viewControls->showDBValue("jml_bayar", $data, $keylink));
// sisa - Number
$xt->assign("sisa_mastervalue", $viewControls->showDBValue("sisa", $data, $keylink));
// jenis_bayar -
$xt->assign("jenis_bayar_mastervalue", $viewControls->showDBValue("jenis_bayar", $data, $keylink));
// printed -
$xt->assign("printed_mastervalue", $viewControls->showDBValue("printed", $data, $keylink));
// tp_id -
$xt->assign("tp_id_mastervalue", $viewControls->showDBValue("tp_id", $data, $keylink));
// is_validated -
$xt->assign("is_validated_mastervalue", $viewControls->showDBValue("is_validated", $data, $keylink));
// is_valid -
$xt->assign("is_valid_mastervalue", $viewControls->showDBValue("is_valid", $data, $keylink));
// enabled -
$xt->assign("enabled_mastervalue", $viewControls->showDBValue("enabled", $data, $keylink));
// created - Short Date
$xt->assign("created_mastervalue", $viewControls->showDBValue("created", $data, $keylink));
// create_uid -
$xt->assign("create_uid_mastervalue", $viewControls->showDBValue("create_uid", $data, $keylink));
// updated - Short Date
$xt->assign("updated_mastervalue", $viewControls->showDBValue("updated", $data, $keylink));
// update_uid -
//.........这里部分代码省略.........