本文整理匯總了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();
}