searchClauseObj = &$this->pageObj->searchClauseObj; $this->id = $this->pageObj->id; $this->pSet = $this->pageObj->pSetSearch; $this->tName = $this->pageObj->searchTableName; $this->xt = $this->pageObj->xt; $this->panelState = $this->searchClauseObj->getSrchPanelAttrs(); $this->isUseAjaxSuggest = $this->pSet->isUseAjaxSuggest(); $this->searchControlBuilder = new PanelSearchControl($this->id, $this->tName, $this->searchClauseObj, $this->pageObj); // get search fields if not passed to contructor if (!isset($params['panelSearchFields'])) { $this->panelSearchFields = $this->pSet->getPanelSearchFields(); } if (!isset($params['allSearchFields'])) { $this->allSearchFields = $this->pSet->getAllSearchFields(); } } function getSearchPerm($tName = "") { global $isGroupSecurity; $tName = $tName ? $tName : $this->tName; if(!$isGroupSecurity) return true; $strPerm = GetUserPermissions($tName); return (strpos($strPerm, "S") !== false); } /** * Main method, call to build search panel * */ function buildSearchPanel() { $srchPanelAttrs = $this->searchClauseObj->getSrchPanelAttrs(); $this->searchAssign(); } function searchAssign() { $this->xt->assign("asearch_link", $this->searchPerm); if(isEnableSection508() && $this->searchPerm) { $searchPerm=array(); $searchPerm["begin"]=""; } 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 = mlang_message("SEARCH"); $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); } } ?>