本文整理汇总了PHP中ProjectSettings::getGoogleLikeFields方法的典型用法代码示例。如果您正苦于以下问题:PHP ProjectSettings::getGoogleLikeFields方法的具体用法?PHP ProjectSettings::getGoogleLikeFields怎么用?PHP ProjectSettings::getGoogleLikeFields使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ProjectSettings
的用法示例。
在下文中一共展示了ProjectSettings::getGoogleLikeFields方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: simpleSearchFieldCombo
function simpleSearchFieldCombo($fNamesArr, $selOpt)
{
$options = "";
$settings = new ProjectSettings($this->tName);
if (sizeof($settings->getGoogleLikeFields()) != 0) {
$options = '<option value="" >' . "Any field" . '</option>';
}
foreach ($fNamesArr as $fName) {
$fLabel = GetFieldLabel(GoodFieldName($this->tName), GoodFieldName($fName));
$options .= '<option value="' . $fName . '" ' . ($selOpt == $fName ? 'selected' : '') . '>' . $fLabel . '</option>';
}
return $options;
}
示例2: postvalue
$searchFor = postvalue('searchFor');
// if nothing to search
if ($searchFor == '') {
echo printJSON(array('success' => true, 'result' => ''));
return;
}
$_connection = $cman->byTable($strTableName);
// array of vals
$response = array();
$searchOpt = postvalue("start") ? "Starts with" : "Contains";
$searchField = GoodFieldName(postvalue('searchField'));
$strSecuritySql = SecuritySQL("Search", $strTableName);
$numberOfSuggests = GetGlobalData("searchSuggestsNumber", 10);
$pSet = new ProjectSettings($strTableName, PAGE_SEARCH);
if ($searchField == "") {
$allSearchFields = $pSet->getGoogleLikeFields();
} else {
// array of fields which were added in wizard for search
$allSearchFields = $pSet->getAllSearchFields();
}
require_once getabspath('classes/controls/EditControlsContainer.php');
$detailKeys = array();
$masterWhere = "";
$cipherer = new RunnerCipherer($strTableName);
$controls = new EditControlsContainer(null, $pSet, PAGE_LIST, $cipherer);
if (@$_SESSION[$strTableName . "_mastertable"] != "") {
$masterTablesInfoArr = $pSet->getMasterTablesArr($strTableName);
for ($i = 0; $i < count($masterTablesInfoArr); $i++) {
if ($_SESSION[$strTableName . "_mastertable"] != $masterTablesInfoArr[$i]['mDataSourceTable']) {
continue;
}
示例3: getGoogleLikeFieldsFromDashboard
/**
* Get google like fields from dashboard
* @return Array
*/
function getGoogleLikeFieldsFromDashboard()
{
$result = array();
$dashSettings = new ProjectSettings($this->dashTName, PAGE_DASHBOARD);
$dashGoogleLikeFields = $dashSettings->getGoogleLikeFields();
$dashSearchFields = $dashSettings->getDashboardSearchFields();
foreach ($dashGoogleLikeFields as $i => $field) {
foreach ($dashSearchFields[$field] as $j => $data) {
if ($data['table'] != $this->tName) {
continue;
}
$result[] = $data['field'];
}
}
return $result;
}
示例4: RunnerCipherer
$sessionPrefix = $strTableName;
$cipherer = new RunnerCipherer($strTableName);
$pSet = new ProjectSettings($strTableName, PAGE_SEARCH);
// array of fields which were added in wizard for search
$allSearchFields = $pSet->getAllSearchFields();
// SearchClause class stuff
if (isset($_SESSION[$sessionPrefix . '_advsearch'])) {
$searchClauseObj = unserialize($_SESSION[$sessionPrefix . '_advsearch']);
} else {
$params = array();
$params['tName'] = $strTableName;
$params['cipherer'] = $cipherer;
$params['searchFieldsArr'] = $allSearchFields;
$params['sessionPrefix'] = $sessionPrefix;
$params['panelSearchFields'] = $pSet->getPanelSearchFields();
$params['googleLikeFields'] = $pSet->getGoogleLikeFields();
$searchClauseObj = new SearchClause($params);
}
// array of vals
$response = array();
if (postvalue("start")) {
$suggestAllContent = false;
}
$searchFor = postvalue('searchFor');
$searchField = GoodFieldName(postvalue('searchField'));
$strSecuritySql = SecuritySQL("Search", $strTableName);
$detailKeys = array();
$masterWhere = "";
if ($searchField == "") {
$allSearchFields = $pSet->getGoogleLikeFields();
}
示例5: SearchClause
function SearchClause(&$params)
{
global $strTableName;
$this->searchOptions["contains"] = array("option" => "Contains", "not" => false);
$this->searchOptions["equals"] = array("option" => "Equals", "not" => false);
$this->searchOptions["startswith"] = array("option" => "Starts with", "not" => false);
$this->searchOptions["morethan"] = array("option" => "More than", "not" => false);
$this->searchOptions["lessthan"] = array("option" => "Less than", "not" => false);
$this->searchOptions["between"] = array("option" => "Between", "not" => false);
$this->searchOptions["empty"] = array("option" => "Empty", "not" => false);
$this->searchOptions["notcontain"] = array("option" => "Contains", "not" => true);
$this->searchOptions["notequal"] = array("option" => "Equals", "not" => true);
$this->searchOptions["notstartwith"] = array("option" => "Starts with", "not" => true);
$this->searchOptions["notmorethan"] = array("option" => "More than", "not" => true);
$this->searchOptions["notlessthan"] = array("option" => "Less than", "not" => true);
$this->searchOptions["notbetween"] = array("option" => "Between", "not" => true);
$this->searchOptions["notempty"] = array("option" => "Empty", "not" => true);
$this->tName = $params['tName'] ? $params['tName'] : $strTableName;
$this->sessionPrefix = $params['sessionPrefix'] ? $params['sessionPrefix'] : $this->tName;
$this->searchFieldsArr = $params['searchFieldsArr'];
$this->cipherer = $params['cipherer'];
$settings = new ProjectSettings($this->tName, PAGE_SEARCH);
$this->panelSearchFields = $params['panelSearchFields'] ? $params['panelSearchFields'] : $settings->getPanelSearchFields();
$this->googleLikeFields = $params['googleLikeFields'] ? $params['googleLikeFields'] : $settings->getGoogleLikeFields();
}