当前位置: 首页>>代码示例>>PHP>>正文


PHP RunnerPage::_getFieldSQLDecrypt方法代码示例

本文整理汇总了PHP中RunnerPage::_getFieldSQLDecrypt方法的典型用法代码示例。如果您正苦于以下问题:PHP RunnerPage::_getFieldSQLDecrypt方法的具体用法?PHP RunnerPage::_getFieldSQLDecrypt怎么用?PHP RunnerPage::_getFieldSQLDecrypt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在RunnerPage的用法示例。


在下文中一共展示了RunnerPage::_getFieldSQLDecrypt方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: DisplayMasterTableInfo_GE_ESTADO_CIVIL

function DisplayMasterTableInfo_GE_ESTADO_CIVIL($params)
{
    global $cman;
    $detailtable = $params["detailtable"];
    $keys = $params["keys"];
    $xt = new Xtempl();
    $tName = "GE.ESTADO_CIVIL";
    $settings = new ProjectSettings($tName, PAGE_LIST);
    $cipherer = new RunnerCipherer($tName);
    $connection = $cman->byTable($tName);
    $masterQuery = $settings->getSQLQuery();
    $viewControls = new ViewControlsContainer($settings, PAGE_LIST);
    $where = "";
    $keysAssoc = array();
    $showKeys = "";
    if ($detailtable == "GE.PERSONA_DISPONIBLE") {
        $keysAssoc["ESTADO_CIVIL_ID"] = $keys[1 - 1];
        $where .= RunnerPage::_getFieldSQLDecrypt("ESTADO_CIVIL_ID", $connection, $settings, $cipherer) . "=" . $cipherer->MakeDBValue("ESTADO_CIVIL_ID", $keys[1 - 1], "", true);
        $keyValue = $viewControls->showDBValue("ESTADO_CIVIL_ID", $keysAssoc);
        $showKeys .= " " . GetFieldLabel("GE_ESTADO_CIVIL", "ESTADO_CIVIL_ID") . ": " . $keyValue;
        $xt->assign('showKeys', $showKeys);
    }
    if (!$where) {
        return;
    }
    $str = SecuritySQL("Search");
    if (strlen($str)) {
        $where .= " and " . $str;
    }
    $strWhere = whereAdd($masterQuery->WhereToSql(), $where);
    if (strlen($strWhere)) {
        $strWhere = " where " . $strWhere . " ";
    }
    $strSQL = $masterQuery->HeadToSql() . ' ' . $masterQuery->FromToSql() . $strWhere . $masterQuery->TailToSql();
    LogInfo($strSQL);
    $data = $cipherer->DecryptFetchedArray($connection->query($strSQL)->fetchAssoc());
    if (!$data) {
        return;
    }
    // reassign pagetitlelabel function adding extra params
    $xt->assign_function("pagetitlelabel", "xt_pagetitlelabel", array("record" => $data, "settings" => $settings));
    $keylink = "";
    $keylink .= "&key1=" . runner_htmlspecialchars(rawurlencode(@$data["ESTADO_CIVIL_ID"]));
    $xt->assign("ESTADO_CIVIL_ID_mastervalue", $viewControls->showDBValue("ESTADO_CIVIL_ID", $data, $keylink));
    $format = $settings->getViewFormat("ESTADO_CIVIL_ID");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("ESTADO_CIVIL_ID"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("ESTADO_CIVIL_ID_class", $class);
    // add class for field header as field value
    $xt->assign("NOMBRE_mastervalue", $viewControls->showDBValue("NOMBRE", $data, $keylink));
    $format = $settings->getViewFormat("NOMBRE");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("NOMBRE"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("NOMBRE_class", $class);
    // add class for field header as field value
    $xt->assign("FEC_CREACION_mastervalue", $viewControls->showDBValue("FEC_CREACION", $data, $keylink));
    $format = $settings->getViewFormat("FEC_CREACION");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("FEC_CREACION"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("FEC_CREACION_class", $class);
    // add class for field header as field value
    $xt->assign("USUARIO_CREACION_mastervalue", $viewControls->showDBValue("USUARIO_CREACION", $data, $keylink));
    $format = $settings->getViewFormat("USUARIO_CREACION");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
//.........这里部分代码省略.........
开发者ID:kcallow,项目名称:MatchMe,代码行数:101,代码来源:GE_ESTADO_CIVIL_masterlist.php

示例2: DisplayMasterTableInfo_BranchMaster

function DisplayMasterTableInfo_BranchMaster($params)
{
    global $cman;
    $detailtable = $params["detailtable"];
    $keys = $params["keys"];
    $xt = new Xtempl();
    $tName = "BranchMaster";
    $xt->eventsObject = getEventObject($tName);
    $settings = new ProjectSettings($tName, PAGE_LIST);
    $cipherer = new RunnerCipherer($tName);
    $connection = $cman->byTable($tName);
    $masterQuery = $settings->getSQLQuery();
    $viewControls = new ViewControlsContainer($settings, PAGE_LIST);
    $where = "";
    $keysAssoc = array();
    $showKeys = "";
    if ($detailtable == "Fact_SalesTransaction") {
        $keysAssoc["GroupID"] = $keys[1 - 1];
        $keysAssoc["CompanyID"] = $keys[2 - 1];
        $where .= RunnerPage::_getFieldSQLDecrypt("GroupID", $connection, $settings, $cipherer) . "=" . $cipherer->MakeDBValue("GroupID", $keys[1 - 1], "", true);
        $keyValue = $viewControls->showDBValue("GroupID", $keysAssoc);
        $showKeys .= " " . GetFieldLabel("BranchMaster", "GroupID") . ": " . $keyValue;
        $where .= " and ";
        $showKeys .= " , ";
        $where .= RunnerPage::_getFieldSQLDecrypt("CompanyID", $connection, $settings, $cipherer) . "=" . $cipherer->MakeDBValue("CompanyID", $keys[2 - 1], "", true);
        $keyValue = $viewControls->showDBValue("CompanyID", $keysAssoc);
        $showKeys .= " " . GetFieldLabel("BranchMaster", "CompanyID") . ": " . $keyValue;
        $xt->assign('showKeys', $showKeys);
    }
    if (!$where) {
        return;
    }
    $str = SecuritySQL("Search", $tName);
    if (strlen($str)) {
        $where .= " and " . $str;
    }
    $strWhere = whereAdd($masterQuery->WhereToSql(), $where);
    if (strlen($strWhere)) {
        $strWhere = " where " . $strWhere . " ";
    }
    $strSQL = $masterQuery->HeadToSql() . ' ' . $masterQuery->FromToSql() . $strWhere . $masterQuery->TailToSql();
    LogInfo($strSQL);
    $data = $cipherer->DecryptFetchedArray($connection->query($strSQL)->fetchAssoc());
    if (!$data) {
        return;
    }
    // reassign pagetitlelabel function adding extra params
    $xt->assign_function("pagetitlelabel", "xt_pagetitlelabel", array("record" => $data, "settings" => $settings));
    $keylink = "";
    $xt->assign("BranchCloudFolder_mastervalue", $viewControls->showDBValue("BranchCloudFolder", $data, $keylink));
    $format = $settings->getViewFormat("BranchCloudFolder");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("BranchCloudFolder"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("BranchCloudFolder_class", $class);
    // add class for field header as field value
    $xt->assign("BranchLastSyncDate_mastervalue", $viewControls->showDBValue("BranchLastSyncDate", $data, $keylink));
    $format = $settings->getViewFormat("BranchLastSyncDate");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("BranchLastSyncDate"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("BranchLastSyncDate_class", $class);
    // add class for field header as field value
    $xt->assign("l_mastervalue", $viewControls->showDBValue("l", $data, $keylink));
    $format = $settings->getViewFormat("l");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("l"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("l_class", $class);
    // add class for field header as field value
//.........这里部分代码省略.........
开发者ID:ryanblanchard,项目名称:Dashboard,代码行数:101,代码来源:BranchMaster_masterlist.php

示例3: getFieldSQLDecrypt

 public function getFieldSQLDecrypt()
 {
     return RunnerPage::_getFieldSQLDecrypt($this->field, $this->connection, $this->pageObject->pSetEdit, $this->pageObject->cipherer);
 }
开发者ID:kcallow,项目名称:MatchMe,代码行数:4,代码来源:Control.php

示例4: GetLWWhere

         }
     }
     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);
 }
 if ($searchByLinkField) {
     $likeConditionField = $LookupType == LT_QUERY ? $linkFieldName : $f;
 } else {
     $likeConditionField = $LookupType == LT_QUERY ? $displayFieldName : $f;
 }
 $likeWheres = array();
 foreach ($values as $fieldValue) {
     if ($LookupType == LT_QUERY) {
         $likeWheres[] = $likeField . $lookupCipherer->GetLikeClause($likeConditionField, $fieldValue);
     } else {
         $likeWheres[] = $likeField . $cipherer->GetLikeClause($likeConditionField, $fieldValue);
开发者ID:kcallow,项目名称:MatchMe,代码行数:31,代码来源:lookupsuggest.php

示例5: Chart


//.........这里部分代码省略.........
         foreach ($this->arrDataColor as $ind => $val) {
             if ($ind == 0) {
                 $this->arrAxesColor = "#000000";
             } else {
                 $this->arrAxesColor = "#" . $this->arrDataColor[$ind];
             }
         }
     } else {
         foreach ($this->arrOHLC_color as $ind => $val) {
             if ($ind == 0) {
                 $this->arrAxesColor = "#000000";
             } else {
                 $this->arrAxesColor = "#" . $this->arrOHLC_color[$ind];
             }
         }
     }
     // prepare search params
     $gQuery = $this->pSet->getSQLQuery();
     $masterWhere = "";
     if (!$this->dashChart) {
         $masterTable = $_SESSION[$this->sessionPrefix . "_mastertable"];
         $detailKeysByM = $this->pSet->getDetailKeysByMasterTable($masterTable);
         if (count($detailKeysByM)) {
             for ($i = 0; $i < count($detailKeysByM); $i++) {
                 if ($i != 0) {
                     $masterWhere .= " and ";
                 }
                 if ($this->cipherer && isEncryptionByPHPEnabled()) {
                     $mValue = $this->cipherer->MakeDBValue($detailKeysByM[$i], $_SESSION[$this->sessionPrefix . "_masterkey" . ($i + 1)]);
                 } else {
                     $mValue = make_db_value($detailKeysByM[$i], $_SESSION[$this->sessionPrefix . "_masterkey" . ($i + 1)]);
                 }
                 if (strlen($mValue) != 0) {
                     $masterWhere .= RunnerPage::_getFieldSQLDecrypt($detailKeysByM[$i], $this->connection, $this->pSet, $this->cipherer) . "=" . $mValue;
                 } else {
                     $masterWhere .= "1=0";
                 }
             }
         }
     }
     $strWhereClause = "";
     $searchHavingClause = "";
     $strSearchCriteria = "and";
     global $strTableName;
     // search where for basic charts
     if (!$this->webchart) {
         if (!$this->chartPreview && isset($_SESSION[$this->sessionPrefix . '_advsearch'])) {
             $searchClauseObj = SearchClause::UnserializeObject($_SESSION[$this->sessionPrefix . '_advsearch']);
             include_once getabspath('classes/controls/EditControlsContainer.php');
             $editControls = new EditControlsContainer(null, $this->pSet, PAGE_SEARCH, $this->cipherer);
             $whereComponents = RunnerPage::sGetWhereComponents($gQuery, $this->pSet, $searchClauseObj, $editControls, $this->connection);
             $strWhereClause = $whereComponents["searchWhere"];
             foreach ($whereComponents["filterWhere"] as $fWhere) {
                 $strWhereClause = whereAdd($strWhereClause, $fWhere);
             }
             $searchHavingClause = $whereComponents["searchHaving"];
             foreach ($whereComponents["filterHaving"] as $fHaving) {
                 $searchHavingClause = whereAdd($searchHavingClause, $fHaving);
             }
             $strSearchCriteria = $whereComponents["searchUnionRequired"] ? "or" : "and";
         }
     } else {
         if ($this->table_type != "project") {
             $strTableName = "webchart" . $this->cname;
         }
         $strWhereClause = CalcSearchParam($this->table_type != "project");
开发者ID:ryanblanchard,项目名称:Dashboard,代码行数:67,代码来源:charts.php

示例6: ProjectSettings

$pSet = new ProjectSettings($strTableName, $pageType);
$denyChecking = $pSet->allowDuplicateValues($fieldName);
$denyChecking = $denyChecking && ($strTableName != "DashboardUsers" || $fieldName != $cUserNameField && $fieldName != $cEmailField);
if ($denyChecking) {
    $returnJSON = array("success" => false, "error" => "Duplicated values are allowed");
    echo printJSON($returnJSON);
    return;
}
$cipherer = new RunnerCipherer($strTableName, $pSet);
if ($cipherer->isFieldEncrypted($fieldName)) {
    $value = $cipherer->MakeDBValue($fieldName, $value, $fieldControlType, true);
} else {
    $value = make_db_value($fieldName, $value, $fieldControlType, "", $strTableName);
}
if ($value == "null") {
    $fieldSQL = RunnerPage::_getFieldSQL($fieldName, $_connection, $pSet);
} else {
    $fieldSQL = RunnerPage::_getFieldSQLDecrypt($fieldName, $_connection, $pSet, $cipherer);
}
$where = $fieldSQL . ($value == "null" ? ' is ' : '=') . $value;
$sql = "SELECT count(*) from " . $_connection->addTableWrappers($pSet->getOriginalTableName()) . " where " . $where;
$qResult = $_connection->query($sql);
if (!$qResult || !($data = $qResult->fetchNumeric())) {
    $returnJSON = array("success" => false, "error" => "Error: Wrong SQL query");
    echo printJSON($returnJSON);
    return;
}
$hasDuplicates = $data[0] ? true : false;
$returnJSON = array("success" => true, "hasDuplicates" => $hasDuplicates, "error" => "");
echo printJSON($returnJSON);
return;
开发者ID:ryanblanchard,项目名称:Dashboard,代码行数:31,代码来源:checkduplicates.php

示例7: KeyWhere

/**
 *  DEPRECATED. Use RunnerPage::keysSQLExpression instead
 *	Construct WHERE clause with key values
 * 
 * @param &Array	$keys
 * @param String	$table Teh data source table name OPTIONAL
 * 
 * @return String
 * @intellisense
 * @deprecated
 */
function KeyWhere(&$keys, $table = "")
{
    global $strTableName, $cman;
    if (!$table) {
        $table = $strTableName;
    }
    $strWhere = "";
    $pSet = new ProjectSettings($table);
    $cipherer = new RunnerCipherer($table);
    $connection = $cman->byTable($table);
    $keyFields = $pSet->getTableKeys();
    foreach ($keyFields as $kf) {
        if (strlen($strWhere)) {
            $strWhere .= " and ";
        }
        $value = $cipherer->MakeDBValue($kf, $keys[$kf], "", true);
        if ($connection->dbType == nDATABASE_Oracle) {
            $valueisnull = $value === "null" || $value == "''";
        } else {
            $valueisnull = $value === "null";
        }
        if ($valueisnull) {
            $strWhere .= RunnerPage::_getFieldSQL($kf, $connection, $pSet) . " is null";
        } else {
            $strWhere .= RunnerPage::_getFieldSQLDecrypt($kf, $connection, $pSet, $cipherer) . "=" . $cipherer->MakeDBValue($kf, $keys[$kf], "", true);
        }
    }
    return $strWhere;
}
开发者ID:sdev1,项目名称:CloudStockEnquiry,代码行数:40,代码来源:commonfunctions.php

示例8: countDetailsRecsNoSubQ

 /**
  * Use for count details recs number, if subQueryes not supported, or keys have different types
  *
  * @param integer $i
  * @param array $detailid
  * @intellisense
  */
 function countDetailsRecsNoSubQ($dInd, &$detailid)
 {
     global $tables_data, $masterTablesData, $detailsTablesData, $allDetailsTablesArr, $cman;
     $dDataSourceTable = $this->allDetailsTablesArr[$dInd]['dDataSourceTable'];
     $detPSet = $this->pSet->getTable($dDataSourceTable);
     $detCipherer = new RunnerCipherer($dDataSourceTable, $detPSet);
     $detConnection = $cman->byTable($dDataSourceTable);
     $detailsQuery = $detPSet->getSQLQuery();
     $dSqlWhere = $detailsQuery->WhereToSql();
     $detailKeys = $detPSet->getDetailKeysByMasterTable($this->tName);
     $securityClause = SecuritySQL("Search", $dDataSourceTable);
     // add where
     if (strlen($securityClause)) {
         $dSqlWhere = whereAdd($dSqlWhere, $securityClause);
     }
     $masterwhere = "";
     foreach ($this->masterKeysByD[$dInd] as $idx => $val) {
         if ($masterwhere) {
             $masterwhere .= " and ";
         }
         $mastervalue = $detCipherer->MakeDBValue($detailKeys[$idx], $detailid[$idx], "", true);
         if ($mastervalue == "null") {
             $masterwhere .= RunnerPage::_getFieldSQL($detailKeys[$idx], $detConnection, $detPSet) . " is NULL ";
         } else {
             $masterwhere .= RunnerPage::_getFieldSQLDecrypt($detailKeys[$idx], $detConnection, $detPSet, $detCipherer) . "=" . $mastervalue;
         }
     }
     return SQLQuery::gSQLRowCount_int($detailsQuery->HeadToSql(), $detailsQuery->FromToSql(), $dSqlWhere, $detailsQuery->GroupByToSql(), $detailsQuery->Having()->toSql($detailsQuery), $masterwhere, "", $detConnection);
 }
开发者ID:sdev1,项目名称:CloudStockEnquiry,代码行数:36,代码来源:runnerpage.php

示例9: getChildWhere

 /**
  * Get a where condition basing on curren't lookup control's values
  * @param String childVal
  * @return String
  */
 protected function getChildWhere($childVal)
 {
     if ($this->lookupType == LT_QUERY) {
         $childWhereField = $this->pageObject->pSetEdit->getLinkField($this->field);
         $fullLinkFieldName = RunnerPage::_getFieldSQLDecrypt($this->pageObject->pSetEdit->getLinkField($this->field), $this->lookupConnection, $this->lookupPSet, $this->ciphererDisplay);
     } else {
         $fullLinkFieldName = $this->lwLinkField;
     }
     $childValues = $this->multiselect ? splitvalues($childVal) : array($childVal);
     $childWheres = array();
     foreach ($childValues as $childValue) {
         if ($this->lookupType == LT_QUERY) {
             $dbValue = $this->ciphererDisplay->MakeDBValue($childWhereField, $childValue, "", true);
         } else {
             $dbValue = make_db_value($this->field, $childValue, '', '', $this->tName);
         }
         $childWheres[] = $fullLinkFieldName . ($dbValue === "null" ? " is null" : "=" . $dbValue);
     }
     return implode(' OR ', $childWheres);
 }
开发者ID:ryanblanchard,项目名称:Dashboard,代码行数:25,代码来源:LookupField.php

示例10: getFilterWhereByType

 /**
  * Get filter's WHERE clause condition basing on the filter's type
  * 
  * @param String filterType		A string representing the filter's type
  * @param String fName
  * @param String fValue
  * @param String dbType
  * @return String
  */
 function getFilterWhereByType($filterType, $fName, $fValue, $sValue, $parentValues, $connection)
 {
     $pSet = new ProjectSettings($this->tName, PAGE_SEARCH);
     $fullFieldName = RunnerPage::_getFieldSQLDecrypt($fName, $connection, $pSet, $this->cipherer);
     $fieldType = $pSet->getFieldType($fName);
     $dateField = IsDateFieldType($fieldType);
     $timeField = IsTimeType($fieldType);
     if ($dateField || $timeField) {
         include_once getabspath("classes/controls/FilterControl.php");
         include_once getabspath("classes/controls/FilterIntervalSlider.php");
         include_once getabspath("classes/controls/FilterIntervalDateSlider.php");
     }
     switch ($filterType) {
         case 'interval':
             $intervalData = $pSet->getFilterIntervalDatabyIndex($fName, $fValue);
             if (!count($intervalData)) {
                 return "";
             }
             include_once getabspath("classes/controls/FilterControl.php");
             include_once getabspath("classes/controls/FilterIntervalList.php");
             return FilterIntervalList::getIntervalFilterWhere($fName, $intervalData, $pSet, $this->cipherer, $this->tName, $connection);
         case 'equals':
             if (!count($parentValues)) {
                 return $fullFieldName . "=" . $this->cipherer->MakeDBValue($fName, $fValue, "", true);
             }
             $wheres = array();
             $wheres[] = $fullFieldName . "=" . $this->cipherer->MakeDBValue($fName, $fValue, "", true);
             $parentFiltersNames = $pSet->getParentFiltersNames($fName);
             foreach ($parentFiltersNames as $key => $parentName) {
                 $wheres[] = RunnerPage::_getFieldSQLDecrypt($parentName, $connection, $pSet, $this->cipherer) . "=" . $this->cipherer->MakeDBValue($parentName, $parentValues[$key], "", true);
             }
             return "(" . implode(" AND ", $wheres) . ")";
         case 'checked':
             if ($fValue != "on" && $fValue != "off") {
                 return "";
             }
             $bNeedQuotes = NeedQuotes($fieldType);
             include_once getabspath("classes/controls/Control.php");
             include_once getabspath("classes/controls/CheckboxField.php");
             return CheckboxField::constructFieldWhere($fullFieldName, $bNeedQuotes, $fValue == "on", $pSet->getFieldType($fName), $connection->dbType);
         case 'slider':
             if ($dateField) {
                 return FilterIntervalDateSlider::getDateSliderWhere($fName, $pSet, $this->cipherer, $this->tName, $fValue, $sValue, $filterType, $fullFieldName);
             }
             if ($timeField) {
                 include_once getabspath("classes/controls/FilterIntervalTimeSlider.php");
                 return FilterIntervalTimeSlider::getTimeSliderWhere($fName, $pSet, $this->cipherer, $this->tName, $fValue, $sValue, $filterType, $fullFieldName);
             }
             return $this->cipherer->MakeDBValue($fName, $fValue, "", true) . "<=" . $fullFieldName . " AND " . $fullFieldName . "<=" . $this->cipherer->MakeDBValue($fName, $sValue, "", true);
         case 'moreequal':
             if ($dateField) {
                 return FilterIntervalDateSlider::getDateSliderWhere($fName, $pSet, $this->cipherer, $this->tName, $fValue, $sValue, $filterType, $fullFieldName);
             }
             if ($timeField) {
                 include_once getabspath("classes/controls/FilterIntervalTimeSlider.php");
                 return FilterIntervalTimeSlider::getTimeSliderWhere($fName, $pSet, $this->cipherer, $this->tName, $fValue, $sValue, $filterType, $fullFieldName);
             }
             return $this->cipherer->MakeDBValue($fName, $fValue, "", true) . "<=" . $fullFieldName;
         case 'lessequal':
             if ($dateField) {
                 return FilterIntervalDateSlider::getDateSliderWhere($fName, $pSet, $this->cipherer, $this->tName, $fValue, $sValue, $filterType, $fullFieldName);
             }
             if ($timeField) {
                 include_once getabspath("classes/controls/FilterIntervalTimeSlider.php");
                 return FilterIntervalTimeSlider::getTimeSliderWhere($fName, $pSet, $this->cipherer, $this->tName, $fValue, $sValue, $filterType, $fullFieldName);
             }
             return $fullFieldName . "<=" . $this->cipherer->MakeDBValue($fName, $fValue, "", true);
         default:
             return "";
     }
 }
开发者ID:ryanblanchard,项目名称:Dashboard,代码行数:80,代码来源:searchclause.php

示例11: DisplayMasterTableInfoForPrint_calendar_table

function DisplayMasterTableInfoForPrint_calendar_table($params)
{
    global $cman;
    $detailtable = $params["detailtable"];
    $keys = $params["keys"];
    $xt = new Xtempl();
    $tName = "calendar_table";
    $xt->eventsObject = getEventObject($tName);
    $cipherer = new RunnerCipherer($tName);
    $settings = new ProjectSettings($tName, PAGE_PRINT);
    $connection = $cman->byTable($tName);
    $masterQuery = $settings->getSQLQuery();
    $viewControls = new ViewControlsContainer($settings, PAGE_PRINT);
    $where = "";
    $keysAssoc = array();
    $showKeys = "";
    if ($detailtable == "Fact_SalesTransaction") {
        $keysAssoc["dt"] = $keys[1 - 1];
        $where .= RunnerPage::_getFieldSQLDecrypt("dt", $connection, $settings, $cipherer) . "=" . $cipherer->MakeDBValue("dt", $keys[1 - 1], "", true);
        $keyValue = $viewControls->showDBValue("dt", $keysAssoc);
        $showKeys .= " " . GetFieldLabel("calendar_table", "dt") . ": " . $keyValue;
        $xt->assign('showKeys', $showKeys);
    }
    if ($detailtable == "Current Year Sales") {
        $keysAssoc["dt"] = $keys[1 - 1];
        $where .= RunnerPage::_getFieldSQLDecrypt("dt", $connection, $settings, $cipherer) . "=" . $cipherer->MakeDBValue("dt", $keys[1 - 1], "", true);
        $keyValue = $viewControls->showDBValue("dt", $keysAssoc);
        $showKeys .= " " . GetFieldLabel("calendar_table", "dt") . ": " . $keyValue;
        $xt->assign('showKeys', $showKeys);
    }
    if (!$where) {
        return;
    }
    $str = SecuritySQL("Export", $tName);
    if (strlen($str)) {
        $where .= " and " . $str;
    }
    $strWhere = whereAdd($masterQuery->m_where->toSql($masterQuery), $where);
    if (strlen($strWhere)) {
        $strWhere = " where " . $strWhere . " ";
    }
    $strSQL = $masterQuery->HeadToSql() . ' ' . $masterQuery->FromToSql() . $strWhere . $masterQuery->TailToSql();
    LogInfo($strSQL);
    $data = $cipherer->DecryptFetchedArray($connection->query($strSQL)->fetchAssoc());
    if (!$data) {
        return;
    }
    // reassign pagetitlelabel function adding extra params
    $xt->assign_function("pagetitlelabel", "xt_pagetitlelabel", array("record" => $data, "settings" => $settings));
    $keylink = "";
    $keylink .= "&key1=" . runner_htmlspecialchars(rawurlencode(@$data["dt"]));
    $xt->assign("dt_mastervalue", $viewControls->showDBValue("dt", $data, $keylink));
    $format = $settings->getViewFormat("dt");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("dt"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("dt_class", $class);
    // add class for field header as field value
    $xt->assign("y_mastervalue", $viewControls->showDBValue("y", $data, $keylink));
    $format = $settings->getViewFormat("y");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("y"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("y_class", $class);
    // add class for field header as field value
    $xt->assign("q_mastervalue", $viewControls->showDBValue("q", $data, $keylink));
    $format = $settings->getViewFormat("q");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("q"))) {
        $class = ' rnr-field-number';
    }
//.........这里部分代码省略.........
开发者ID:ryanblanchard,项目名称:Dashboard,代码行数:101,代码来源:calendar_table_masterprint.php

示例12: DisplayMasterTableInfoForPrint_GE_PERSONA_DISPONIBLE

function DisplayMasterTableInfoForPrint_GE_PERSONA_DISPONIBLE($params)
{
    global $cman;
    $detailtable = $params["detailtable"];
    $keys = $params["keys"];
    $xt = new Xtempl();
    $tName = "GE.PERSONA_DISPONIBLE";
    $cipherer = new RunnerCipherer($tName);
    $settings = new ProjectSettings($tName, PAGE_PRINT);
    $connection = $cman->byTable($tName);
    $masterQuery = $settings->getSQLQuery();
    $viewControls = new ViewControlsContainer($settings, PAGE_PRINT);
    $where = "";
    $keysAssoc = array();
    $showKeys = "";
    if ($detailtable == "GE.PERSONA_DISPONIBLEXEJERCICIO") {
        $keysAssoc["USERNAME"] = $keys[1 - 1];
        $keysAssoc["ES_REAL"] = $keys[2 - 1];
        $where .= RunnerPage::_getFieldSQLDecrypt("USERNAME", $connection, $settings, $cipherer) . "=" . $cipherer->MakeDBValue("USERNAME", $keys[1 - 1], "", true);
        $keyValue = $viewControls->showDBValue("USERNAME", $keysAssoc);
        $showKeys .= " " . GetFieldLabel("GE_PERSONA_DISPONIBLE", "USERNAME") . ": " . $keyValue;
        $where .= " and ";
        $showKeys .= " , ";
        $where .= RunnerPage::_getFieldSQLDecrypt("ES_REAL", $connection, $settings, $cipherer) . "=" . $cipherer->MakeDBValue("ES_REAL", $keys[2 - 1], "", true);
        $keyValue = $viewControls->showDBValue("ES_REAL", $keysAssoc);
        $showKeys .= " " . GetFieldLabel("GE_PERSONA_DISPONIBLE", "ES_REAL") . ": " . $keyValue;
        $xt->assign('showKeys', $showKeys);
    }
    if ($detailtable == "GE.PERSONA_DISPONIBLEXCOLOR_PELO") {
        $keysAssoc["ES_REAL"] = $keys[1 - 1];
        $keysAssoc["USERNAME"] = $keys[2 - 1];
        $where .= RunnerPage::_getFieldSQLDecrypt("ES_REAL", $connection, $settings, $cipherer) . "=" . $cipherer->MakeDBValue("ES_REAL", $keys[1 - 1], "", true);
        $keyValue = $viewControls->showDBValue("ES_REAL", $keysAssoc);
        $showKeys .= " " . GetFieldLabel("GE_PERSONA_DISPONIBLE", "ES_REAL") . ": " . $keyValue;
        $where .= " and ";
        $showKeys .= " , ";
        $where .= RunnerPage::_getFieldSQLDecrypt("USERNAME", $connection, $settings, $cipherer) . "=" . $cipherer->MakeDBValue("USERNAME", $keys[2 - 1], "", true);
        $keyValue = $viewControls->showDBValue("USERNAME", $keysAssoc);
        $showKeys .= " " . GetFieldLabel("GE_PERSONA_DISPONIBLE", "USERNAME") . ": " . $keyValue;
        $xt->assign('showKeys', $showKeys);
    }
    if ($detailtable == "GE.PERSONA_DISPONIBLEXIDIOMA") {
        $keysAssoc["USERNAME"] = $keys[1 - 1];
        $keysAssoc["ES_REAL"] = $keys[2 - 1];
        $where .= RunnerPage::_getFieldSQLDecrypt("USERNAME", $connection, $settings, $cipherer) . "=" . $cipherer->MakeDBValue("USERNAME", $keys[1 - 1], "", true);
        $keyValue = $viewControls->showDBValue("USERNAME", $keysAssoc);
        $showKeys .= " " . GetFieldLabel("GE_PERSONA_DISPONIBLE", "USERNAME") . ": " . $keyValue;
        $where .= " and ";
        $showKeys .= " , ";
        $where .= RunnerPage::_getFieldSQLDecrypt("ES_REAL", $connection, $settings, $cipherer) . "=" . $cipherer->MakeDBValue("ES_REAL", $keys[2 - 1], "", true);
        $keyValue = $viewControls->showDBValue("ES_REAL", $keysAssoc);
        $showKeys .= " " . GetFieldLabel("GE_PERSONA_DISPONIBLE", "ES_REAL") . ": " . $keyValue;
        $xt->assign('showKeys', $showKeys);
    }
    if ($detailtable == "GE.PERSONA_DISPONIBLEXOCUPACION") {
        $keysAssoc["ES_REAL"] = $keys[1 - 1];
        $keysAssoc["USERNAME"] = $keys[2 - 1];
        $where .= RunnerPage::_getFieldSQLDecrypt("ES_REAL", $connection, $settings, $cipherer) . "=" . $cipherer->MakeDBValue("ES_REAL", $keys[1 - 1], "", true);
        $keyValue = $viewControls->showDBValue("ES_REAL", $keysAssoc);
        $showKeys .= " " . GetFieldLabel("GE_PERSONA_DISPONIBLE", "ES_REAL") . ": " . $keyValue;
        $where .= " and ";
        $showKeys .= " , ";
        $where .= RunnerPage::_getFieldSQLDecrypt("USERNAME", $connection, $settings, $cipherer) . "=" . $cipherer->MakeDBValue("USERNAME", $keys[2 - 1], "", true);
        $keyValue = $viewControls->showDBValue("USERNAME", $keysAssoc);
        $showKeys .= " " . GetFieldLabel("GE_PERSONA_DISPONIBLE", "USERNAME") . ": " . $keyValue;
        $xt->assign('showKeys', $showKeys);
    }
    if ($detailtable == "GE.PERSONA_DISPONIBLEXRELIGION") {
        $keysAssoc["USERNAME"] = $keys[1 - 1];
        $keysAssoc["ES_REAL"] = $keys[2 - 1];
        $where .= RunnerPage::_getFieldSQLDecrypt("USERNAME", $connection, $settings, $cipherer) . "=" . $cipherer->MakeDBValue("USERNAME", $keys[1 - 1], "", true);
        $keyValue = $viewControls->showDBValue("USERNAME", $keysAssoc);
        $showKeys .= " " . GetFieldLabel("GE_PERSONA_DISPONIBLE", "USERNAME") . ": " . $keyValue;
        $where .= " and ";
        $showKeys .= " , ";
        $where .= RunnerPage::_getFieldSQLDecrypt("ES_REAL", $connection, $settings, $cipherer) . "=" . $cipherer->MakeDBValue("ES_REAL", $keys[2 - 1], "", true);
        $keyValue = $viewControls->showDBValue("ES_REAL", $keysAssoc);
        $showKeys .= " " . GetFieldLabel("GE_PERSONA_DISPONIBLE", "ES_REAL") . ": " . $keyValue;
        $xt->assign('showKeys', $showKeys);
    }
    if ($detailtable == "GE.PERSONA_DISPONIBLEXINTERES") {
        $keysAssoc["ES_REAL"] = $keys[1 - 1];
        $keysAssoc["USERNAME"] = $keys[2 - 1];
        $where .= RunnerPage::_getFieldSQLDecrypt("ES_REAL", $connection, $settings, $cipherer) . "=" . $cipherer->MakeDBValue("ES_REAL", $keys[1 - 1], "", true);
        $keyValue = $viewControls->showDBValue("ES_REAL", $keysAssoc);
        $showKeys .= " " . GetFieldLabel("GE_PERSONA_DISPONIBLE", "ES_REAL") . ": " . $keyValue;
        $where .= " and ";
        $showKeys .= " , ";
        $where .= RunnerPage::_getFieldSQLDecrypt("USERNAME", $connection, $settings, $cipherer) . "=" . $cipherer->MakeDBValue("USERNAME", $keys[2 - 1], "", true);
        $keyValue = $viewControls->showDBValue("USERNAME", $keysAssoc);
        $showKeys .= " " . GetFieldLabel("GE_PERSONA_DISPONIBLE", "USERNAME") . ": " . $keyValue;
        $xt->assign('showKeys', $showKeys);
    }
    if ($detailtable == "GE.PERSONA_DISPONIBLEXMASCOTA") {
        $keysAssoc["USERNAME"] = $keys[1 - 1];
        $keysAssoc["ES_REAL"] = $keys[2 - 1];
        $where .= RunnerPage::_getFieldSQLDecrypt("USERNAME", $connection, $settings, $cipherer) . "=" . $cipherer->MakeDBValue("USERNAME", $keys[1 - 1], "", true);
        $keyValue = $viewControls->showDBValue("USERNAME", $keysAssoc);
        $showKeys .= " " . GetFieldLabel("GE_PERSONA_DISPONIBLE", "USERNAME") . ": " . $keyValue;
        $where .= " and ";
//.........这里部分代码省略.........
开发者ID:kcallow,项目名称:MatchMe,代码行数:101,代码来源:GE_PERSONA_DISPONIBLE_masterprint.php

示例13: getMultiselectLookupResolvingSQL

 /**
  * @param String value
  * @param String in
  * @return String
  */
 protected function getMultiselectLookupResolvingSQL($value, $in)
 {
     if (!$this->pSet->multiSelect($this->field)) {
         return "";
     }
     $where = GetLWWhere($this->field, $this->pSet->getEditPageType());
     if ($this->nLookupType == LT_QUERY) {
         $inWhere = RunnerPage::_getFieldSQLDecrypt($this->linkFieldName, $this->lookupConnection, $this->lookupPSet, $this->cipherer) . " in (" . $in . ")";
         if (strlen($where)) {
             $inWhere .= " and (" . $where . ")";
         }
         $LookupSQL = $this->lookupQueryObj->toSql(whereAdd($this->lookupQueryObj->m_where->toSql($this->lookupQueryObj), $inWhere));
     } else {
         $LookupSQL = $this->LookupSQL . $this->lookupConnection->addFieldWrappers($this->pSet->getLinkField($this->field)) . " in (" . $in . ")";
         if (strlen($where)) {
             $LookupSQL .= " and (" . $where . ")";
         }
     }
     return $LookupSQL;
 }
开发者ID:ryanblanchard,项目名称:Dashboard,代码行数:25,代码来源:ViewLookupWizardField.php

示例14: getOrderSql

 function getOrderSql()
 {
     if ($this->_interval == 0) {
         $fname = $this->_oldAlgorithm ? RunnerPage::_getFieldSQLDecrypt($this->_name, $this->_connection, $this->pSet, $this->cipherer) : cached_ffn($this->_name);
         return $fname . ' ' . $this->_orderBy . ' ';
     } else {
         $grp = $this->getSqlList();
         $newgrp = array();
         foreach ($grp as $g) {
             $newgrp[] = $g . ' ' . $this->_orderBy . ' ';
         }
         return join(', ', $newgrp);
     }
 }
开发者ID:ryanblanchard,项目名称:Dashboard,代码行数:14,代码来源:reportlib.php

示例15: getDbFieldName

 /**
  * Get a correct field name for SQL query building 
  * @param String fName
  * @return String
  */
 protected function getDbFieldName($fName)
 {
     return RunnerPage::_getFieldSQLDecrypt($fName, $this->connection, $this->pSet, $this->cipherer);
 }
开发者ID:ryanblanchard,项目名称:Dashboard,代码行数:9,代码来源:FilterControl.php


注:本文中的RunnerPage::_getFieldSQLDecrypt方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。