本文整理汇总了PHP中ProjectSettings类的典型用法代码示例。如果您正苦于以下问题:PHP ProjectSettings类的具体用法?PHP ProjectSettings怎么用?PHP ProjectSettings使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ProjectSettings类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isFieldEncrypted
function isFieldEncrypted($field, $table = ""){
$pSet = $this->pSet;
if($table == "")
$table = $this->strTableName;
if(array_key_exists($table, $this->encryptedFields) && array_key_exists($field, $this->encryptedFields[$table]))
return $this->encryptedFields[$table][$field];
if($table != $this->strTableName)
$pSet = new ProjectSettings($table);
if(!array_key_exists($table, $this->encryptedFields))
$this->encryptedFields[$table] = array();
$this->encryptedFields[$table][$field] = $pSet->isFieldEncrypted($field);
return $this->encryptedFields[$table][$field];
}
示例2: simpleSearchFieldCombo
function simpleSearchFieldCombo($fNamesArr, $selOpt)
{
$options = "";
$settings = new ProjectSettings($this->tName);
if (sizeof($settings->getGoogleLikeFields()) != 0) {
$options = '<option value="" >' . "Any field" . '</option>';
}
foreach ($fNamesArr as $fName) {
$fLabel = GetFieldLabel(GoodFieldName($this->tName), GoodFieldName($fName));
$options .= '<option value="' . $fName . '" ' . ($selOpt == $fName ? 'selected' : '') . '>' . $fLabel . '</option>';
}
return $options;
}
示例3: DashboardPage
/**
* @constructor
* @param &Array params
*/
function DashboardPage(&$params)
{
parent::RunnerPage($params);
// Set language params, if have more than one language
$this->setLangParams();
$this->jsSettings['tableSettings'][$this->tName]['dashElements'] = array();
// calculate additional element settings
foreach ($this->pSet->getDashboardElements() as $key => $elem) {
$permissions = false;
$newElem = $elem;
if ($elem['type'] == DASHBOARD_RECORD) {
// check tables (add, view, edit) permissinons befor add to js
$newElem['tabsPageTypes'] = array();
foreach ($elem['tabsPageTypes'] as $idx => $pageType) {
if ($this->CheckPermissions($elem['table'], $pageType)) {
$permissions = true;
$newElem['tabsPageTypes'][] = $pageType;
}
}
} elseif ($elem['type'] == DASHBOARD_DETAILS) {
$eset = new ProjectSettings($elem['table']);
$details = $eset->getDetailTablesArr();
// add details shortTableNames
$newElem['details'] = array();
foreach ($details as $idx => $d) {
if (in_array($d['dDataSourceTable'], $elem['notUsedDetailTables'])) {
continue;
}
if ($this->CheckPermissions($d['dDataSourceTable'], $d['dType'])) {
$permissions = true;
$newElem['details'][$idx] = $d;
$this->jsSettings['tableSettings'][$d['dDataSourceTable']]['shortTName'] = $d['dShortTable'];
}
}
} elseif ($elem['type'] == DASHBOARD_CHART || $elem['type'] == DASHBOARD_REPORT || $elem['type'] == DASHBOARD_SEARCH) {
$permissions = $this->CheckPermissions($elem['table'], "Search");
} elseif ($elem['type'] == DASHBOARD_LIST) {
$permissions = $this->CheckPermissions($elem['table'], "list");
}
$this->elementsPermissions[$key] = $permissions;
if (!$permissions) {
continue;
}
// add shortTableNames and element
$this->jsSettings['tableSettings'][$elem['table']]['shortTName'] = GetTableURL($elem['table']);
$this->jsSettings['tableSettings'][$this->tName]['dashElements'][$key] = $newElem;
}
}
示例4: LogIn
/**
* Login method
* @param String pUsername
* @param String pPassword
*/
function LogIn($pUsername, $pPassword)
{
// username and password are stored in the database
global $cUserNameFieldType, $cPasswordFieldType, $cUserNameField, $cPasswordField, $cDisplayNameField;
$logged = false;
$strUsername = (string) $pUsername;
$strPassword = (string) $pPassword;
$loginSet = ProjectSettings::getForLogin();
$cipherer = RunnerCipherer::getForLogin($loginSet);
$sUsername = $strUsername;
$sPassword = $strPassword;
if ($cipherer->isFieldEncrypted($cUserNameField)) {
$strUsername = $cipherer->MakeDBValue($cUserNameField, $strUsername, "", true);
} else {
if (NeedQuotes($cUserNameFieldType)) {
$strUsername = $this->connection->prepareString($strUsername);
} else {
$strUsername = 0 + $strUsername;
}
}
if ($cipherer->isFieldEncrypted($cPasswordField)) {
$strPassword = $cipherer->MakeDBValue($cPasswordField, $strPassword, "", true);
} else {
if (NeedQuotes($cPasswordFieldType)) {
$strPassword = $this->connection->prepareString($strPassword);
} else {
$strPassword = 0 + $strPassword;
}
}
if ($loginSet) {
if (!$this->pSet->isCaseInsensitiveUsername()) {
$where = $this->getFieldSQLDecrypt($cUserNameField) . "=" . $strUsername . " and " . $this->getFieldSQLDecrypt($cPasswordField) . "=" . $strPassword;
} else {
$where = $this->connection->upper($this->getFieldSQLDecrypt($cUserNameField)) . "=" . $this->pSet->getCaseSensitiveUsername($strUsername) . " and " . $this->getFieldSQLDecrypt($cPasswordField) . "=" . $strPassword;
}
$tempSQLQuery = $loginSet->GetTableData(".sqlquery");
$tempSQLQuery->addWhere($where);
$strSQL = $tempSQLQuery->toSql();
} else {
$strSQL = "select * from " . $this->connection->addTableWrappers("DashboardUsers") . " where " . $this->connection->addFieldWrappers($cUserNameField) . "=" . $strUsername . " and " . $this->connection->addFieldWrappers($cPasswordField) . "=" . $strPassword;
}
$data = $cipherer->DecryptFetchedArray($this->connection->query($strSQL)->fetchAssoc());
if ($data) {
if ($this->pSet->getCaseSensitiveUsername(@$data[$cUserNameField]) == $this->pSet->getCaseSensitiveUsername($sUsername) && @$data[$cPasswordField] == $sPassword) {
$logged = true;
$pDisplayUsername = $data[$cDisplayNameField] != '' ? $data[$cDisplayNameField] : $sUsername;
}
}
if ($logged && $this->isCaptchaOk) {
DoLogin(false, $pUsername, $pDisplayUsername, "", ACCESS_LEVEL_USER, $pPassword, $this);
SetAuthSessionData($pUsername, $data, $this->fromFacebook, $pPassword, $this);
return true;
}
if ($this->auditObj) {
$this->auditObj->LogLoginFailed($pUsername);
$this->auditObj->LoginUnsuccessful($pUsername);
}
return false;
}
示例5: readSelectedRecordsFromRequest
static function readSelectedRecordsFromRequest($table)
{
if (!$_REQUEST["selection"]) {
return array();
}
$selected_recs = array();
$pSet = new ProjectSettings($table);
$keyFields = $pSet->getTableKeys();
foreach (@$_REQUEST["selection"] as $keyblock) {
$arr = explode("&", refine($keyblock));
if (count($arr) < count($keyFields)) {
continue;
}
$keys = array();
foreach ($arr as $i => $value) {
$keys[$keyFields[$i]] = urldecode($value);
}
$selected_recs[] = $keys;
}
return $selected_recs;
}
示例6: redirectToList
public static function redirectToList($table)
{
$settings = new ProjectSettings($table);
if ($settings->hasListPage()) {
HeaderRedirect($settings->getShortTableName(), "list", "a=return");
exit;
}
// no List page
HeaderRedirect("menu");
exit;
}
示例7: 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 -
//.........这里部分代码省略.........
示例8: 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));
//.........这里部分代码省略.........
示例9: getControl
/**
* Create new control (if needed) for view field, and return it
* @param {string} field name
* @param {string} predefined view format
*/
public function getControl($field, $format = null)
{
// if conrol does not created previously
if(!array_key_exists($field, $this->viewControls))
{
include_once(getabspath("classes/controls/ViewControl.php"));
$vcTypes = new ViewControlTypes();
$editFormat = $this->pSet->getEditFormat($field);
if(is_null($format)){
$localPSet = $this->pSet;
$lookupPageType = "";
if(!$this->isLocal)
{
$lookupPageType = $this->pSet->getPageTypeByFieldEditFormat($field, EDIT_FORMAT_LOOKUP_WIZARD);
if($lookupPageType != "")
$localPSet = new ProjectSettings($this->pSet->_table, $lookupPageType);
}
if(!$this->isLocal
&& ($editFormat == EDIT_FORMAT_LOOKUP_WIZARD || $lookupPageType != "")
&& ($localPSet->getLookupType($field) == LT_LOOKUPTABLE || $localPSet->getLookupType($field) == LT_QUERY)
&& $localPSet->getLWLinkField($field) != $localPSet->getLWDisplayField($field))
{
$viewFormat = FORMAT_LOOKUP_WIZARD;
}else
$viewFormat = $this->pSet->getViewFormat($field);
}else
$viewFormat = $format;
if($viewFormat == FORMAT_FILE_IMAGE && $this->pSet->isCompatibilityMode($field))
$viewFormat = FORMAT_FILE_IMAGE_OLD;
$className = $vcTypes->viewTypes[$viewFormat];
if($className == "" && $viewFormat != "")
{
$className = "View".$viewFormat;
$userControl = true;
include_once(getabspath("classes/controls/ViewUserControl.php"));
}
if($className != "")
{
$this->viewControls[$field] = createViewControlClass($className, $field, $this, $this->pageObject);
}
else
$this->viewControls[$field] = new ViewControl($field, $this, $this->pageObject);
if($userControl)
{
$this->viewControls[$field]->viewFormat = $className;
$this->viewControls[$field]->init();
$this->viewControls[$field]->initUserControl();
}
}
return $this->viewControls[$field];
}
示例10: 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 -
//.........这里部分代码省略.........
示例11: array
$xt->assign("row_count", $rowcount);
if ($rowcount) {
$xt->assign("details_data", true);
$display_count = 10;
if ($mode == "inline") {
$display_count *= 2;
}
if ($rowcount > $display_count + 2) {
$xt->assign("display_first", true);
$xt->assign("display_count", $display_count);
} else {
$display_count = $rowcount;
}
$rowinfo = array();
require_once getabspath('classes/controls/ViewControlsContainer.php');
$pSet = new ProjectSettings($strTableName, PAGE_LIST);
$viewContainer = new ViewControlsContainer($pSet, PAGE_LIST);
$viewContainer->isDetailsPreview = true;
$b = true;
$qResult = $pageObject->connection->query($strSQL);
$data = $cipherer->DecryptFetchedArray($qResult->fetchAssoc());
while ($data && $recordsCounter < $display_count) {
$recordsCounter++;
$row = array();
$keylink = "";
$keylink .= "&key1=" . runner_htmlspecialchars(rawurlencode(@$data["Groupid"]));
// Groupid -
$viewContainer->recId = $recordsCounter;
$value = $viewContainer->showDBValue("Groupid", $data, $keylink);
$row["Groupid_value"] = $value;
$format = $pSet->getViewFormat("Groupid");
示例12: 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 -
//.........这里部分代码省略.........
示例13: Label
function Label($field, $table = "")
{
global $pageObject;
if ($table != "" || !isset($pageObject)) {
if ($table == "") {
global $strTableName;
$table = $strTableName;
}
$newSet = new ProjectSettings($table);
$result = $newSet->label($field);
} else {
$result = $pageObject->pSet->label($field);
}
return $result != "" ? $result : $field;
}
示例14: getDashTableData
function getDashTableData($field, $key)
{
$dashSearchFields = $this->getDashboardSearchFields();
$tableSettings = new ProjectSettings($dashSearchFields[$field][0]["table"], $this->_editPage);
return $tableSettings->getTableData($key);
}
示例15: GetType
function GetType()
{
$pSet = new ProjectSettings($this->m_strTable);
return $pSet->getFieldType($this->m_strName);
}