本文整理汇总了PHP中RunnerCipherer::isFieldPHPEncrypted方法的典型用法代码示例。如果您正苦于以下问题:PHP RunnerCipherer::isFieldPHPEncrypted方法的具体用法?PHP RunnerCipherer::isFieldPHPEncrypted怎么用?PHP RunnerCipherer::isFieldPHPEncrypted使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RunnerCipherer
的用法示例。
在下文中一共展示了RunnerCipherer::isFieldPHPEncrypted方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getSearchOptions
/**
* Form the control specified search options array and built the control's search options markup
* @param String selOpt The search option value
* @param Boolean not It indicates if the search option negation is set
* @param Boolean both It indicates if the control needs 'NOT'-options
* @return String A string containing options markup
*/
function getSearchOptions($selOpt, $not, $both)
{
$optionsArray = array();
if ($this->multiselect) {
$optionsArray[] = CONTAINS;
} else {
$this->ciphererLink = $this->pageObject->cipherer;
if ($this->lookupType == LT_QUERY) {
$this->ciphererDisplay = new RunnerCipherer($this->lookupTable);
} else {
$this->ciphererDisplay = $this->pageObject->cipherer;
}
$this->isDisplayFieldEncrypted = false;
if ($this->lookupType != LT_LISTOFVALUES) {
$this->isDisplayFieldEncrypted = ($this->lookupType == LT_QUERY || $this->linkAndDisplaySame) && $this->ciphererDisplay->isFieldPHPEncrypted($this->lookupType == LT_QUERY ? $this->displayFieldName : $this->field);
}
if ($this->LCType == LCT_AJAX && !$this->isDisplayFieldEncrypted) {
if ($this->isSearchByDispalyedFieldAllowed() || $this->linkAndDisplaySame) {
$optionsArray[] = CONTAINS;
$optionsArray[] = STARTS_WITH;
}
$optionsArray[] = MORE_THAN;
$optionsArray[] = LESS_THAN;
$optionsArray[] = BETWEEN;
}
if (($this->LCType == LCT_LIST || $this->LCType == LCT_DROPDOWN) && $this->isAdditionalControlRequired()) {
$optionsArray[] = CONTAINS;
$optionsArray[] = STARTS_WITH;
}
}
$optionsArray[] = EQUALS;
$optionsArray[] = EMPTY_SEARCH;
if ($both) {
if ($this->multiselect) {
$optionsArray[] = NOT_CONTAINS;
} else {
if ($this->LCType == LCT_AJAX && !$this->isDisplayFieldEncrypted) {
if ($this->isSearchByDispalyedFieldAllowed() || $this->linkAndDisplaySame) {
$optionsArray[] = NOT_CONTAINS;
$optionsArray[] = NOT_STARTS_WITH;
}
$optionsArray[] = NOT_MORE_THAN;
$optionsArray[] = NOT_LESS_THAN;
$optionsArray[] = NOT_BETWEEN;
}
if (($this->LCType == LCT_LIST || $this->LCType == LCT_DROPDOWN) && $this->isAdditionalControlRequired()) {
$optionsArray[] = NOT_CONTAINS;
$optionsArray[] = NOT_STARTS_WITH;
}
}
$optionsArray[] = NOT_EQUALS;
$optionsArray[] = NOT_EMPTY;
}
return $this->buildSearchOptions($optionsArray, $selOpt, $not, $both);
}
示例2: StrWhereAdv
function StrWhereAdv($strField, $SearchFor, $strSearchOption, $SearchFor2, $etype, $isSuggest)
{
global $strTableName;
$pSet = new ProjectSettings($strTableName, PAGE_SEARCH);
$cipherer = new RunnerCipherer($strTableName);
$type = $pSet->getFieldType($strField);
$isOracle = false;
$ismssql = false;
$isdb2 = false;
$btexttype = IsTextType($type);
$isMysql = false;
if (IsBinaryType($type)) {
return "";
}
if ($strSearchOption == 'Empty') {
if (IsCharType($type) && (!$ismssql || !$btexttype) && !$isOracle) {
return "(" . GetFullFieldNameForInsert($pSet, $strField) . " is null or " . GetFullFieldNameForInsert($pSet, $strField) . "='')";
} elseif ($ismssql && $btexttype) {
return "(" . GetFullFieldNameForInsert($pSet, $strField) . " is null or " . GetFullFieldNameForInsert($pSet, $strField) . " LIKE '')";
} else {
return GetFullFieldNameForInsert($pSet, $strField) . " is null";
}
}
$like = "ilike";
if ($pSet->getEditFormat($strField) == EDIT_FORMAT_LOOKUP_WIZARD) {
if ($pSet->multiSelect($strField)) {
$SearchFor = splitvalues($SearchFor);
} else {
$SearchFor = array($SearchFor);
}
$ret = "";
foreach ($SearchFor as $value) {
if (!($value == "null" || $value == "Null" || $value == "")) {
if (strlen($ret)) {
$ret .= " or ";
}
if ($strSearchOption == "Equals") {
$value = make_db_value($strField, $value);
if (!($value == "null" || $value == "Null")) {
$ret .= GetFullFieldName($strField, "", false) . '=' . $value;
}
} elseif ($isSuggest) {
$ret .= " " . GetFullFieldName($strField, "", false) . " " . $like . " " . db_prepare_string('%' . $value . '%');
} else {
if (strpos($value, ",") !== false || strpos($value, '"') !== false) {
$value = '"' . str_replace('"', '""', $value) . '"';
}
if ($isMysql) {
$value = str_replace('\\\\', '\\\\\\\\', $value);
}
//for search by multiply Lookup wizard field
$ret .= GetFullFieldName($strField, "", false) . " = " . db_prepare_string($value);
$ret .= " or " . GetFullFieldName($strField, "", false) . " " . $like . " " . db_prepare_string("%," . $value . ",%");
$ret .= " or " . GetFullFieldName($strField, "", false) . " " . $like . " " . db_prepare_string("%," . $value);
$ret .= " or " . GetFullFieldName($strField, "", false) . " " . $like . " " . db_prepare_string($value . ",%");
}
}
}
if (strlen($ret)) {
$ret = "(" . $ret . ")";
}
return $ret;
}
if ($pSet->GetEditFormat($strField) == EDIT_FORMAT_CHECKBOX) {
if ($SearchFor == "none") {
return "";
}
if (NeedQuotes($type)) {
$isOracle = false;
if ($SearchFor == "on") {
$whereStr = "(" . GetFullFieldName($strField) . "<>'0' ";
if (!$isOracle) {
$whereStr .= " and " . GetFullFieldName($strField) . "<>'' ";
}
$whereStr .= " and " . GetFullFieldName($strField) . " is not null)";
return $whereStr;
} elseif ($SearchFor == "off") {
$whereStr = "(" . GetFullFieldName($strField) . "='0' ";
if (!$isOracle) {
$whereStr .= " or " . GetFullFieldName($strField) . "='' ";
}
$whereStr .= " or " . GetFullFieldName($strField) . " is null)";
}
} else {
if ($SearchFor == "on") {
return "(" . GetFullFieldName($strField) . "<>0 and " . GetFullFieldName($strField) . " is not null)";
} elseif ($SearchFor == "off") {
return "(" . GetFullFieldName($strField) . "=0 or " . GetFullFieldName($strField) . " is null)";
}
}
}
$value1 = $cipherer->MakeDBValue($strField, $SearchFor, $etype, "", true);
$value2 = false;
$cleanvalue2 = false;
if ($strSearchOption == "Between") {
$cleanvalue2 = prepare_for_db($strField, $SearchFor2, $etype);
$value2 = make_db_value($strField, $SearchFor2, $etype);
}
if ($strSearchOption != "Contains" && $strSearchOption != "Starts with" && ($value1 === "null" || $value2 === "null") && !$cipherer->isFieldPHPEncrypted($strField)) {
return "";
//.........这里部分代码省略.........