本文整理汇总了PHP中RunnerCipherer::GetFieldName方法的典型用法代码示例。如果您正苦于以下问题:PHP RunnerCipherer::GetFieldName方法的具体用法?PHP RunnerCipherer::GetFieldName怎么用?PHP RunnerCipherer::GetFieldName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RunnerCipherer
的用法示例。
在下文中一共展示了RunnerCipherer::GetFieldName方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getCategoryWhere
/**
* Get a where condition for a dependent lookup
* @param String parentVal The main lookup control's value
* @param String strCategoryFilter The main lookup control's field
* @return String
*/
protected function getCategoryWhere($parentVal, $strCategoryFilter)
{
if (!$this->bUseCategory) {
return "";
}
$strCategoryControl = $this->pageObject->pSetEdit->getCategoryControl($this->field);
$parentValsPlain = $this->pageObject->pSetEdit->multiSelect($strCategoryControl) ? splitvalues($parentVal) : array($parentVal);
$parentVals = array();
foreach ($parentValsPlain as $arKey => $arElement) {
if ($this->lookupType == LT_QUERY) {
$parentVals[$arKey] = $this->ciphererDisplay->MakeDBValue($strCategoryFilter, $arElement, '', true);
} else {
$parentVals[$arKey] = make_db_value($strCategoryControl, $arElement, '', '', $this->tName);
}
}
$categoryWhere = array();
foreach ($parentVals as $arKey => $arValue) {
$condition = $arValue === "null" ? " is null" : "=" . $arValue;
if ($this->lookupType == LT_QUERY) {
$categoryWhere[] = $this->ciphererDisplay->GetFieldName(RunnerPage::_getFieldSQL($strCategoryFilter, $this->lookupConnection, $this->lookupPSet), $strCategoryFilter) . $condition;
} else {
$categoryWhere[] = $this->lookupConnection->addFieldWrappers($strCategoryFilter) . $condition;
}
}
return count($categoryWhere) == 1 ? $categoryWhere[0] : "(" . implode(" OR ", $categoryWhere) . ")";
}
示例2: GetLWWhere
}
$lookupQueryObj->ReplaceFieldsWithDummies($lookupPSet->getBinaryFieldsIndices());
} else {
$LookupSQLTable = "SELECT ";
$lwLinkField = $lookupConnection->addFieldWrappers($gSettings->getLinkField($f));
if ($gSettings->isLookupUnique($f)) {
$LookupSQLTable .= "DISTINCT ";
}
$LookupSQLTable .= $cipherer->GetLookupFieldName($lwLinkField, $f, null, true);
if ($lookupConnection->dbType == nDATABASE_MSSQLServer) {
if ($strUniqueOrderBy && $gSettings->isLookupUnique($f)) {
$LookupSQLTable .= "," . $lookupConnection->addFieldWrappers($strUniqueOrderBy);
}
}
if (!$linkAndDisplaySame) {
$LookupSQLTable .= "," . ($lwDisplayField == $lwLinkField ? $cipherer->GetFieldName($lwDisplayField, $f, true) : $lwDisplayField);
}
$LookupSQLTable .= " FROM " . $lookupConnection->addTableWrappers($lookupTable) . " ";
}
$strLookupWhere = GetLWWhere($f, $pageType, $strTableName);
if ($strLookupWhere) {
$strLookupWhere = " (" . $strLookupWhere . ") AND ";
}
if ($LookupType == LT_QUERY) {
if ($gSettings->getCustomDisplay($f)) {
$likeField = $searchByLinkField ? $linkFieldName : $displayFieldName;
} else {
$likeField = RunnerPage::_getFieldSQLDecrypt($searchByLinkField ? $linkFieldName : $displayFieldName, $lookupConnection, $lookupPSet, $cipherer);
}
} else {
$likeField = $cipherer->GetFieldName($lwDisplayField, $f);
示例3: buildLookupSQL
function buildLookupSQL($pageType, $field, $table, $parentVal, $childVal = "", $doCategoryFilter = true, $doValueFilter = false, $addCategoryField = false, $doWhereFilter = true, $oneRecordMode = false, $doValueFilterByLinkField = false)
{
global $strTableName;
if (!strlen($table)) {
$table = $strTableName;
}
$pSet = new ProjectSettings($table, $pageType);
// read settings
$nLookupType = $pSet->getLookupType($field);
if ($nLookupType != LT_LOOKUPTABLE && $nLookupType != LT_QUERY) {
return "";
}
$lookupTable = $pSet->getLookupTable($field);
$displayFieldName = $pSet->getDisplayField($field);
$linkFieldName = $pSet->getLinkField($field);
$linkAndDisplaySame = $displayFieldName == $linkFieldName;
$bUnique = $pSet->isLookupUnique($field);
$strLookupWhere = GetLWWhere($field, $pageType, $table);
$strOrderBy = $pSet->getLookupOrderBy($field);
if (strlen($strOrderBy)) {
$strOrderBy = GetFullFieldName($strOrderBy, $lookupTable);
if ($pSet->isLookupDesc($field)) {
$strOrderBy .= ' DESC';
}
}
$bDesc = $pSet->isLookupDesc($field);
$strCategoryFilter = $pSet->getCategoryFilter($field);
if ($nLookupType == LT_QUERY) {
$lookupPSet = new ProjectSettings($lookupTable, $pageType);
$cipherer = new RunnerCipherer($lookupTable, $lookupPSet);
} else {
$cipherer = new RunnerCipherer($table, $pSet);
}
if ($doCategoryFilter) {
if ($nLookupType == LT_QUERY) {
$parentVal = $cipherer->MakeDBValue($strCategoryFilter, $parentVal, "", $lookupTable, true);
} else {
$parentVal = make_db_value($pSet->getCategoryControl($field), $parentVal, '', '', $table);
}
}
if ($doValueFilter) {
if ($pageType != PAGE_SEARCH || $doValueFilterByLinkField) {
if ($nLookupType == LT_QUERY) {
$childWhereField = $pSet->getLWLinkField($field, false);
} else {
$childWhereField = $pSet->getLWLinkField($field, true);
}
} else {
if ($nLookupType == LT_QUERY) {
$childWhereField = $pSet->getLWDisplayField($field, false);
} else {
$childWhereField = $pSet->getLWDisplayField($field, true);
}
}
if ($nLookupType == LT_QUERY) {
$childVal = $cipherer->MakeDBValue($childWhereField, $childVal, "", $lookupTable, true);
} else {
if ($linkAndDisplaySame) {
$childVal = make_db_value($field, $childVal, '', '', $table);
} else {
$childVal = add_db_quotes($field, $childVal, $table, 200);
}
}
}
// build Where clause
$categoryWhere = "";
$childWhere = "";
if ($pSet->useCategory($field) && $doCategoryFilter) {
$condition = "=" . $parentVal;
if ($parentVal === "null") {
$condition = " is null";
}
if ($nLookupType == LT_QUERY) {
$categoryWhere = $cipherer->GetFieldName(AddFieldWrappers($strCategoryFilter), $strCategoryFilter) . $condition;
} else {
$categoryWhere = AddFieldWrappers($strCategoryFilter) . $condition;
}
}
if ($doValueFilter) {
$condition = "=" . $childVal;
if ($childVal === "null") {
$condition = " is null";
}
if ($nLookupType == LT_QUERY) {
if ($pageType != PAGE_SEARCH || $pSet->lookupControlType($field) == LCT_LIST || $doValueFilterByLinkField) {
$childWhere = GetFullFieldName($pSet->getLinkField($field), $lookupTable, false) . $condition;
} else {
if (!$pSet->getCustomDisplay($field)) {
$childWhere = $cipherer->GetFieldName($lookupPSet->getFullNameField($displayFieldName), $field) . $condition;
} else {
$childWhere = $pSet->getDisplayField($field) . $condition;
}
}
} else {
if ($pageType != PAGE_SEARCH || $doValueFilterByLinkField) {
$childWhere = $pSet->getLWLinkField($field, true) . $condition;
} else {
$childWhere = $pSet->getLWDisplayField($field, true) . $condition;
}
}
//.........这里部分代码省略.........
示例4: GetFullFieldName
/**
* DEPRECATED! Use RunnerPage::_getFieldSQLDecrypt instead
* Return the full database field original name
*
* @param string $field
* @param string $table The datasource table name
* @param boolean $addAs OPTIONAL
*
* @return String
* @intellisense
* @deprecated
*/
function GetFullFieldName($field, $table = "", $addAs = true, $connection = null)
{
global $strTableName, $cman;
if ($table == "") {
$table = $strTableName;
}
if (!$connection) {
$connection = $cman->byTable($table);
}
$pSet = new ProjectSettings($table);
$fname = RunnerPage::_getFieldSQL($field, $connection, $pSet);
if ($pSet->hasEncryptedFields() && !isEncryptionByPHPEnabled()) {
$cipherer = new RunnerCipherer($table);
return $cipherer->GetFieldName($fname, $field) . ($cipherer->isFieldEncrypted($field) && $addAs ? " as " . $connection->addFieldWrappers($field) : "");
}
return $fname;
}
示例5: GetFullFieldName
/**
* return the full database field original name
* @intellisense
*/
function GetFullFieldName($field, $table = "", $addAs = true)
{
if($table == "")
{
global $strTableName;
$table = $strTableName;
}
$pSet = new ProjectSettings($table);
$fname = $pSet->getFullNameField($field);
if($pSet->hasEncryptedFields() && !isEncryptionByPHPEnabled())
{
$cipherer = new RunnerCipherer($table);
return $cipherer->GetFieldName($fname, $field)
.($cipherer->isFieldEncrypted($field) && $addAs ? " as ".AddFieldWrappers($field) : "");
}
return $fname;
}