本文整理汇总了PHP中Xtempl::assign方法的典型用法代码示例。如果您正苦于以下问题:PHP Xtempl::assign方法的具体用法?PHP Xtempl::assign怎么用?PHP Xtempl::assign使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Xtempl
的用法示例。
在下文中一共展示了Xtempl::assign方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: RemindPasswordPage
$params["needSearchClauseObj"] = false;
$pageObject = new RemindPasswordPage($params);
$pageObject->init();
$pageObject->addCommonJs();
$pageObject->fillSetCntrlMaps();
$pageObject->body["end"] .= "<script>";
$pageObject->body['end'] .= "window.controlsMap = ".my_json_encode($pageObject->controlsHTMLMap).";";
$pageObject->body['end'] .= "window.viewControlsMap = ".my_json_encode($pageObject->viewControlsHTMLMap).";";
$pageObject->body['end'] .= "window.settings = ".my_json_encode($pageObject->jsSettings).";</script>";
$pageObject->body['end'] .= "<script language=\"JavaScript\" src=\"".GetRootPathForResources("include/runnerJS/RunnerAll.js")."\"></script>\r\n";
$pageObject->body["end"] .= "<script>".$pageObject->PrepareJS()."</script>";
$pageObject->addButtonHandlers();
$xt->assign("closewindow_attrs", 'style="display:none" id="closeWindowRemind"');
$isUseCaptcha = false;
$pageObject->isCaptchaOk = 1;
$onFly = postvalue("onFly");
if( !$onFly )
$pageObject->assignFormFooterAndHeaderBricks( true );
if($onFly == 2)
$id = 1;
$strUsernameEmail="";
$strEmail="";
$strMessage="";
if (@$_POST["btnSubmit"] == "Remind")
示例2: elseif
/////////////////////////////////////////////////////////////
if (postvalue("editType") == "inline") {
$inlineedit = EDIT_INLINE;
} elseif (postvalue("editType") == EDIT_POPUP) {
$inlineedit = EDIT_POPUP;
} else {
$inlineedit = EDIT_SIMPLE;
}
$id = postvalue("id");
if (intval($id) == 0) {
$id = 1;
}
$flyId = $id + 1;
$xt = new Xtempl();
// assign an id
$xt->assign("id", $id);
$templatefile = $inlineedit == EDIT_INLINE ? "app_modules_inline_edit.htm" : "app_modules_edit.htm";
//array of params for classes
$params = array("pageType" => PAGE_EDIT, "id" => $id);
$params['tName'] = $strTableName;
$params['xt'] =& $xt;
$params['mode'] = $inlineedit;
$params['includes_js'] = $includes_js;
$params['includes_jsreq'] = $includes_jsreq;
$params['includes_css'] = $includes_css;
$params['locale_info'] = $locale_info;
$params['templatefile'] = $templatefile;
$params['pageEditLikeInline'] = $inlineedit == EDIT_INLINE;
//Get array of tabs for edit page
$params['useTabsOnEdit'] = $gSettings->useTabsOnEdit();
if ($params['useTabsOnEdit']) {
示例3: GetInputElementId
if (count($srchFields)) {
$firstFieldParams = $srchFields[0];
} else {
$firstFieldParams['fName'] = "id";
$firstFieldParams['eType'] = '';
$firstFieldParams['value1'] = '';
$firstFieldParams['opt'] = '';
$firstFieldParams['value2'] = '';
$firstFieldParams['not'] = false;
}
// create control
$ctrlBlockArr = $searchControlBuilder->buildSearchCtrlBlockArr($id, $firstFieldParams['fName'], 0, $firstFieldParams['opt'], $firstFieldParams['not'], false, $firstFieldParams['value1'], $firstFieldParams['value2']);
if (isEnableSection508()) {
$xt->assign_section("id_label", "<label for=\"" . GetInputElementId("id", $id, PAGE_SEARCH) . "\">", "</label>");
} else {
$xt->assign("id_label", true);
}
$xt->assign("id_fieldblock", true);
$xt->assignbyref("id_editcontrol", $ctrlBlockArr['searchcontrol']);
$xt->assign("id_notbox", $ctrlBlockArr['notbox']);
// create second control, if need it
$xt->assignbyref("id_editcontrol1", $ctrlBlockArr['searchcontrol1']);
// create search type select
$xt->assign("searchtype_id", $ctrlBlockArr['searchtype']);
$isFieldNeedSecCtrl = $searchControlBuilder->isNeedSecondCtrl("id");
$ctrlInd = 0;
if ($isFieldNeedSecCtrl) {
$pageObject->controlsMap["search"]["searchBlocks"][] = array('fName' => "id", 'recId' => $id, 'ctrlsMap' => array(0 => $ctrlInd, 1 => $ctrlInd + 1));
$ctrlInd += 2;
} else {
$pageObject->controlsMap["search"]["searchBlocks"][] = array('fName' => "id", 'recId' => $id, 'ctrlsMap' => array(0 => $ctrlInd));
示例4: 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
//.........这里部分代码省略.........
示例5: postvalue
$templatefile = "app_group_modules_inline_add.htm";
} else {
$templatefile = "app_group_modules_add.htm";
}
$id = postvalue("id");
if (intval($id) == 0) {
$id = 1;
}
//If undefined session value for mastet table, but exist post value master table, than take second
//It may be happen only when use dpInline mode on page add
if (!@$_SESSION[$sessionPrefix . "_mastertable"] && postvalue("mastertable")) {
$_SESSION[$sessionPrefix . "_mastertable"] = postvalue("mastertable");
}
$xt = new Xtempl();
// assign an id
$xt->assign("id", $id);
$auditObj = GetAuditObject($strTableName);
//array of params for classes
$params = array("pageType" => PAGE_ADD, "id" => $id, "mode" => $inlineadd);
$params['xt'] =& $xt;
$params['tName'] = $strTableName;
$params['includes_js'] = $includes_js;
$params['locale_info'] = $locale_info;
$params['includes_css'] = $includes_css;
$params['useTabsOnAdd'] = $gSettings->useTabsOnAdd();
$params['templatefile'] = $templatefile;
$params['includes_jsreq'] = $includes_jsreq;
$params['pageAddLikeInline'] = $inlineadd == ADD_INLINE;
$params['needSearchClauseObj'] = false;
$params['strOriginalTableName'] = $strOriginalTableName;
if ($params['useTabsOnAdd']) {
示例6: 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 -
//.........这里部分代码省略.........
示例7: ceil
}
if ($listarray !== false) {
$rs = $listarray;
} else {
if ($numrows) {
$maxrecs = $PageSize;
$strSQL .= " limit " . $PageSize . " offset " . ($mypage - 1) * $PageSize;
}
$rs = db_query($strSQL, $conn);
}
// hide colunm headers if needed
$recordsonpage = $numrows - ($mypage - 1) * $PageSize;
if ($recordsonpage > $PageSize) {
$recordsonpage = $PageSize;
}
$xt->assign("page_number", true);
$xt->assign("maxpages", $maxpages);
$xt->assign("pageno", $mypage);
} else {
$listarray = false;
if ($eventObj->exists("ListQuery")) {
$listarray = $eventObj->ListQuery($pageObject->searchClauseObj, $arrFieldForSort, $arrHowFieldSort, $_SESSION[$strTableName . "_mastertable"], $masterKeysReq, $selected_recs, $PageSize, $mypage, $pageObject);
}
if ($listarray !== false) {
$rs = $listarray;
} else {
$rs = db_query($strSQL, $conn);
}
$recordsonpage = $numrows;
$maxpages = ceil($recordsonpage / 30);
$xt->assign("page_number", true);
示例8: Xtempl
include('include/xtempl.php');
$xt = new Xtempl();
$h_includes = "";
$b_includes = "";
$h_includes .= '
<link rel="stylesheet" href="'.GetRootPathForResources("include/css/jquery-ui.css").'" type="text/css">
<link rel="stylesheet" href="'.GetRootPathForResources("include/css/dstyle.css").'" type="text/css">
<script type="text/javascript" src="'.GetRootPathForResources("include/js/jquery.min.js").'"></script>
<script type="text/javascript" src="'.GetRootPathForResources("include/js/jquery.dimensions.pack.js").'"></script>
<script type="text/javascript" src="'.GetRootPathForResources("include/js/jquery-ui.js").'"></script>
'."\r\n";
$xt->assign("h_includes", $h_includes);
$arr_UserGroups = GetUserGroup();
$b_includes .= '<script type="text/javascript">'."\r\n";
$b_includes .= '
$(document).ready(function(){
$("#alert").dialog({
title: "Message",
draggable: false,
resizable: false,
bgiframe: true,
autoOpen: false,
modal: true,
buttons: {
Ok: function() {
$(this).dialog("close");
示例9: postvalue
$inlineview = postvalue("onFly") ? true : false;
//If show view as popUp, get parent Id
if ($inlineview) {
$parId = postvalue("parId");
} else {
$parId = 0;
}
//Set page id
if (postvalue("id")) {
$id = postvalue("id");
} else {
$id = 1;
}
//$isNeedSettings = true;//($inlineview && postvalue("isNeedSettings") == 'true') || (!$inlineview);
// assign an id
$xt->assign("id", $id);
//array of params for classes
$params = array("pageType" => PAGE_VIEW, "id" => $id, "tName" => $strTableName);
$params["xt"] =& $xt;
//Get array of tabs for edit page
$params['useTabsOnView'] = useTabsOnView($strTableName);
if ($params['useTabsOnView']) {
$params['arrViewTabs'] = GetViewTabs($strTableName);
}
$pageObject = new RunnerPage($params);
// SearchClause class stuff
$pageObject->searchClauseObj->parseRequest();
$_SESSION[$strTableName . '_advsearch'] = serialize($pageObject->searchClauseObj);
// proccess big google maps
// add button events if exist
$pageObject->addButtonHandlers();
示例10:
$b_includes = "";
$h_includes .= '
<link rel="stylesheet" href="'.GetRootPathForResources("include/css/jquery-ui.css").'" type="text/css">
<link rel="stylesheet" href="'.GetRootPathForResources("include/css/dstyle.css").'" type="text/css">
<link rel="stylesheet" href="'.GetRootPathForResources("include/fancybox/jquery.fancybox.css").'" type="text/css" media="screen">
<script type="text/javascript" src="'.GetRootPathForResources("include/js/jquery.min.js").'"></script>
<script type="text/javascript" src="'.GetRootPathForResources("include/js/jquery.dimensions.pack.js").'"></script>
<script type="text/javascript" src="'.GetRootPathForResources("include/js/jquery.easing.js").'"></script>
<script type="text/javascript" src="'.GetRootPathForResources("include/js/jquery.fancybox.pack.js").'"></script>
<script type="text/javascript" src="'.GetRootPathForResources("include/js/jquery-ui.js").'"></script>
<script type="text/javascript" src="'.GetRootPathForResources("include/js/json.js").'"></script>
'."\r\n";
$xt->assign("h_includes", $h_includes);
$_SESSION["webreport".GoodFieldName($_SESSION["webreports"]["settings"]["name"])."_search"]="";
$b_includes .= '
<script type="text/javascript">'."\r\n";
if (is_wr_db() && count($arr_tables_db)) {
$b_includes .= '
var NEXT_PAGE_URL = "'.GetTableLink("webreport1").'",
PREV_PAGE_URL = "'.GetTableLink("webreport").'";
'."\r\n";
} else {
$b_includes .= '
var NEXT_PAGE_URL = "'.GetTableLink("webreport3").'",
PREV_PAGE_URL = "'.GetTableLink("webreport").'";
示例11: 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 -
//.........这里部分代码省略.........
示例12: array
//array of params for classes
$params = array();
$params["id"] = $id;
$params["xt"] =& $xt;
$params["pageType"] = PAGE_LOGIN;
$params["tName"] = NOT_TABLE_BASED_TNAME;
$params["templatefile"] = "login.htm";
$params["needSearchClauseObj"] = false;
$pageObject = new LoginPage($params);
$pageObject->init();
$adSubmit = false;
// begin proccess captcha
$pageObject->isCaptchaOk = 1;
$useCaptcha = false;
// end proccess captcha
$xt->assign("loginlink_attrs", 'id="submitLogin' . $id . '"');
// Before Process event
if ($globalEvents->exists("BeforeProcessLogin")) {
$globalEvents->BeforeProcessLogin($pageObject);
}
$myurl = @$_SESSION["MyURL"];
// clear saved URL if not received return=true
if (postvalue("return") != "true" && @$_POST["btnSubmit"] != "Login" && !$adSubmit) {
$myurl = "";
}
unset($_SESSION["MyURL"]);
if (postvalue("a") == "logout") {
$pageObject->Logout(true);
}
$pageObject->fromFacebook = false;
$_SESSION["fromFacebook"] = false;
示例13: RunnerCipherer
//$gQuery->ReplaceFieldsWithDummies(GetBinaryFieldsIndices());
$cipherer = new RunnerCipherer($strTableName);
$strWhereClause = "";
$strHavingClause = "";
$strSearchCriteria = "and";
$selected_recs = array();
$options = "1";
header("Expires: Thu, 01 Jan 1970 00:00:01 GMT");
include 'include/xtempl.php';
include 'classes/runnerpage.php';
$xt = new Xtempl();
$id = postvalue("id") != "" ? postvalue("id") : 1;
$phpVersion = (int) substr(phpversion(), 0, 1);
if ($phpVersion > 4) {
include "include/export_functions.php";
$xt->assign("groupExcel", true);
} else {
$xt->assign("excel", true);
}
//array of params for classes
$params = array("pageType" => PAGE_EXPORT, "id" => $id, "tName" => $strTableName);
$params["xt"] =& $xt;
if (!$eventObj->exists("ListGetRowCount") && !$eventObj->exists("ListQuery")) {
$params["needSearchClauseObj"] = false;
}
$pageObject = new RunnerPage($params);
// Before Process event
if ($eventObj->exists("BeforeProcessExport")) {
$eventObj->BeforeProcessExport($conn, $pageObject);
}
if (@$_REQUEST["a"] != "") {
示例14: 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));
//.........这里部分代码省略.........
示例15: postvalue
$inlineview = postvalue("onFly") ? true : false;
//If show view as popUp, get parent Id
if ($inlineview) {
$parId = postvalue("parId");
} else {
$parId = 0;
}
//Set page id
if (postvalue("id")) {
$id = postvalue("id");
} else {
$id = 1;
}
//$isNeedSettings = true;//($inlineview && postvalue("isNeedSettings") == 'true') || (!$inlineview);
// assign an id
$xt->assign("id", $id);
//array of params for classes
$params = array("pageType" => PAGE_VIEW, "id" => $id, "tName" => $strTableName);
$params["xt"] =& $xt;
$params["all"] = $all;
//Get array of tabs for edit page
$params['useTabsOnView'] = $gSettings->useTabsOnView();
if ($params['useTabsOnView']) {
$params['arrViewTabs'] = $gSettings->getViewTabs();
}
$pageObject = new ViewPage($params);
// SearchClause class stuff
$pageObject->searchClauseObj->parseRequest();
$_SESSION[$strTableName . '_advsearch'] = serialize($pageObject->searchClauseObj);
// proccess big google maps
// add button events if exist