function EditControl($field, $pageObject, $id) { $this->field = $field; $this->goodFieldName = GoodFieldName($field); $this->setID($id); $this->pageObject = $pageObject; $this->is508 = isEnableSection508(); $this->strLabel = $pageObject->pSetEdit->label($field); $this->type = $pageObject->pSetEdit->getFieldType($this->field); $this->like = "ilike"; $this->searchOptions[CONTAINS] = "Contains"; $this->searchOptions[EQUALS] = "Equals"; $this->searchOptions[STARTS_WITH] = "Starts with"; $this->searchOptions[MORE_THAN] = "More than"; $this->searchOptions[LESS_THAN] = "Less than"; $this->searchOptions[BETWEEN] = "Between"; $this->searchOptions[EMPTY_SEARCH] = "Empty"; $this->searchOptions[NOT_CONTAINS] = "Doesn't contain"; $this->searchOptions[NOT_EQUALS] = "Doesn't equal"; $this->searchOptions[NOT_STARTS_WITH] = "Doesn't start with"; $this->searchOptions[NOT_MORE_THAN] = "Is not more than"; $this->searchOptions[NOT_LESS_THAN] = "Is not less than"; $this->searchOptions[NOT_BETWEEN] = "Is not between"; $this->searchOptions[NOT_EMPTY] = "Is not empty"; $this->init(); }
public function ViewControl($field, $container, $pageObject = null) { $this->field = $field; $this->container = $container; $this->pageObject = $pageObject; $this->is508 = isEnableSection508(); $this->fieldType = $this->container->pSet->getFieldType($this->field); $this->viewFormat = $this->container->pSet->getViewFormat($this->field); $this->editFormat = $this->container->pSet->getEditFormat($this->field); }
protected function prepareFields() { foreach ($this->pSet->getDashboardSearchFields() as $f => $fdata) { $field = $fdata[0]["field"]; $table = $fdata[0]["table"]; $fSet = $this->getTableSettings($table); $lookupTable = $fSet->getLookupTable($field); if ($lookupTable) { $this->settingsMap["globalSettings"]['shortTNames'][$lookupTable] = GetTableURL($lookupTable); } $this->fillFieldToolTips($f); $srchFields = $this->searchClauseObj->getSearchCtrlParams($f); $firstFieldParams = array(); if (count($srchFields)) { $firstFieldParams = $srchFields[0]; } else { $firstFieldParams['fName'] = $f; $firstFieldParams['eType'] = ''; $firstFieldParams['value1'] = $fSet->getDefaultValue($field, $table); $firstFieldParams['opt'] = ''; $firstFieldParams['value2'] = ''; $firstFieldParams['not'] = false; } // create control $ctrlBlockArr = $this->searchControlBuilder->buildSearchCtrlBlockArr($this->id, $firstFieldParams['fName'], 0, $firstFieldParams['opt'], $firstFieldParams['not'], false, $firstFieldParams['value1'], $firstFieldParams['value2']); if ($firstFieldParams['opt'] == "") { $firstFieldParams['opt'] = $this->pSet->getDefaultSearchOption($firstFieldParams['fName']); } $srchTypeFull = $this->searchControlBuilder->getCtrlSearchType($firstFieldParams['fName'], $this->id, 0, $firstFieldParams['opt'], $firstFieldParams['not'], true, true); if (isEnableSection508()) { $this->xt->assign_section($f . "_label", "<label for=\"" . $this->getInputElementId($field, $fSet) . "\">", "</label>"); } else { $this->xt->assign($f . "_label", true); } $this->xt->assign($f . "_fieldblock", true); $this->xt->assignbyref($f . "_editcontrol", $ctrlBlockArr['searchcontrol']); $this->xt->assign($f . "_notbox", $ctrlBlockArr['notbox']); // create second control, if need it $this->xt->assignbyref($f . "_editcontrol1", $ctrlBlockArr['searchcontrol1']); // create search type select $this->xt->assign("searchtype_" . $f, $ctrlBlockArr['searchtype']); $this->xt->assign("searchtypefull_" . $f, $srchTypeFull); $isFieldNeedSecCtrl = $this->searchControlBuilder->isNeedSecondCtrl($f); $ctrlInd = 0; if ($isFieldNeedSecCtrl) { $this->controlsMap["search"]["searchBlocks"][] = array('fName' => $f, 'recId' => $this->id, 'ctrlsMap' => array(0 => $ctrlInd, 1 => $ctrlInd + 1)); $ctrlInd += 2; } else { $this->controlsMap["search"]["searchBlocks"][] = array('fName' => $f, 'recId' => $this->id, 'ctrlsMap' => array(0 => $ctrlInd)); $ctrlInd++; } } }
/** * Contructor * * @param array $params * @return RightsPage */ function RightsPage(&$params) { $this->cbxNames = array('add' => array('mask' => 'A', 'rightName' => 'add'), 'edt' => array('mask' => 'E', 'rightName' => 'edit'), 'del' => array('mask' => 'D', 'rightName' => 'delete'), 'lst' => array('mask' => 'S', 'rightName' => 'list'), 'exp' => array('mask' => 'P', 'rightName' => 'export'), 'imp' => array('mask' => 'I', 'rightName' => 'import'), 'adm' => array('mask' => 'M')); // copy properties to object //RunnerApply($this, $params); parent::RunnerPage($params); //fill session variables $this->setSessionVariables(); // Set language params, if have more than one language $this->setLangParams(); // get permissions $this->permis[$this->tName] = $this->getPermissions(); $this->is508 = isEnableSection508(); $this->DPOrderTables($this->nonAdminTablesArr); $this->fillGroupsArr(); }
public function showDBValue(&$data, $keylink) { $result = "<img src=\""; $imgSrc = "images/check_"; if ($this->getHostPageDbType() == nDATABASE_PostgreSQL) { $trueCondition = $data[$this->field] == "t" || $data[$this->field] != 0 && $data[$this->field] != ""; } else { $trueCondition = $data[$this->field] != 0; } $imgSrc .= $trueCondition ? "yes" : "no"; $result .= GetRootPathForResources($imgSrc . ".gif") . "\" border=0"; if (isEnableSection508()) { $result .= " alt=\" \""; } $result .= ">"; return $result; }
public function showDBValue(&$data, $keylink) { if ($this->container->forExport) { return $this->checkForEncoding($data[$this->field], $keylink); } $result = "<img src=\"images/check_"; if ($data[$this->field] && $data[$this->field] != 0) { $result .= "yes"; } else { $result .= "no"; } $result .= ".gif\" border=0"; if (isEnableSection508()) { $result .= " alt=\" \""; } $result .= ">"; return $result; }
function EditControl($field, $pageObject, $id, $connection) { $this->field = $field; $this->goodFieldName = GoodFieldName($field); $this->setID($id); $this->connection = $connection; $this->pageObject = $pageObject; $this->is508 = isEnableSection508(); $this->strLabel = $pageObject->pSetEdit->label($field); $this->type = $pageObject->pSetEdit->getFieldType($this->field); if ($this->connection->dbType == nDATABASE_Oracle) { $this->isOracle = true; } if ($this->connection->dbType == nDATABASE_MSSQLServer) { $this->ismssql = true; } if ($this->connection->dbType == nDATABASE_DB2) { $this->isdb2 = true; } if ($this->connection->dbType == nDATABASE_MySQL) { $this->isMysql = true; } if ($this->connection->dbType == nDATABASE_PostgreSQL) { $this->like = "ilike"; } $this->searchOptions[CONTAINS] = "Contiene"; $this->searchOptions[EQUALS] = "Equivale"; $this->searchOptions[STARTS_WITH] = "Empieza con"; $this->searchOptions[MORE_THAN] = "Más que"; $this->searchOptions[LESS_THAN] = "Menos que"; $this->searchOptions[BETWEEN] = "Entre"; $this->searchOptions[EMPTY_SEARCH] = "Vacio"; $this->searchOptions[NOT_CONTAINS] = "No contiene"; $this->searchOptions[NOT_EQUALS] = "No es igual"; $this->searchOptions[NOT_STARTS_WITH] = "No empieza por"; $this->searchOptions[NOT_MORE_THAN] = "No mayor que"; $this->searchOptions[NOT_LESS_THAN] = "No menor que"; $this->searchOptions[NOT_BETWEEN] = "No está entre"; $this->searchOptions[NOT_EMPTY] = "No está vacío"; $this->init(); }
function EditControl($field, $pageObject, $id, $connection) { $this->field = $field; $this->goodFieldName = GoodFieldName($field); $this->setID($id); $this->connection = $connection; $this->pageObject = $pageObject; $this->is508 = isEnableSection508(); $this->strLabel = $pageObject->pSetEdit->label($field); $this->type = $pageObject->pSetEdit->getFieldType($this->field); if ($this->connection->dbType == nDATABASE_Oracle) { $this->isOracle = true; } if ($this->connection->dbType == nDATABASE_MSSQLServer) { $this->ismssql = true; } if ($this->connection->dbType == nDATABASE_DB2) { $this->isdb2 = true; } if ($this->connection->dbType == nDATABASE_MySQL) { $this->isMysql = true; } if ($this->connection->dbType == nDATABASE_PostgreSQL) { $this->like = "ilike"; } $this->searchOptions[CONTAINS] = "Contains"; $this->searchOptions[EQUALS] = "Equals"; $this->searchOptions[STARTS_WITH] = "Starts with"; $this->searchOptions[MORE_THAN] = "More than"; $this->searchOptions[LESS_THAN] = "Less than"; $this->searchOptions[BETWEEN] = "Between"; $this->searchOptions[EMPTY_SEARCH] = "Empty"; $this->searchOptions[NOT_CONTAINS] = "Doesn't contain"; $this->searchOptions[NOT_EQUALS] = "Doesn't equal"; $this->searchOptions[NOT_STARTS_WITH] = "Doesn't start with"; $this->searchOptions[NOT_MORE_THAN] = "Is not more than"; $this->searchOptions[NOT_LESS_THAN] = "Is not less than"; $this->searchOptions[NOT_BETWEEN] = "Is not between"; $this->searchOptions[NOT_EMPTY] = "Is not empty"; $this->init(); }
function xt_displaymenu($params) { global $strTableName, $pageName; $menuparams = array(); foreach ($params as $p) { $menuparams[] = $p; } $menuId = $menuparams[0]; $ProjectSettings = new ProjectSettings(); $menuName = $ProjectSettings->getMenuName($this->template_file, $menuId, $menuparams[1]); $menuStyle = $ProjectSettings->getMenuStyle($this->template_file, $menuId, $menuparams[1]); $isMobyleLayout = isMobile(); array_shift($menuparams); global $pageObject; $pageType = ""; $pageMode = 0; $menuNodes = array(); $isAdminTable = false; if (isset($pageObject)) { $pageObject->getMenuNodes(); $pageType = $pageObject->pageType; $pageMode = $pageObject->mode; $isAdminTable = $pageObject->isAdminTable(); if ($isAdminTable) { $menuName = "adminarea"; } $menuNodes = $pageObject->getMenuNodes($menuName); } $xt = new Xtempl(); $xt->assign("menuName", $menuName); $xt->assign("menustyle", $menuStyle ? "second" : "main"); $quickjump = false; $horizontal = false; if (count($menuparams)) { if ($menuparams[0] == "horizontal") { $horizontal = true; } elseif ($menuparams[0] == "quickjump") { $quickjump = true; } } if (!$isAdminTable) { if (!$quickjump) { if (!$isMobyleLayout) { $xt->assign("simpleTypeMenu", true); } else { $xt->assign("treeLikeTypeMenu", true); } } if ($pageType == PAGE_MENU && IsAdmin() && !$isMobyleLayout) { $xt->assign("adminarea_link", true); } } else { //Admin Area menu items $xt->assign("adminAreaTypeMenu", true); } // need to predefine vars $nullParent = NULL; $rootInfoArr = array("id" => 0, "href" => ""); // create treeMenu instance $menuNodesIndex = 0; $menuMap = array(); $menuRoot = new MenuItem($rootInfoArr, $menuNodes, $nullParent, $menuMap); // call xtempl assign, set session params $menuRoot->setMenuSession(); $menuRoot->assignMenuAttrsToTempl($xt); $menuRoot->setCurrMenuElem($xt); $xt->assign("mainmenu_block", true); $mainmenu = array(); if (isEnableSection508()) { $mainmenu["begin"] = "<a name=\"skipmenu\"></a>"; } $mainmenu["end"] = ''; $countLinks = 0; $countGroups = 0; $showMenuCollapseExpandAll = false; foreach ($menuRoot->children as $ind => $val) { if ($val->showAsLink) { $countLinks++; } if ($val->showAsGroup) { if (count($val->children)) { $showMenuCollapseExpandAll = true; } $countGroups++; } } $xt->assign("menu_collapse_expand_all", $showMenuCollapseExpandAll); if ($pageType == PAGE_MENU || $countLinks > 1 || $countGroups > 0) { $xt->assignbyref("mainmenu_block", $mainmenu); if ($this->layout->version == 1) { $menuName = "old" . $menuName; } if ($quickjump) { $xt->display($menuName . "_" . "mainmenu_quickjump.htm"); } else { if ($horizontal) { $xt->display($menuName . "_" . "mainmenu_horiz.htm"); } else { if ($isMobyleLayout && $this->layout->version != 1) { $xt->display($menuName . "_" . "mainmenu_m.htm"); } else { $xt->display($menuName . "_" . "mainmenu.htm"); } } } } }
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(); }
if (!$pageObject->isAppearOnTabs("npwpd_old")) { $xt->assign("npwpd_old_fieldblock", true); } else { $xt->assign("npwpd_old_tabfieldblock", true); } $xt->assign("npwpd_old_label", true); if (isEnableSection508()) { $xt->assign_section("npwpd_old_label", "<label for=\"" . GetInputElementId("npwpd_old", $id, PAGE_ADD) . "\">", "</label>"); } if (!$pageObject->isAppearOnTabs("id_old")) { $xt->assign("id_old_fieldblock", true); } else { $xt->assign("id_old_tabfieldblock", true); } $xt->assign("id_old_label", true); if (isEnableSection508()) { $xt->assign_section("id_old_label", "<label for=\"" . GetInputElementId("id_old", $id, PAGE_ADD) . "\">", "</label>"); } if ($inlineadd != ADD_ONTHEFLY && $inlineadd != ADD_POPUP) { $pageObject->body["begin"] .= $includes; $xt->assign("backbutton_attrs", "id=\"backButton" . $id . "\""); $xt->assign("back_button", true); } else { $xt->assign("cancelbutton_attrs", "id=\"cancelButton" . $id . "\""); $xt->assign("cancel_button", true); $xt->assign("header", ""); } $xt->assign("save_button", true); } $xt->assign("savebutton_attrs", "id=\"saveButton" . $id . "\""); $xt->assign("message_block", true);
function buildControl($value, $mode, $fieldNum = 0, $validate, $additionalCtrlParams, $data) { parent::buildControl($value, $mode, $fieldNum, $validate, $additionalCtrlParams, $data); if ($this->pageObject->pageType == PAGE_SEARCH || $this->pageObject->pageType == PAGE_LIST) { echo '<input id="' . $this->cfield . '" ' . $this->inputStyle . ' type="text" ' . ($mode == MODE_SEARCH ? 'autocomplete="off" ' : '') . (($mode == MODE_INLINE_EDIT || $mode == MODE_INLINE_ADD) && $this->is508 == true ? 'alt="' . $this->strLabel . '" ' : '') . 'name="' . $this->cfield . '" ' . $this->pageObject->pSetEdit->getEditParams($this->field) . ' value="' . htmlspecialchars($value) . '">'; $this->buildControlEnd($validate); return; } if ($mode == MODE_SEARCH) { $this->format = ""; } $disp = ""; $strfilename = ""; $function = ""; if ($mode == MODE_EDIT || $mode == MODE_INLINE_EDIT) { // show current file $fileName = $value; if ($this->pageObject->pSet->getViewFormat($this->field) == FORMAT_FILE || $this->pageObject->pSet->getViewFormat($this->field) == FORMAT_FILE_IMAGE) { $uploadFolder = $this->pageObject->pSet->getUploadFolder($this->field); if (!CheckImageExtension($value)) { $disp = "<a target=\"_blank\" href=\"" . htmlspecialchars($uploadFolder . $value) . "\">" . htmlspecialchars($value) . "</a>"; } else { $finalUploadFolder = $this->pageObject->pSet->getFinalUploadFolder($this->field); if (!myfile_exists(getabspath($finalUploadFolder . $value))) { $value = "images/no_image.gif"; } else { $value = $uploadFolder . $value; } if ($this->pageObject->pSet->showThumbnail($this->field)) { $thumbprefix = $this->pageObject->pSet->getStrThumbnail($this->field); // show thumbnail $thumbname = $thumbprefix . $fileName; if (substr($uploadFolder, 0, 7) != "http://") { if (!myfile_exists(getabspath($finalUploadFolder . $thumbname))) { $thumbname = $value; } else { $thumbname = $uploadFolder . $thumbname; } } $disp = "<a target=\"_blank\" href=\"" . htmlspecialchars($value) . "\" class='zoombox zgallery'>"; $disp .= "<img"; if (isEnableSection508()) { $disp .= " alt=\"" . htmlspecialchars($fileName) . "\""; } $disp .= " border=0"; $disp .= " src=\"" . htmlspecialchars($thumbname) . "\"></a>"; } else { if ($value != "images/no_image.gif") { if (filesize($finalUploadFolder . $fileName) > 51200) { $imageValue = "images/icons/jpg.png"; } else { $imageValue = $value; } } else { $imageValue = "images/no_image.gif"; } if (isEnableSection508()) { $disp = '<img alt=\\"' . htmlspecialchars($fileName) . '\\" src="' . htmlspecialchars($imageValue) . '" border=0>'; } else { $disp = '<img src="' . htmlspecialchars($imageValue) . '" border=0>'; } if ($imageValue != "images/no_image.gif") { $disp = "<a target=\"_blank\" href=\"" . htmlspecialchars($value) . "\">" . $disp . "</a>"; } } } $disp .= "<br />"; } // filename edit $filename_size = 30; if ($this->pageObject->pSet->isUseTimestamp($this->field)) { $filename_size = 50; } $strfilename = '<input type=hidden name="filenameHidden_' . $this->cfieldname . '" value="' . htmlspecialchars($fileName) . '"><br>' . "Filename" . ' <input type="text" style="background-color:gainsboro" disabled id="filename_' . $this->cfieldname . '" name="filename_' . $this->cfieldname . '" size="' . $filename_size . '" maxlength="100" value="' . htmlspecialchars($fileName) . '">'; $strtype = '<br><input id="' . $this->ctype . '_keep" type="Radio" name="' . $this->ctype . '" value="upload0" checked class="runner-uploadtype">' . "Keep"; if ((strlen($value) || $mode == MODE_INLINE_EDIT) && !$this->pageObject->pSet->isRequired($this->field)) { $strtype .= '<input id="' . $this->ctype . '_delete" type="Radio" name="' . $this->ctype . '" value="upload1" class="runner-uploadtype">' . "Delete"; } $strtype .= '<input id="' . $this->ctype . '_update" type="Radio" name="' . $this->ctype . '" value="upload2" class="runner-uploadtype">' . "Update"; } else { // if Adding record $filename_size = 30; if ($this->pageObject->pSet->isUseTimestamp($this->field)) { $filename_size = 50; } $strtype = '<input id="' . $this->ctype . '" type="hidden" name="' . $this->ctype . '" value="upload2">'; $strfilename = '<br>' . "Filename" . ' <input type="text" id="filename_' . $this->cfieldname . '" name="filename_' . $this->cfieldname . '" size="' . $filename_size . '" maxlength="100">'; } echo $disp . $strtype . $function; if ($mode == MODE_EDIT || $mode == MODE_INLINE_EDIT) { echo '<br>'; } echo '<input type="File" id="' . $this->cfield . '" ' . (($mode == MODE_INLINE_EDIT || $mode == MODE_INLINE_ADD) && $this->is508 == true ? 'alt="' . $this->strLabel . '" ' : '') . ' name="' . $this->cfield . '" >' . $strfilename; echo '<input type="Hidden" id="notempty_' . $this->cfieldname . '" value="' . (strlen($value) ? 1 : 0) . '">'; $this->buildControlEnd($validate); }
function searchAssign() { $this->pageObj->xt->assign("asearch_link", $this->searchPerm); $this->pageObj->xt->assign("asearchlink_attrs", "id=\"asearch_" . $this->id . "\" name=\"asearch_" . $this->id . "\" href=\"" . $this->pageObj->shortTableName . "_search.php\" onclick=\"window.location.href='" . $this->pageObj->shortTableName . "_search.php';return false;\""); if (isEnableSection508() && $this->searchPerm) { $searchPerm = array(); $searchPerm["begin"] = "<a name=\"skipsearch\"></a>"; } else { $searchPerm = $this->searchPerm; } $this->pageObj->xt->assign("searchform_block", $searchPerm); if (isMobile()) { $this->pageObj->xt->assign("searchformmobile_block", $searchPerm); } $this->pageObj->xt->assign("searchformbuttons_block", $searchPerm); $this->pageObj->xt->assign("searchform_text", true); $this->pageObj->xt->assign("searchform_search", true); if (isMobile()) { $this->pageObj->xt->assign("searchform_showall_mobile", true); } else { $this->pageObj->xt->assign("searchform_showall", true); } if (!$this->searchClauseObj->isUsedSrch()) { $this->pageObj->xt->assign("showAllCont_attrs", 'style="display: none;"'); } $srchButtTitle = "Search"; $this->pageObj->xt->assign("searchbutton_attrs", "id=\"searchButtTop" . $this->id . "\" title=\"" . $srchButtTitle . '"'); $this->pageObj->xt->assign("showallbutton_attrs", "id=\"showAll" . $this->id . "\""); }
/** * @intellisense */ function SetLangVars($xt, $prefix, $pageName = "", $extraparams = "") { $xt->assign("lang_label",true); if(@$_REQUEST["language"]) $_SESSION["language"]=@$_REQUEST["language"]; if( $extraparams ) $extraparams = $extraparams."&"; $var=GoodFieldName(mlang_getcurrentlang())."_langattrs"; $xt->assign($var,"selected"); $is508=isEnableSection508(); if($is508) $xt->assign_section("lang_label","<label for=\"lang\">","</label>"); if($prefix.$pageName == "login") $xt->assign("langselector_attrs","name=lang ".($is508==true ? "id=\"lang\" " : "")."onchange=\"javascript: document.forms[0].btnSubmit.value='';document.forms[0].action = '".GetTableLink($prefix, $pageName)."?".$extraparams."language='+this.options[this.selectedIndex].value;document.forms[0].submit();\""); else $xt->assign("langselector_attrs","name=lang ".($is508==true ? "id=\"lang\" " : "")."onchange=\"javascript: window.location='".GetTableLink($prefix, $pageName)."?".$extraparams."language='+this.options[this.selectedIndex].value\""); }
function SetLangVars($links) { global $xt; $xt->assign("lang_label", true); if (@$_REQUEST["language"]) { $_SESSION["language"] = @$_REQUEST["language"]; } $var = GoodFieldName(mlang_getcurrentlang()) . "_langattrs"; $xt->assign($var, "selected"); $is508 = isEnableSection508(); if ($is508) { $xt->assign_section("lang_label", "<label for=\"lang\">", "</label>"); } if ($links == "login") { $xt->assign("langselector_attrs", "name=lang " . ($is508 == true ? "id=\"lang\" " : "") . "onchange=\"javascript: document.forms[0].btnSubmit.value='';document.forms[0].action = '" . $links . ".php?language='+this.options[this.selectedIndex].value;document.forms[0].submit();\""); } else { $xt->assign("langselector_attrs", "name=lang " . ($is508 == true ? "id=\"lang\" " : "") . "onchange=\"javascript: window.location='" . $links . ".php?language='+this.options[this.selectedIndex].value\""); } }
public function ViewControl($field, $container, $pageObject = null) { $this->useUTF8 = "utf-8" == "utf-8"; $this->field = $field; $this->container = $container; $this->pageObject = $pageObject; $this->is508 = isEnableSection508(); $this->fieldType = $container->pSet->getFieldType($this->field); $this->viewFormat = $container->pSet->getViewFormat($this->field); $this->editFormat = $container->pSet->getEditFormat($this->field); if ($this->pageObject) { $this->searchClauseObj = $this->pageObject->searchClauseObj; if ($this->searchClauseObj) { $this->searchHighlight = $container->searchHighlight && $this->searchClauseObj->bIsUsedSrch; } } }
function searchAssign() { $this->xt->assign("asearch_link", $this->searchPerm); if (isEnableSection508() && $this->searchPerm) { $searchPerm = array(); $searchPerm["begin"] = "<a name=\"skipsearch\"></a>"; } else { $searchPerm = $this->searchPerm; } $this->xt->assign("searchform_block", $searchPerm); if (isMobile()) { $this->xt->assign("searchformmobile_block", $searchPerm); } $this->xt->assign("searchformbuttons_block", $searchPerm); $this->xt->assign("searchform_text", true); $this->xt->assign("searchform_search", true); $srchButtTitle = "Buscar"; $this->xt->assign('searchbutton_attrs', 'id="searchButtTop' . $this->id . '" title="' . $srchButtTitle . '"'); $this->xt->assign('clear_searchbutton_attrs', 'id="clearSearch' . $this->id . '"'); if (isMobile()) { $this->xt->assign("searchform_showall_mobile", true); $this->xt->assign("searchform_clear_search_mobile", true); } else { $this->xt->assign("searchform_showall", true); $this->xt->assign("searchform_clear_search", true); } $showallbutton_attrs = 'id="showAll' . $this->id . '"'; if (!$this->searchClauseObj->isShowAll()) { $showallbutton_attrs .= ' ' . $this->dispNoneStyle; $this->xt->assign("showAllCont_attrs", $this->dispNoneStyle); $this->xt->assign("clearSearchCont_attrs", $this->dispNoneStyle); } $this->xt->assign('showallbutton_attrs', $showallbutton_attrs); }
if(!$reminded) { if($sentMailResults['message']) $strMessage = $sentMailResults['message']; else $strMessage = "User"." ".$strUsernameEmail." "."is not registered."; } } } $xt->assign("submit_attrs","onclick='document.forms.form1.submit();return false;'"); $xt->assign("username_email_label",true); $is508=isEnableSection508(); if($is508) { $xt->assign_section("username_email_label","<label for=\"username_email\">","</label>"); } $xt->assign("username_email_attrs",($is508==true ? "id=\"username_email\" " : "")."value=\"".runner_htmlspecialchars($strUsernameEmail)."\""); if(@$strMessage) { $xt->assign("message","<div class='message rnr-error'>".$strMessage."</div>"); $xt->assign("message_block",true); if($pageObject->isCaptchaOk==1) $_SESSION[$sessPrefix."_count_captcha"]=$_SESSION[$sessPrefix."_count_captcha"]+1; } $pageObject->body["begin"] .= GetBaseScriptsForPage(false);
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()); } }
function getSearchRadio() { $resArr = array(); // search panel radio button assign $resArr['all_checkbox_label'] = array(0=>'', 1=>''); $resArr['any_checkbox_label'] = array(0=>'', 1=>''); if(isEnableSection508()) { $resArr['all_checkbox_label'] = array(0=>"<label for=\"all_checkbox\">", 1=>"</label>"); $resArr['any_checkbox_label'] = array(0=>"<label for=\"any_checkbox\">", 1=>"</label>"); } $id508l="id=\"all_checkbox\" "; $id508n="id=\"any_checkbox\" "; $resArr['all_checkbox'] = $id508l; $resArr['any_checkbox'] = $id508n; $resArr['all_checkbox'] .= "value=\"and\" "; $resArr['any_checkbox'] .= "value=\"or\" "; if(isset($this->globSrchParams['srchTypeRadio']) && $this->globSrchParams['srchTypeRadio']=="or") $resArr['any_checkbox'] .=" checked"; else $resArr['all_checkbox'] .=" checked"; return $resArr; }
function getFormattedRow($value) { $row = array('row_data' => true); $keylink = ""; for ($i = 0; $i < count($this->tKeyFields); $i++) { $keylink .= "&key" . ($i + 1) . "=" . htmlspecialchars(rawurlencode(@$value[$this->tKeyFields[$i]])); } for ($i = 0; $i < count($this->fieldsArr); $i++) { // for change pseudo foreach with condition with PHP for // foreach Fields as @f filter @f.bReportPage && (@TABLE.bReportShowDetails || @TABLE.arrReportGroupFields[strGroupField==@f.strName && nGroupInterval==0].len) order nReportPageOrder $pass = false; for ($j = 0; $j < count($this->repGroupFields); $j++) { if (!$this->fieldsArr[$i]['repPage'] || !($this->repShowDet || $this->repGroupFields[$j]['strGroupField'] == $this->fieldsArr[$i]['name'] && $this->repGroupFields[$j]['groupInterval'] === 0)) { $pass = true; } } if ($pass) { continue; } if ($this->fieldsArr[$i]['viewFormat'] == FORMAT_DATABASE_IMAGE) { if (!$this->forExport) { if ($this->fieldsArr[$i]['showThumb']) { $val .= "<a "; if (IsUseiBox($this->fieldsArr[$i]['name'], $this->tName)) { $val .= " rel='ibox'"; } else { $val .= " target=_blank"; } $val .= " href=\"imager.php?table=" . $this->shortTName . "&field=" . rawurlencode(htmlspecialchars($this->fieldsArr[$i]['name'])) . $keylink . "\">"; $val .= "<img border=0"; if (isEnableSection508()) { $val .= " alt=\"Image from DB\""; } $val .= " src=\"imager.php?table=" . $this->shortTName . "&field=" . rawurlencode(htmlspecialchars($this->fieldsArr[$i]['thumbnail'])) . "&alt=" . rawurlencode(htmlspecialchars($this->fieldsArr[$i]['repPage'])) . $keylink . "\">"; $val .= "</a>"; } else { $val = "<img"; if ($this->fieldsArr[$i]['imageWidth']) { $val .= " width=" . $this->fieldsArr[$i]['imageWidth']; } if ($this->fieldsArr[$i]['imageHeight']) { $val .= " height=" . $this->fieldsArr[$i]['imageHeight']; } $val .= " border=0"; if (isEnableSection508()) { $val .= " alt=\"Image from DB\""; } $val .= " src=\"imager.php?table=" . $this->shortTName . "&field=" . rawurlencode(htmlspecialchars($this->fieldsArr[$i]['name'])) . $keylink . "\">"; } } else { $val = mlang_message("LONG_BINARY"); } } elseif ($this->fieldsArr[$i]['viewFormat'] == FORMAT_FILE_IMAGE) { if (!$this->forExport) { if (CheckImageExtension($value[$this->fieldsArr[$i]['name']])) { if ($this->fieldsArr[$i]['showThumb']) { // show thumbnail $thumbname = $this->fieldsArr[$i]['thumbnail'] . $value[$this->fieldsArr[$i]['name']]; if (substr($this->fieldsArr[$i]['strhlPrefix'], 0, 7) != "http://" && !myfile_exists(getabspath($this->fieldsArr[$i]['strhlPrefix'] . $thumbname))) { $thumbname = $value[$this->fieldsArr[$i]['name']]; } $val = "<a"; if (IsUseiBox($this->fieldsArr[$i]['name'], $this->tName)) { $val .= " rel='ibox'"; } else { $val .= " target=_blank"; } $val .= " href=\"" . htmlspecialchars(AddLinkPrefix($this->fieldsArr[$i]['name'], $value[$this->fieldsArr[$i]['name']])) . "\">"; $val .= "<img"; if ($thumbname == $value[$this->fieldsArr[$i]['name']]) { if ($this->fieldsArr[$i]['imageWidth']) { $val .= " width=" . $this->fieldsArr[$i]['imageWidth']; } if ($this->fieldsArr[$i]['imageHeight']) { $val .= " height=" . $this->fieldsArr[$i]['imageHeight']; } } $val .= " border=0"; if (isEnableSection508()) { $val .= " alt=\"" . htmlspecialchars($value[$this->fieldsArr[$i]['name']]) . "\""; } $val .= " src=\"" . htmlspecialchars(AddLinkPrefix($this->fieldsArr[$i]['name'], $thumbname)) . "\"></a>"; } else { $val = "<img"; if ($this->fieldsArr[$i]['imageWidth']) { $val .= " width=" . $this->fieldsArr[$i]['imageWidth']; } if ($this->fieldsArr[$i]['imageHeight']) { $val .= " height=" . $this->fieldsArr[$i]['imageHeight']; } $val .= " border=0"; if (isEnableSection508()) { $val .= " alt=\"" . htmlspecialchars($value[$this->fieldsArr[$i]['name']]) . "\""; } $val .= " src=\"" . htmlspecialchars(AddLinkPrefix($this->fieldsArr[$i]['name'], $value[$this->fieldsArr[$i]['name']])) . "\">"; } } } else { $val = mlang_message("LONG_BINARY"); } } elseif ($this->fieldsArr[$i]['viewFormat'] == FORMAT_DATABASE_FILE) { if (!$this->forExport) { if ($this->fieldsArr[$i]['fileName']) { $filename = $value[$this->fieldsArr[$i]['fileName']]; if (!$filename) { $filename = "file.bin"; } } else { $filename = "file.bin"; } if (strlen($value[$this->fieldsArr[$i]['name']])) { $val = "<a href=\"getfile.php?table=" . $this->shortTName . "&filename=" . rawurlencode($filename) . "&field=" . rawurlencode(htmlspecialchars($this->fieldsArr[$i]['name'])) . $keylink . "\">"; $val .= htmlspecialchars($filename); $val .= "</a>"; } } else { $val = mlang_message("LONG_BINARY"); } } elseif (($this->fieldsArr[$i]['editFormat'] == EDIT_FORMAT_LOOKUP_WIZARD || $this->fieldsArr[$i]['editFormat'] == EDIT_FORMAT_RADIO) && GetLookupType($this->fieldsArr[$i]['name'], $this->tName) == LT_LOOKUPTABLE) { $val = DisplayLookupWizard($this->fieldsArr[$i]['name'], $value[$this->fieldsArr[$i]['name']], $value, $keylink, $this->mode); } elseif (NeedEncode($this->fieldsArr[$i]['name'], $this->tName)) { $val = ProcessLargeText(GetData($value, $this->fieldsArr[$i]['name'], $this->fieldsArr[$i]['viewFormat']), "field=" . rawurlencode($this->fieldsArr[$i]['name']) . $keylink, "", $this->mode); } else { //$val = GetData($value, $this->fieldsArr[$i]['name'], $this->fieldsArr[$i]['viewFormat']); if ($this->fieldsArr[$i]['viewFormat'] == FORMAT_CHECKBOX && $this->forExport) { $val = GetData($value, $this->fieldsArr[$i]['name'], FORMAT_NONE); } else { $val = GetData($value, $this->fieldsArr[$i]['name'], $this->fieldsArr[$i]['viewFormat']); } } $row[$this->fieldsArr[$i]['goodName'] . "_value"] = $val; } if ($this->repLayout == REPORT_BLOCK) { $row[GoodFieldName('nonewgroup')] = true; } return $row; }