本文整理汇总了PHP中GetGlobalData函数的典型用法代码示例。如果您正苦于以下问题:PHP GetGlobalData函数的具体用法?PHP GetGlobalData怎么用?PHP GetGlobalData使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetGlobalData函数的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: GetTableData
/**
* 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;
$gQuery = GetTableData($table, ".sqlquery", null);
$params = array();
$params = $options;
$params['origTName'] = GetTableData($table, ".OriginalTable", '');
$params['sessionPrefix'] = $strTableName;
$params['tName'] = $table;
$params['conn'] =& $conn;
$params['gPageSize'] = GetTableData($table, ".pageSize", 0);
$params['gOrderIndexes'] = GetTableData($table, ".orderindexes", array());
$params['gstrOrderBy'] = GetTableData($table, ".strOrderBy", '');
$params['gsqlHead'] = GetTableData($table, ".sqlHead", '');
$params['gsqlFrom'] = GetTableData($table, ".sqlFrom", '');
$params['gsqlWhereExpr'] = GetTableData($table, ".sqlWhereExpr", '');
$params['gsqlGroupBy'] = $gQuery->GroupByToSql();
$oHaving = $gQuery->Having();
$params['gsqlHaving'] = $oHaving->toSql($gQuery);
$params['locale_info'] =& $locale_info;
$params["subQueriesSupp"] = $bSubqueriesSupported;
$params['nSecOptions'] = GetTableData($table, ".nSecOptions", 0);
$params['nLoginMethod'] = GetGlobalData("nLoginMethod", 0);
$params['recsPerRowList'] = GetTableData($table, ".recsPerRowList", 0);
$params['tableGroupBy'] = GetTableData($table, ".tableGroupBy", '');
$params['dbType'] = GetGlobalData("dbType", 0);
$params['mainTableOwnerID'] = GetTableData($table, ".mainTableOwnerID", '');
$params['moveNext'] = GetTableData($table, ".moveNext", 0);
$params['exportTo'] = GetTableData($table, ".exportTo", false);
$params['printFriendly'] = GetTableData($table, ".printFriendly", false);
$params['deleteRecs'] = GetTableData($table, ".delete", false);
$params['rowHighlite'] = GetTableData($table, ".rowHighlite", false);
$params["delFile"] = GetGlobalData("delFile", false);
$params["isGroupSecurity"] = $isGroupSecurity;
$params['arrKeyFields'] = GetTableData($table, ".arrKeyFields", array());
$params["useIbox"] = GetTableData($table, ".useIbox", false);
$params["isUseInlineAdd"] = GetTableData($table, ".isUseInlineAdd", false);
$params["isUseInlineEdit"] = GetTableData($table, ".isUseInlineEdit", false);
$params["isUseInlineJs"] = $params["isUseInlineAdd"] || $params["isUseInlineEdit"];
$params["globSearchFields"] = GetTableData($table, ".globSearchFields", array());
$params["panelSearchFields"] = GetTableData($table, ".panelSearchFields", array());
$params['isVerLayout'] = GetTableData($table, ".isVerLayout", false);
$params['isDisplayLoading'] = GetTableData($table, ".isDisplayLoading", false);
$params['createLoginPage'] = GetGlobalData("createLoginPage", false);
$params['subQueriesSupAccess'] = GetTableData($table, ".subQueriesSupAccess", false);
$params['noRecordsFirstPage'] = GetTableData($table, ".noRecordsFirstPage", false);
$params['totalsFields'] = GetTableData($table, ".totalsFields", array());
$params['listIcons'] = GetTableData($table, ".listIcons", false);
$params['edit'] = GetTableData($table, ".edit", false);
$params['inlineEdit'] = GetTableData($table, ".inlineEdit", false);
$params['iCopy'] = GetTableData($table, ".copy", false);
$params['iView'] = GetTableData($table, ".view", false);
$params['listAjax'] = GetTableData($table, ".listAjax", false);
$params['arrRecsPerPage'] = GetTableData($table, ".arrRecsPerPage", array());
$params['audit'] = GetAuditObject($table);
$params['listFields'] = array();
$allfields = GetFieldsList($table);
foreach ($allfields as $f) {
if (!AppearOnListPage($f, $table)) {
continue;
}
$params['listFields'][] = array("fName" => $f, "goodFieldName" => GoodFieldName($f), "valueFieldName" => GoodFieldName($f) . "_value", "viewFormat" => GetFieldData($table, $f, "ViewFormat", ""), "editFormat" => GetFieldData($table, $f, "EditFormat", ""));
}
// 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;
}
示例3: RunnerPage
function RunnerPage(&$params)
{
global $locale_info, $cCharset, $menuTables, $page_layouts;
// copy properties to object
RunnerApply($this, $params);
$this->googleMapCfg = array('markerAsLinkToView' => true, 'isUseMainMaps' => false, 'isUseFieldsMaps' => false, 'isUseGoogleMap' => false, 'APIcode' => GetGlobalData("apiGoogleMapsCode", ""), 'mainMapIds' => array(), 'fieldMapsIds' => array(), 'mapsData' => array());
$this->debugJSMode = false;
if ($this->flyId < $this->id + 1) {
$this->flyId = $this->id + 1;
}
// get permissions
if ($this->tName) {
$this->permis[$this->tName] = $this->getPermissions();
$this->eventsObject =& getEventObject($this->tName);
}
$this->menuTables = $menuTables;
// get perm for menu tables
for ($i = 0; $i < count($this->menuTables); $i++) {
$this->permis[$this->menuTables[$i]["tName"]] = $this->getPermissions($this->menuTables[$i]["tName"]);
}
if (!$this->sessionPrefix) {
$this->sessionPrefix = $this->tName;
}
$this->setSessionVariables();
// get locking object
$this->lockingObj = GetLockingObject($this->tName);
$this->is508 = isEnableSection508();
// get details keys by master table
$this->detailKeysByM = GetDetailKeysByMasterTable($this->masterTable, $this->tName);
$this->isDynamicPerm = GetGlobalData("isDynamicPerm", false);
$this->isAddWebRep = GetGlobalData("isAddWebRep", false);
$this->allDetailsTablesArr = GetDetailTablesArr($this->tName);
$this->strCaption = GetTableCaption(GoodFieldName($this->tName));
$this->isTableType = GetTableData($this->tName, ".isTableType", "");
$this->isUseVideo = GetTableData($this->tName, ".isUseVideo", false);
$this->isUseAudio = GetTableData($this->tName, ".isUseAudio", false);
$this->showAddInPopup = GetTableData($this->tName, ".showAddInPopup", false);
$this->showEditInPopup = GetTableData($this->tName, ".showEditInPopup", false);
$this->showViewInPopup = GetTableData($this->tName, ".showViewInPopup", false);
$this->isResizeColumns = GetTableData($this->tName, ".isResizeColumns", false);
$this->isUseAjaxSuggest = GetTableData($this->tName, ".isUseAjaxSuggest", false);
$this->useDetailsPreview = GetTableData($this->tName, ".useDetailsPreview", false);
$this->isShowDetailTables = displayDetailsOn($this->tName, $this->pageType);
$this->shortTableName = GetTableData($this->tName, ".shortTableName", '');
//init jsSettings
$this->jsSettings["tableSettings"][$this->tName] = array();
$this->jsSettings["tableSettings"][$this->tName]['fieldSettings'] = array();
$this->settingsMap["globalSettings"] = array();
$this->settingsMap["globalSettings"]["ext"] = "php";
$this->settingsMap["globalSettings"]["charSet"] = $cCharset;
$this->settingsMap["globalSettings"]["debugMode"] = $this->debugJSMode;
$this->settingsMap["globalSettings"]["googleMapsApiCode"] = $this->googleMapCfg['APIcode'];
$this->settingsMap["globalSettings"]["shortTNames"][$this->tName] = $this->shortTableName;
//isMobile
$this->settingsMap["globalSettings"]["isMobile"] = isMobile();
// s508 must be in global settings
$this->settingsMap['globalSettings']['s508'] = $this->is508;
$this->settingsMap["globalSettings"]["locale"]["dateFormat"] = $locale_info["LOCALE_IDATE"];
$this->settingsMap["globalSettings"]["locale"]["startWeekDay"] = $locale_info["LOCALE_IFIRSTDAYOFWEEK"];
$this->settingsMap["globalSettings"]["locale"]["dateDelimiter"] = $locale_info["LOCALE_SDATE"];
$this->settingsMap["tableSettings"] = array();
$this->settingsMap["tableSettings"]["isUseToolTips"] = array("default" => false, "jsName" => "isUseToolTips");
$this->settingsMap["tableSettings"]["useIbox"] = array("default" => false, "jsName" => "isUseIbox");
$this->settingsMap["tableSettings"]["listIcons"] = array("default" => false, "jsName" => "listIcons");
$this->settingsMap["tableSettings"]["strCaption"] = array("default" => "", "jsName" => "strCaption");
$this->settingsMap["tableSettings"]["isUseAudio"] = array("default" => false, "jsName" => "isUseAudio");
$this->settingsMap["tableSettings"]["isUseVideo"] = array("default" => false, "jsName" => "isUseVideo");
$this->settingsMap["tableSettings"]["rowHighlite"] = array("default" => false, "jsName" => "isUseHighlite");
$this->settingsMap["tableSettings"]["showAddInPopup"] = array("default" => false, "jsName" => "showAddInPopup");
$this->settingsMap["tableSettings"]["showEditInPopup"] = array("default" => false, "jsName" => "showEditInPopup");
$this->settingsMap["tableSettings"]["showViewInPopup"] = array("default" => false, "jsName" => "showViewInPopup");
$this->settingsMap["tableSettings"]["isResizeColumns"] = array("default" => false, "jsName" => "isUseResize");
$this->settingsMap["tableSettings"]["isUseAjaxSuggest"] = array("default" => true, "jsName" => "ajaxSuggest");
$this->settingsMap["tableSettings"]["useDetailsPreview"] = array("default" => false, "jsName" => "isUseDP");
$this->settingsMap['tableSettings']['isUsebuttonHandlers'] = array("default" => false, "jsName" => "isUseButtons");
$this->settingsMap['tableSettings']['isVerLayout'] = array("default" => false, "jsName" => "isVertLayout");
$this->settingsMap['tableSettings']['recsPerRowList'] = array("default" => 1, "jsName" => "recsPerRowList");
$this->settingsMap['tableSettings']['hasEvents'] = array("default" => false, "jsName" => "hasEvents");
$layout = GetPageLayout($this->shortTableName, $this->pageType);
if ($layout) {
$rtl = $this->xt->getReadingOrder() == 'RTL' ? 'RTL' : '';
$this->jsSettings['tableSettings'][$this->tName]['pageCSS'] = "styles/" . $layout->style . '/style' . $rtl;
$this->jsSettings['tableSettings'][$this->tName]['pageLayout'] = "pagestyles/" . $layout->name . $rtl;
$this->jsSettings['tableSettings'][$this->tName]['pageSkinStyle'] = $layout->style . " page-" . $layout->name;
}
$this->settingsMap["fieldSettings"]["UseTimestamp"] = array("default" => false, "jsName" => "isUseTimeStamp");
$this->settingsMap["fieldSettings"]["strName"] = array("default" => "", "jsName" => "strName");
$this->settingsMap["fieldSettings"]["ShowTime"] = array("default" => false, "jsName" => "showTime");
$this->settingsMap["fieldSettings"]["EditFormat"] = array("default" => "", "jsName" => "editFormat");
$this->settingsMap["fieldSettings"]["DateEditType"] = array("default" => EDIT_DATE_SIMPLE, "jsName" => "dateEditType");
$this->settingsMap["fieldSettings"]["RTEType"] = array("default" => "", "jsName" => "RTEType");
$this->settingsMap["fieldSettings"]["ViewFormat"] = array("default" => "", "jsName" => "viewFormat");
$this->settingsMap["fieldSettings"]["validateAs"] = array("default" => null, "jsName" => "validation");
$this->settingsMap["fieldSettings"]["LastYearFactor"] = array("default" => 10, "jsName" => "lastYear");
$this->settingsMap["fieldSettings"]["InitialYearFactor"] = array("default" => 100, "jsName" => "initialYear");
$this->jsSettings["tableSettings"][$this->tName]["strCaption"] = $this->strCaption;
$this->jsSettings["tableSettings"][$this->tName]["pageMode"] = $this->mode;
if ($this->listAjax) {
$this->jsSettings['tableSettings'][$this->tName]['pageMode'] = LIST_AJAX;
}
//.........这里部分代码省略.........
示例4: initLookupParams
function initLookupParams()
{
global $cman;
$this->parId = postvalue("parId");
$this->firstTime = postvalue("firsttime");
$this->mainField = postvalue("field");
$this->lookupControl = postvalue("control");
$this->lookupCategory = postvalue("category");
$this->mainTable = postvalue("table");
// convert into an array as parent ctrl can have multiple values
if (!is_array($this->lookupCategory)) {
$this->lookupCategory = strlen($this->lookupCategory) != 0 ? splitvalues($this->lookupCategory) : array();
}
$arrCategory = array();
foreach ($this->lookupCategory as $categValue) {
$arrCategory[] = "category[]=" . $categValue;
}
$lookCategory = implode("&", $arrCategory);
if ($lookCategory) {
$lookCategory = "&" . $lookCategory;
}
$this->lookupParams = "mode=lookup&id=" . $this->id . "&parId=" . $this->parId . "&field=" . rawurlencode($this->mainField) . "&control=" . rawurlencode($this->lookupControl) . $lookCategory . "&table=" . rawurlencode($this->mainTable) . "&editMode=" . postvalue('editMode');
$pageType = postvalue("pageType");
if ($pageType != PAGE_ADD && $pageType != PAGE_EDIT) {
$pageType = PAGE_SEARCH;
}
$this->mainPSet = new ProjectSettings($this->mainTable, $pageType);
$this->linkField = $this->mainPSet->getLinkField($this->mainField);
$this->dispField = $this->mainPSet->getDisplayField($this->mainField);
if ($this->mainPSet->getCustomDisplay($this->mainField)) {
$this->dispFieldAlias = GetGlobalData("dispFieldAlias", "rrdf1");
$this->pSet->getSQLQuery()->AddCustomExpression($this->mainPSet->getDisplayField($this->mainField), $this->pSet, $this->mainTable, $this->mainField, $this->dispFieldAlias);
$this->customField = $this->linkField;
}
$this->outputFieldValue($this->linkField, 2);
$this->outputFieldValue($this->dispField, 2);
if ($this->mainPSet->useCategory($this->mainField)) {
$this->categoryField = $this->mainPSet->getCategoryFilter($this->mainField);
}
$this->strLookupWhere = GetLWWhere($this->mainField, $pageType, $this->mainTable);
if ($this->dispFieldAlias && $this->pSet->appearOnListPage($this->dispField)) {
$this->lookupSelectField = $this->dispField;
} elseif ($this->pSet->appearOnListPage($this->dispField)) {
$this->lookupSelectField = $this->dispField;
} else {
$this->lookupSelectField = $this->listFields[0]['fName'];
}
if (!$this->categoryField) {
$this->lookupCategory = array();
}
$orderByField = $this->mainPSet->getLookupOrderBy($this->mainField);
if (strlen($orderByField)) {
// adjust the ORDER BY clause according to the main lookup settings
$this->gstrOrderBy = " ORDER BY " . $this->connection->addTableWrappers($this->tName) . "." . $this->connection->addFieldWrappers($orderByField);
if ($this->mainPSet->isLookupDesc($this->mainField)) {
$this->gstrOrderBy .= ' DESC';
}
}
}
示例5: getNextPrevRecordKeys
//.........这里部分代码省略.........
} else {
$nextExpr = "";
$prevExpr = "";
// current field value is null
if ($asc) {
$nextExpr = $fullName . " IS NOT NULL";
} else {
$prevExpr = $fullName . " IS NOT NULL";
}
if ($i < count($orderClause->fieldsList) - 1) {
if ($nextExpr != "") {
$nextExpr .= " or ";
}
$nextExpr .= $fullName . " IS NULL";
if ($prevExpr != "") {
$prevExpr .= " or ";
}
$prevExpr .= $fullName . " IS NULL";
}
}
if ($nextExpr == "") {
$nextExpr = " 1=0 ";
}
if ($prevExpr == "") {
$prevExpr = " 1=0 ";
}
// append expression to where clause
if ($i > 0) {
$where_next .= " AND ";
$where_prev .= " AND ";
}
$where_next .= "(" . $nextExpr;
$where_prev .= "(" . $prevExpr;
$tail .= ")";
}
$where_next = $where_next . $tail;
$where_prev = $where_prev . $tail;
if ($where_next == "" or $order_next == "" or $where_prev == "" or $order_prev == "") {
$_SESSION[$this->sessionPrefix . "_noNextPrev"] = 1;
return;
}
// make the resulting query
if ($query === null) {
return;
}
if (!$query->HasGroupBy()) {
$oWhere = $query->Where();
$where = whereAdd($where, $oWhere->toSql($query));
$where_next = whereAdd($where_next, $where);
$where_prev = whereAdd($where_prev, $where);
$query->ReplaceFieldsWithDummies($this->pSet->getBinaryFieldsIndices());
$sql_next = $query->toSql($where_next, $order_next);
$sql_prev = $query->toSql($where_prev, $order_prev);
} else {
$oWhere = $query->Where();
$oHaving = $query->Having();
$where = whereAdd($where, $oWhere->toSql($query));
$having = whereAdd($having, $oHaving->toSql($query));
$query->ReplaceFieldsWithDummies($this->pSet->getBinaryFieldsIndices());
$sql = "select * from (" . $query->toSql($where, "", $having) . ") prevnextquery";
$sql_next = $sql . " WHERE " . $where_next . $order_next;
$sql_prev = $sql . " WHERE " . $where_prev . $order_prev;
}
if (GetGlobalData("returnToActualListPage", false)) {
if ($prevExpr == " 1=0 ") {
$_SESSION[$this->sessionPrefix . "_pagenumber"] = 1;
} else {
$pageSQL = "select count(*) from (" . $sql_prev . ") tcount";
$pageRes = db_query($pageSQL, $conn);
$pageRow = db_fetch_numarray($pageRes);
$currentRow = $pageRow[0];
if ($this->pageSize > 0) {
$pageSize = $this->pageSize;
} else {
$pageSize = $this->pSet->getInitialPageSize();
}
$this->myPage = floor($currentRow / $pageSize) + 1;
$_SESSION[$this->sessionPrefix . "_pagenumber"] = $this->myPage;
}
}
// add record count options
$sql_next .= " limit 1";
$sql_prev .= " limit 1";
$res_next = db_query($sql_next, $conn);
if ($res_next) {
if ($row_next = $this->cipherer->DecryptFetchedArray($res_next)) {
foreach ($tKeys as $i => $k) {
$next[$i] = $row_next[$k];
}
}
db_closequery($res_next);
}
$res_prev = db_query($sql_prev, $conn);
if ($row_prev = $this->cipherer->DecryptFetchedArray($res_prev)) {
foreach ($tKeys as $i => $k) {
$prev[$i] = $row_prev[$k];
}
}
db_closequery($res_prev);
}
示例6: preparePdfControls
protected function preparePdfControls()
{
if (!$this->viewPdfEnabled) {
return;
}
if ($this->pdfMode) {
return;
}
if (!GetGlobalData("openPDFFileDirectly", true)) {
$this->AddJSFile("include/pdf.js");
} else {
$this->AddJSFile("include/pdfinitlink.js");
}
if ($this->mode == VIEW_SIMPLE) {
$this->xt->assign("pdflink_block", true);
}
}
示例7: RunnerCipherer
function RunnerCipherer($strTableName, $pSet = null){
$this->key = GetGlobalData("encryptionKey", 'emptykey');
$this->strTableName = $strTableName;
if($pSet != null)
$this->pSet = $pSet;
else
$this->pSet = new ProjectSettings($strTableName);
}
示例8: RegisterPage
function RegisterPage(&$params = "")
{
parent::RunnerPage($params);
// fill global password settings
$this->pwdStrong = GetGlobalData("pwdStrong", false);
if ($this->pwdStrong) {
$this->settingsMap["globalSettings"]["pwdLen"] = GetGlobalData("pwdLen", 0);
$this->settingsMap["globalSettings"]["pwdUnique"] = GetGlobalData("pwdUnique", 0);
$this->settingsMap["globalSettings"]["pwdDigits"] = GetGlobalData("pwdDigits", 0);
$this->settingsMap["globalSettings"]["pwdStrong"] = true;
$this->settingsMap["globalSettings"]["pwdUpperLower"] = GetGlobalData("pwdUpperLower", false);
}
$this->formBricks["header"] = "regheader";
$this->formBricks["footer"] = "regbuttons";
$this->assignFormFooterAndHeaderBricks(true);
}
示例9: ChangePasswordPage
function ChangePasswordPage(&$params = "")
{
parent::RunnerPage($params);
$this->pSet = new ProjectSettings("DashboardUsers", $this->pageType);
$this->pSetEdit = $this->pSet;
// fill global password settings
$this->pwdStrong = GetGlobalData("pwdStrong", false);
if ($this->pwdStrong) {
$this->settingsMap["globalSettings"]["pwdLen"] = GetGlobalData("pwdLen", 0);
$this->settingsMap["globalSettings"]["pwdUnique"] = GetGlobalData("pwdUnique", 0);
$this->settingsMap["globalSettings"]["pwdDigits"] = GetGlobalData("pwdDigits", 0);
$this->settingsMap["globalSettings"]["pwdStrong"] = true;
$this->settingsMap["globalSettings"]["pwdUpperLower"] = GetGlobalData("pwdUpperLower", false);
}
$this->formBricks["header"] = "changeheader";
$this->formBricks["footer"] = "changebuttons";
$this->assignFormFooterAndHeaderBricks(true);
}
示例10: isSingleSign
function isSingleSign()
{
if (GetGlobalData("ADSingleSign", 0) && $_SERVER["REMOTE_USER"]) {
return false;
}
return true;
}
示例11: getCookieName
function getCookieName()
{
return "fbsr_" . GetGlobalData("FBappId", "");
}
示例12: showPage
/**
* Show page method
*
*/
function showPage($returnJson = true)
{
global $page_layouts;
$layout =& $page_layouts[$this->shortTableName . '_' . $this->pageType];
$pageSkinStyle = $layout->style . " page-" . $layout->name;
$this->BeforeShowList();
//set bricks, which must be shown on details preview page
$bricksExcept = array("grid", "pagination");
if ($this->masterPageType == PAGE_LIST) {
$bricksExcept[] = "details_found";
$bricksExcept[] = "page_of";
if ($this->deleteMessage != '') {
$bricksExcept[] = "message";
}
}
if ($this->masterPageType == PAGE_EDIT || $this->masterPageType == PAGE_ADD || $this->masterPageType == PAGE_LIST && $this->mainMasterPageType != PAGE_VIEW) {
if ($this->pSet->hasInlineEdit() || $this->pSet->hasDelete() && $this->masterPageType != PAGE_ADD) {
if ($this->permis[$this->tName]['edit'] || $this->permis[$this->tName]['delete']) {
$bricksExcept[] = "recordcontrol";
}
}
if ($this->pSet->hasInlineAdd() && $this->permis[$this->tName]['add']) {
$bricksExcept[] = "recordcontrols_new";
}
}
// if we use details inline. We don't need show the header/footer.
$this->xt->unassign('header');
$this->xt->unassign('footer');
$this->xt->hideAllBricksExcept($bricksExcept);
$this->xt->prepare_template($this->templatefile);
$contents = $this->displayAfterLoadTempl();
if (!$returnJson) {
if (GetGlobalData("printDetailTableName", true)) {
echo '<br><div id="dpShowHide' . $this->id . '" class="dpDiv">';
if (postvalue("pdf") != 1) {
echo '<img id="dpMinus' . $this->id . '" class="dpImg" border="0" src="images/minus.gif" valign="middle" alt="*" />';
}
echo '<a name="dt' . $this->id . '" class="dt">' . $this->strCaption . '</a></div>';
}
echo '<div id="detailPreview' . $this->id . '" class="' . $pageSkinStyle . ' runner-pagewrapper dpStyle">' . $contents . '</div>';
return;
}
//add for details preview page skin and style
$respArr = array();
// add cMap, sett
$this->addControlsJSAndCSS();
$this->fillSetCntrlMaps();
$respArr['controlsMap'] = $this->controlsHTMLMap;
$respArr['viewControlsMap'] = $this->viewControlsHTMLMap;
$respArr['settings'] = $this->jsSettings;
$respArr['html'] = $contents;
$respArr['success'] = true;
$respArr['id'] = $this->id;
$respArr['idStartFrom'] = $this->flyId;
$respArr['delRecs'] = $this->recordsDeleted;
if ($this->deleteMessage != '') {
$respArr['delMess'] = true;
}
$respArr["additionalJS"] = $this->grabAllJsFiles();
$respArr["additionalCSS"] = $this->grabAllCSSFiles();
echo '<textarea>' . htmlspecialchars(my_json_encode($respArr)) . '</textarea>';
}
示例13: showPageDp
/**
* Show a detail preview page
* @param Array params - asp compatibility issue
*/
public function showPageDp($params = "")
{
global $page_layouts;
$this->BeforeShowList();
$this->prepareTemplate();
$contents = $this->xt->fetch_loaded("body");
//add for details preview page skin and style
$layout =& $page_layouts[$this->shortTableName . '_' . $this->pageType];
$pageSkinStyle = $layout->style . " page-" . $layout->name;
$this->xt->assign("dpShowHide", true);
$this->xt->assign("dpMinus", true);
$this->xt->assign("dpShowHide_attrs", 'id="dpShowHide' . $this->id . '"');
$this->xt->assign("dpMinus_attrs", 'id="dpMinus' . $this->id . '"');
$this->xt->assign("dt_attrs", 'name="dt' . $this->id . '"');
if (GetGlobalData("printDetailTableName", false)) {
$this->xt->assign("dpShowHide", false);
$this->xt->assign("dpMinus", false);
}
if (postvalue("pdf") == 1) {
$this->xt->assign("dpMinus", false);
}
echo '<div id="detailPreview' . $this->id . '" class="' . $pageSkinStyle . ' rnr-pagewrapper dpStyle">' . $contents . '</div>';
}
示例14: 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;
}
示例15: isEnableSection508
function isEnableSection508()
{
return GetGlobalData("isSection508", false);
}