예제 #1
0
 function RunnerPage(&$params)
 {
     global $locale_info, $cCharset, $page_layouts;
     // copy properties to object
     RunnerApply($this, $params);
     $this->setTableConnection();
     $this->pSet = new ProjectSettings($this->tName, $this->pageType);
     $this->pSetEdit = $this->pSet;
     $this->pSetSearch = new ProjectSettings($this->tName, PAGE_SEARCH);
     $this->searchTableName = $this->tName;
     $this->assignCipherer();
     include_once getabspath("classes/controls/EditControlsContainer.php");
     $this->controls = new EditControlsContainer($this, $this->pSetEdit, $this->pageType);
     include_once getabspath("classes/controls/ViewControlsContainer.php");
     $this->viewControls = new ViewControlsContainer($this->pSet, $this->pageType, $this);
     $this->gQuery = $this->pSet->getSQLQuery();
     //set google map configuration
     $this->googleMapCfg = array('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);
     }
     if (!$this->sessionPrefix) {
         $this->assignSessionPrefix();
     }
     $this->isDisplayLoading = $this->pSet->displayLoading();
     //init settingMap globalSettings
     $this->settingsMap["globalSettings"] = array();
     $this->settingsMap["globalSettings"]["shortTNames"] = array();
     $this->searchPanelActivated = $this->checkIfSearchPanelActivated(isMobile());
     //global settings including "shortTNames" might be updated
     $this->setParamsForSearchPanel();
     $this->searchSavingEnabled = $this->isSearchSavingEnabled() && $this->needSearchClauseObj;
     $this->setSessionVariables();
     //	get locking object
     $this->lockingObj = GetLockingObject($this->tName);
     $this->warnLeavingPages = $this->pSet->warnLeavingPages();
     $this->is508 = isEnableSection508();
     $this->isUseVideo = $this->pSet->isUseVideo();
     $this->strCaption = GetTableCaption(GoodFieldName($this->tName));
     $this->tableType = $this->pSet->getTableType();
     $this->isAddWebRep = GetGlobalData("isAddWebRep", false);
     //	get details keys by master table
     $this->detailKeysByM = $this->getDetailKeysByMasterTable();
     $this->isDynamicPerm = GetGlobalData("isDynamicPerm", false);
     $this->shortTableName = $this->pSet->getShortTableName();
     $this->isResizeColumns = $this->pSet->isResizeColumns();
     $this->isUseAjaxSuggest = $this->pSetSearch->isUseAjaxSuggest();
     $this->useDetailsPreview = $this->pSet->isUseDetailsPreview();
     $this->isShowDetailTables = displayDetailsOn($this->tName, $this->pageType);
     //	get all details table for current table
     $this->allDetailsTablesArr = $this->pSet->getDetailTablesArr();
     //	set template file
     $this->setTemplateFile();
     //	init jsSettings
     $this->jsSettings = array();
     $this->jsSettings["tableSettings"] = array();
     $this->jsSettings["tableSettings"][$this->tName] = array();
     $this->jsSettings["tableSettings"][$this->tName]["proxy"] = array("proxy" => "");
     $this->jsSettings["tableSettings"][$this->tName]['fieldSettings'] = array();
     $this->settingsMap["globalSettings"]["webRootPath"] = GetWebRootPath();
     $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;
     $globalPopupPagesLayoutNames = GetGlobalData("popupPagesLayoutNames", array());
     if (count($globalPopupPagesLayoutNames)) {
         $this->settingsMap["globalSettings"]["popupPagesLayoutNames"] = $globalPopupPagesLayoutNames;
     }
     //isMobile
     $this->settingsMap["globalSettings"]["isMobile"] = isMobile();
     $this->settingsMap["globalSettings"]["mobileDeteced"] = detectMobileDevice();
     // s508 must be in global settings
     $this->settingsMap['globalSettings']['s508'] = $this->is508;
     $this->settingsMap["globalSettings"]["locale"] = array();
     $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']['hasEvents'] = array("default" => false, "jsName" => "hasEvents");
     $this->settingsMap["tableSettings"]["strCaption"] = array("default" => "", "jsName" => "strCaption");
     $this->settingsMap["tableSettings"]["isUseAudio"] = array("default" => false, "jsName" => "isUseAudio");
     //fix it
     $this->settingsMap["tableSettings"]["isUseVideo"] = array("default" => false, "jsName" => "isUseVideo");
     $this->settingsMap['tableSettings']['listGridLayout'] = array("default" => gltHORIZONTAL, "jsName" => "listGridLayout");
     $this->settingsMap["tableSettings"]["rowHighlite"] = array("default" => false, "jsName" => "isUseHighlite");
     $this->settingsMap["tableSettings"]["isUseToolTips"] = array("default" => false, "jsName" => "isUseToolTips");
     $this->settingsMap['tableSettings']['recsPerRowList'] = array("default" => 1, "jsName" => "recsPerRowList");
     $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"]["useDetailsPreview"] = array("default" => false, "jsName" => "isUseDP");
     $this->settingsMap['tableSettings']['isUsebuttonHandlers'] = array("default" => false, "jsName" => "isUseButtons");
     //if the Search panel added to the non table based page ajax suggests should be configured according to the search table's settings
     $ajaxSuggestDefault = $this->tableBasedSearchPanelAdded ? !$this->isUseAjaxSuggest : true;
     $this->settingsMap["tableSettings"]["isUseAjaxSuggest"] = array("default" => $ajaxSuggestDefault, "jsName" => "ajaxSuggest");
     if ($this->pageType == PAGE_REGISTER || $this->pageType == PAGE_CHANGEPASS) {
         $this->pageLayout = GetPageLayout('', $this->pageType);
     } else {
         $this->pageLayout = GetPageLayout($this->shortTableName, $this->pageType);
     }
     if ($this->pageLayout) {
         $this->jsSettings['tableSettings'][$this->tName]['pageSkinStyle'] = array();
         $this->jsSettings['tableSettings'][$this->tName]['pageSkinStyle'][$this->pageType] = $this->pageLayout->style . " page-" . $this->pageLayout->name;
         $this->AddCSSFile($this->pageLayout->getCSSFiles(isRTL(), isPageLayoutMobile($this->templatefile)));
     }
     $this->controlsMap["oldLayout"] = $this->isOldLayout();
     $this->controlsMap["layoutName"] = $this->getLayoutName();
     $this->settingsMap["fieldSettings"] = array();
     $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"]["strEditMask"] = array("default" => null, "jsName" => "mask");
     $this->settingsMap["fieldSettings"]["LastYearFactor"] = array("default" => 10, "jsName" => "lastYear");
     $this->settingsMap["fieldSettings"]["InitialYearFactor"] = array("default" => 100, "jsName" => "initialYear");
     $this->settingsMap["fieldSettings"]["ShowListOfThumbnails"] = array("default" => false, "jsName" => "showListOfThumbnails");
     $this->settingsMap["fieldSettings"]["ImageWidth"] = array("default" => 0, "jsName" => "imageWidth");
     $this->settingsMap["fieldSettings"]["ImageHeight"] = array("default" => 0, "jsName" => "imageHeight");
     $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;
     }
     if ($this->lockingObj) {
         $this->jsSettings['tableSettings'][$this->tName]['locking'] = true;
     }
     if ($this->warnLeavingPages && ($this->pageType == PAGE_REGISTER || $this->pageType == PAGE_ADD || $this->pageType == PAGE_EDIT)) {
         $this->jsSettings['tableSettings'][$this->tName]['warnOnLeaving'] = true;
     }
     //If current table has detail tables
     if (count($this->allDetailsTablesArr)) {
         if ($this->pageType == PAGE_LIST) {
             $this->jsSettings['tableSettings'][$this->tName]['detailTables'] = array();
         }
         $this->jsSettings['tableSettings'][$this->tName]['isShowDetails'] = $this->isShowDetailTables;
         for ($i = 0; $i < count($this->allDetailsTablesArr); $i++) {
             $this->settingsMap["globalSettings"]['shortTNames'][$this->allDetailsTablesArr[$i]['dDataSourceTable']] = $this->allDetailsTablesArr[$i]['dShortTable'];
             if ($this->pageType == PAGE_LIST || $this->pageType == PAGE_REPORT || $this->pageType == PAGE_CHART) {
                 unset($_SESSION[$this->allDetailsTablesArr[$i]['dDataSourceTable'] . '_advsearch']);
                 $dPermission = $this->getPermissions($this->allDetailsTablesArr[$i]['dDataSourceTable']);
                 if ($dPermission["search"]) {
                     $this->jsSettings['tableSettings'][$this->tName]['detailTables'][$this->allDetailsTablesArr[$i]['dDataSourceTable']] = array('pageType' => $this->allDetailsTablesArr[$i]['dType'], 'dispChildCount' => $this->allDetailsTablesArr[$i]['dispChildCount'], 'hideChild' => $this->allDetailsTablesArr[$i]['hideChild'], 'listShowType' => $this->allDetailsTablesArr[$i]['previewOnList'], 'addShowType' => $this->allDetailsTablesArr[$i]['previewOnAdd'], 'editShowType' => $this->allDetailsTablesArr[$i]['previewOnEdit'], 'viewShowType' => $this->allDetailsTablesArr[$i]['previewOnView']);
                 }
                 if ($this->allDetailsTablesArr[$i]['previewOnList'] == DP_POPUP) {
                     $this->jsSettings['tableSettings'][$this->tName]['isUsePopUp'] = true;
                 }
                 // field names of master keys of current table for passed details table name
                 $this->masterKeysByD[$i] = $this->allDetailsTablesArr[$i]['masterKeys'];
             }
         }
         if (($this->pageType == PAGE_ADD || $this->pageType == PAGE_EDIT) && $this->isShowDetailTables) {
             $this->controlsMap["dControlsMap"] = array();
         }
     }
     $this->controlsMap["video"] = array();
     $this->controlsMap['toolTips'] = array();
     $this->addLookupSettings();
     $this->addMultiUploadSettings();
     $this->controlsMap["searchPanelActivated"] = $this->searchPanelActivated;
     if ($this->pageType != PAGE_LIST || $this->mode != LIST_DETAILS) {
         $this->controlsMap["controls"] = array();
         if (!($this->pageType == PAGE_ADD && $this->mode == ADD_INLINE) && !($this->pageType == PAGE_EDIT && $this->mode == EDIT_INLINE)) {
             $allSearchFields = $this->pSetSearch->getAllSearchFields();
             $this->controlsMap["search"] = array();
             $this->controlsMap["search"]["searchBlocks"] = array();
             $this->controlsMap["search"]["allSearchFields"] = $allSearchFields;
             $this->controlsMap["search"]["allSearchFieldsLabels"] = $this->getSearchFieldsLabels($allSearchFields);
             $this->controlsMap["search"]["panelSearchFields"] = $this->pSetSearch->GetPanelSearchFields();
             $this->controlsMap["search"]["googleLikeFields"] = $this->pSetSearch->getGoogleLikeFields();
             $this->controlsMap["search"]["inflexSearchPanel"] = !$this->pSetSearch->isFlexibleSearch();
             $this->controlsMap["search"]["requiredSearchFields"] = $this->pSetSearch->getSearchRequiredFields();
             $this->controlsMap["search"]["isSearchRequired"] = $this->pSetSearch->noRecordsOnFirstPage();
             $this->controlsMap["search"]["searchTableName"] = $this->searchTableName;
             $this->controlsMap["search"]["shortSearchTableName"] = $this->pSetSearch->getShortTableName();
             if ($this->pageType != PAGE_SEARCH) {
                 $this->controlsMap["search"]["submitPageType"] = $this->pageType;
             } else {
                 if (postvalue("rname")) {
                     $this->controlsMap["search"]["submitPageType"] = "dreport";
                     $this->controlsMap["search"]["baseParams"]["rname"] = postvalue("rname");
                     if ($_SESSION["crossLink"]) {
                         if (substr($_SESSION["crossLink"], 0, 1) == "&") {
                             $_SESSION["crossLink"] = substr($_SESSION["crossLink"], 1);
                         }
                         $alink = explode("&", $_SESSION["crossLink"]);
                         foreach ($alink as $param) {
                             $arrtmp = explode("=", $param);
                             $this->controlsMap["search"]["baseParams"][$arrtmp[0]] = $arrtmp[1];
                         }
                     }
                 } elseif (postvalue("cname")) {
                     $this->controlsMap["search"]["submitPageType"] = "dchart";
                     $this->controlsMap["search"]["baseParams"]["cname"] = postvalue("cname");
                 } else {
                     $this->controlsMap["search"]["submitPageType"] = $this->tableType;
                 }
             }
         }
     }
     $this->isUseToolTips = $this->isUseToolTips || $this->pSet->isUseToolTips();
     $this->googleMapCfg["APIcode"] = "";
     $this->processMasterKeyValue();
     $this->assignSearchLogger();
 }
예제 #2
0
 function RunnerPage(&$params)
 {
     global $locale_info, $cCharset, $page_layouts;
     // copy properties to object
     RunnerApply($this, $params);
     $this->pSet = new ProjectSettings($this->tName, $this->pageType);
     $this->pSetEdit = $this->pSet;
     $this->cipherer = new RunnerCipherer($this->tName, $this->pSet);
     include_once getabspath("classes/controls/EditControlsContainer.php");
     $this->controls = new EditControlsContainer($this);
     include_once getabspath("classes/controls/ViewControlsContainer.php");
     $this->viewControls = new ViewControlsContainer($this->pSet, $this->pageType, $this);
     $this->gQuery = $this->pSet->getSQLQuery();
     //set google map configuration
     $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);
     }
     if (!$this->sessionPrefix) {
         $this->sessionPrefix = $this->tName;
     }
     $this->setSessionVariables();
     //	get locking object
     $this->lockingObj = GetLockingObject($this->tName);
     $this->is508 = isEnableSection508();
     $this->isEncryptionEnabled = isEncryptionEnabled();
     $this->isEncryptionByPHPEnabled = isEncryptionByPHPEnabled();
     $this->isUseVideo = $this->pSet->isUseVideo();
     $this->isUseAudio = $this->pSet->isUseAudio();
     $this->strCaption = GetTableCaption(GoodFieldName($this->tName));
     $this->isTableType = $this->pSet->isTableType();
     $this->isAddWebRep = GetGlobalData("isAddWebRep", false);
     //	get details keys by master table
     $this->detailKeysByM = $this->pSet->getDetailKeysByMasterTable($this->masterTable);
     $this->isDynamicPerm = GetGlobalData("isDynamicPerm", false);
     $this->shortTableName = $this->pSet->getShortTableName();
     $this->showAddInPopup = $this->pSet->isShowAddInPopup();
     $this->showEditInPopup = $this->pSet->isShowEditInPopup();
     $this->showViewInPopup = $this->pSet->isShowViewInPopup();
     $this->isResizeColumns = $this->pSet->isResizeColumns();
     $this->isUseAjaxSuggest = $this->pSet->isUseAjaxSuggest();
     $this->useDetailsPreview = $this->pSet->isUseDetailsPreview();
     $this->isShowDetailTables = displayDetailsOn($this->tName, $this->pageType);
     //	get all details table for current table
     $this->allDetailsTablesArr = $this->pSet->getDetailTablesArr();
     //	set template file
     $this->setTemplateFile();
     //	init jsSettings
     $this->jsSettings["tableSettings"][$this->tName] = array();
     $this->jsSettings["tableSettings"][$this->tName]["proxy"] = array("proxy" => "");
     $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']['hasEvents'] = array("default" => false, "jsName" => "hasEvents");
     $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']['isVerLayout'] = array("default" => false, "jsName" => "isVertLayout");
     $this->settingsMap["tableSettings"]["rowHighlite"] = array("default" => false, "jsName" => "isUseHighlite");
     $this->settingsMap["tableSettings"]["isUseToolTips"] = array("default" => false, "jsName" => "isUseToolTips");
     $this->settingsMap['tableSettings']['recsPerRowList'] = array("default" => 1, "jsName" => "recsPerRowList");
     $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");
     if ($this->pageType == PAGE_REGISTER || $this->pageType == PAGE_CHANGEPASS) {
         $layout = GetPageLayout('', $this->pageType);
     } else {
         $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 . ".css";
         $this->jsSettings['tableSettings'][$this->tName]['pageLayout'] = "pagestyles/" . $layout->name . $rtl . ".css";
         $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"]["strEditMask"] = array("default" => null, "jsName" => "mask");
     $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;
     }
     if ($this->lockingObj) {
         $this->jsSettings['tableSettings'][$this->tName]['locking'] = true;
     }
     //If current table has detail tables
     if (count($this->allDetailsTablesArr)) {
         if ($this->pageType == PAGE_LIST) {
             $this->jsSettings['tableSettings'][$this->tName]['detailTables'] = array();
         }
         $this->jsSettings['tableSettings'][$this->tName]['isShowDetails'] = $this->isShowDetailTables;
         for ($i = 0; $i < count($this->allDetailsTablesArr); $i++) {
             $this->settingsMap["globalSettings"]['shortTNames'][$this->allDetailsTablesArr[$i]['dDataSourceTable']] = $this->allDetailsTablesArr[$i]['dShortTable'];
             if ($this->pageType == PAGE_LIST) {
                 $this->jsSettings['tableSettings'][$this->tName]['detailTables'][$this->allDetailsTablesArr[$i]['dDataSourceTable']] = array('dispChildCount' => $this->allDetailsTablesArr[$i]['dispChildCount'], 'hideChild' => $this->allDetailsTablesArr[$i]['hideChild'], 'listShowType' => $this->allDetailsTablesArr[$i]['previewOnList'], 'addShowType' => $this->allDetailsTablesArr[$i]['previewOnAdd'], 'editShowType' => $this->allDetailsTablesArr[$i]['previewOnEdit'], 'viewShowType' => $this->allDetailsTablesArr[$i]['previewOnView']);
                 if ($this->allDetailsTablesArr[$i]['previewOnList'] == DP_POPUP) {
                     $this->jsSettings['tableSettings'][$this->tName]['isUsePopUp'] = true;
                 }
                 // field names of master keys of current table for passed details table name
                 $this->masterKeysByD[$i] = $this->pSet->getMasterKeysByDetailTable($this->allDetailsTablesArr[$i]['dDataSourceTable']);
             }
         }
         if (($this->pageType == PAGE_ADD || $this->pageType == PAGE_EDIT) && $this->isShowDetailTables) {
             $this->controlsMap["dControlsMap"] = array();
         }
     }
     $this->controlsMap["video"] = array();
     $this->controlsMap['toolTips'] = array();
     $this->addLookupSettings();
     $this->addMultiUploadSettings();
     if ($this->mode != LIST_DETAILS) {
         $this->controlsMap["controls"] = array();
         if (!$this->pageAddLikeInline && !$this->pageEditLikeInline) {
             $this->controlsMap["search"] = array();
             $this->controlsMap["search"]["searchBlocks"] = array();
             $this->controlsMap["search"]["panelSearchFields"] = $this->pSet->GetPanelSearchFields();
             $this->controlsMap["search"]["allSearchFields"] = $this->pSet->getAllSearchFields();
             $this->controlsMap["search"]["googleLikeFields"] = $this->pSet->getGoogleLikeFields();
             if ($this->pageType != PAGE_SEARCH) {
                 $this->controlsMap["search"]["submitPageType"] = $this->pageType;
             } else {
                 if (postvalue("rname")) {
                     $this->controlsMap["search"]["submitPageType"] = "dreport";
                     $this->controlsMap["search"]["baseParams"]["rname"] = postvalue("rname");
                     if ($_SESSION["crossLink"]) {
                         if (substr($_SESSION["crossLink"], 0, 1) == "&") {
                             $_SESSION["crossLink"] = substr($_SESSION["crossLink"], 1);
                         }
                         $alink = explode("&", $_SESSION["crossLink"]);
                         foreach ($alink as $param) {
                             $arrtmp = explode("=", $param);
                             $this->controlsMap["search"]["baseParams"][$arrtmp[0]] = $arrtmp[1];
                         }
                     }
                 } elseif (postvalue("cname")) {
                     $this->controlsMap["search"]["submitPageType"] = "dchart";
                     $this->controlsMap["search"]["baseParams"]["cname"] = postvalue("cname");
                 } else {
                     $this->controlsMap["search"]["submitPageType"] = $this->isTableType;
                 }
             }
         }
     }
     $this->timepicker = $this->timepicker || $this->pSet->isUseTimeForSearch();
     $this->isUseToolTips = $this->isUseToolTips || $this->pSet->isUseToolTips();
     $this->googleMapCfg["APIcode"] = "";
     if ($this->xt) {
         $this->xt->assign("pagetitle", $this->getPageTitle());
     }
 }