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


PHP GetFullFieldName函数代码示例

本文整理汇总了PHP中GetFullFieldName函数的典型用法代码示例。如果您正苦于以下问题:PHP GetFullFieldName函数的具体用法?PHP GetFullFieldName怎么用?PHP GetFullFieldName使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: GetAddedDataLookupQuery

	/**
	 * @param Array keys
	 * @param Boolean forLookup
	 * @param String _table
	 * @param String _field
	 * @param String pageType
	 * @return Array
	 */
	public function GetAddedDataLookupQuery($keys, $forLookup, $_table, $_field, $pageType)
	{	
		$lookupMainSettings = getLookupMainTableSettings($this->tName, $_table, $_field, $pageType);
		if(!$lookupMainSettings)
			return array();

		global $conn;		
		$LookupSQL = "";
		$mainField = $_field;	
		$mainTable = $lookupMainSettings->getTableName();
		$linkFieldName = $lookupMainSettings->getLinkField($mainField);
		$dispfield = $lookupMainSettings->getDisplayField($mainField);
		
		$nLookupType = $lookupMainSettings->getLookupType($mainField);
		if($nLookupType == LT_QUERY)
		{
			if($lookupMainSettings->getCustomDisplay($mainField))
				$this->pSet->getSQLQuery()->AddCustomExpression($dispfield, $this->pSet, $mainTable, $mainField);
			$lookupQueryObj = $this->pSet->getSQLQuery()->CloneObject();
		}
		else
		{
			$LookupSQL = "select ";
			$LookupSQL .= GetFullFieldName($linkFieldName, $this->tName, true);
			if($linkFieldName != $dispfield)
				$LookupSQL .= "," . $this->pSet->getLWDisplayField($mainField, true);
			$LookupSQL.=" from ".AddTableWrappers($this->strOriginalTableName);
		}
			
		$data = 0;
		$lookupIndexes = array("linkFieldIndex" => 0, "displayFieldIndex" => 0);
		if(count($keys))
		{
			$where = KeyWhere($keys);
			if($nLookupType == LT_QUERY)
				$LookupSQL = $lookupQueryObj->toSql(whereAdd($lookupQueryObj->m_where->toSql($lookupQueryObj), $where));
			else 
				$LookupSQL.=" where ".$where;
			$lookupIndexes = GetLookupFieldsIndexes($lookupMainSettings, $mainField);
			LogInfo($LookupSQL);
			if($forLookup)
			{
				$rs=db_query($LookupSQL,$conn);
				$data = $this->cipherer->DecryptFetchedArray($rs);
			}
			else if($LookupSQL)
			{
				$rs = db_query($LookupSQL,$conn);
				$data = db_fetch_numarray($rs);
				$data[$lookupIndexes["linkFieldIndex"]] = $this->cipherer->DecryptField($linkFieldName, $data[$lookupIndexes["linkFieldIndex"]]);
				if($nLookupType == LT_QUERY)
					$data[$lookupIndexes["displayFieldIndex"]] = $this->cipherer->DecryptField($dispfield, $data[$lookupIndexes["displayFieldIndex"]]);		
			}
		}

		return array($data, array("linkField" => $linkFieldName, "displayField" => $dispfield
			, "linkFieldIndex" => $lookupIndexes["linkFieldIndex"], "displayFieldIndex" => $lookupIndexes["displayFieldIndex"]));
	}	
开发者ID:helbertfurbino,项目名称:sgmofinanceiro,代码行数:66,代码来源:addpage.php

示例2: SQLWhere

 function SQLWhere($SearchFor, $strSearchOption, $SearchFor2, $etype, $isSuggest)
 {
     $baseResult = $this->baseSQLWhere($strSearchOption);
     if ($baseResult === false) {
         return "";
     }
     if ($baseResult != "") {
         return $baseResult;
     }
     if ($SearchFor == "none") {
         return "";
     }
     if (NeedQuotes($this->type)) {
         $fullFieldName = GetFullFieldName($this->field);
         if ($SearchFor == "on") {
             $whereStr = "(" . $fullFieldName . "<>'0' ";
             if (!$this->isOracle) {
                 $whereStr .= " and " . $fullFieldName . "<>'' ";
             }
             $whereStr .= " and " . $fullFieldName . " is not null)";
             $whereStr .= " and abs(case textregexeq(" . $fullFieldName . ", '^(\\-)?[[:digit:]]+(\\.[[:digit:]]+)?\$') when true then to_number(" . $fullFieldName . ", '999999999') else 0 end) > 0";
             $whereStr .= " and abs(val(" . $fullFieldName . ")) > 0";
             return $whereStr;
         } elseif ($SearchFor == "off") {
             $whereStr = "(" . GetFullFieldName($this->field) . "='0' ";
             if (!$this->isOracle) {
                 $whereStr .= " or " . GetFullFieldName($this->field) . "='' ";
             }
             $whereStr .= " or " . GetFullFieldName($this->field) . " is null)";
             $whereStr .= " or abs(case textregexeq(" . $fullFieldName . ", '^(\\-)?[[:digit:]]+(\\.[[:digit:]]+)?\$') when true then to_number(" . $fullFieldName . ", '999999999') else 0 end) = 0";
             $whereStr .= " or abs(val(" . $fullFieldName . ")) = 0";
             return $whereStr;
         }
     } else {
         if ($SearchFor == "on") {
             return "(" . GetFullFieldName($this->field) . "<>0 and " . GetFullFieldName($this->field) . " is not null)";
         } elseif ($SearchFor == "off") {
             return "(" . GetFullFieldName($this->field) . "=0 or " . GetFullFieldName($this->field) . " is null)";
         }
     }
     return "";
 }
开发者ID:aagusti,项目名称:padl-tng,代码行数:42,代码来源:CheckboxField.php

示例3: unset

        }
    }
    if (isset($_SESSION[$strTableName . "_masterkey" . $i])) {
        unset($_SESSION[$strTableName . "_masterkey" . $i]);
    }
} else {
    $mastertable = $_SESSION[$strTableName . "_mastertable"];
}
//$strSQL = $gstrSQL;
if ($mastertable == "pad.pad_kecamatan") {
    $where = "";
    $where .= GetFullFieldName("kecamatan_id", $strTableName, false) . "=" . make_db_value("kecamatan_id", $_SESSION[$strTableName . "_masterkey1"]);
}
if ($mastertable == "pad.pad_kelurahan") {
    $where = "";
    $where .= GetFullFieldName("kelurahan_id", $strTableName, false) . "=" . make_db_value("kelurahan_id", $_SESSION[$strTableName . "_masterkey1"]);
}
$str = SecuritySQL("Search");
if (strlen($str)) {
    $where .= " and " . $str;
}
$strSQL = $gQuery->gSQLWhere($where);
$strSQL .= " " . $gstrOrderBy;
$rowcount = $gQuery->gSQLRowCount($where);
$xt->assign("row_count", $rowcount);
if ($rowcount) {
    $xt->assign("details_data", true);
    $rs = db_query($strSQL, $conn);
    $display_count = 10;
    if ($mode == "inline") {
        $display_count *= 2;
开发者ID:aagusti,项目名称:padl-tng,代码行数:31,代码来源:pad_pad_customer_detailspreview.php

示例4: DisplayMasterTableInfo_Module

function DisplayMasterTableInfo_Module($params)
{
    $detailtable = $params["detailtable"];
    $keys = $params["keys"];
    global $conn, $strTableName;
    $xt = new Xtempl();
    $oldTableName = $strTableName;
    $strTableName = "dbo.Module";
    //$strSQL = "SELECT ID,   [Module Type],   [Module Status],   [Module Condition],   [Serial Num],   [Entry Date]  FROM dbo.[Module]";
    $sqlHead = "SELECT ID,   [Module Type],   [Module Status],   [Module Condition],   [Serial Num],   [Entry Date]";
    $sqlFrom = "FROM dbo.[Module]";
    $sqlWhere = "";
    $sqlTail = "";
    $where = "";
    global $page_styles, $page_layouts, $page_layout_names, $container_styles;
    $layout = new TLayout("masterprint", "BoldOrange", "MobileOrange");
    $layout->blocks["bare"] = array();
    $layout->containers["0"] = array();
    $layout->containers["0"][] = array("name" => "masterprintheader", "block" => "", "substyle" => 1);
    $layout->skins["0"] = "empty";
    $layout->blocks["bare"][] = "0";
    $layout->containers["mastergrid"] = array();
    $layout->containers["mastergrid"][] = array("name" => "masterprintfields", "block" => "", "substyle" => 1);
    $layout->skins["mastergrid"] = "grid";
    $layout->blocks["bare"][] = "mastergrid";
    $page_layouts["Module_masterprint"] = $layout;
    if ($detailtable == "dbo.Anomalies") {
        $where .= GetFullFieldName("ID") . "=" . make_db_value("ID", $keys[1 - 1]);
    }
    if ($detailtable == "dbo.Customer Module Assignment") {
        $where .= GetFullFieldName("ID") . "=" . make_db_value("ID", $keys[1 - 1]);
    }
    if ($detailtable == "dbo.Readings") {
        $where .= GetFullFieldName("ID") . "=" . make_db_value("ID", $keys[1 - 1]);
    }
    if (!$where) {
        $strTableName = $oldTableName;
        return;
    }
    $str = SecuritySQL("Export");
    if (strlen($str)) {
        $where .= " and " . $str;
    }
    $strWhere = whereAdd($sqlWhere, $where);
    if (strlen($strWhere)) {
        $strWhere = " where " . $strWhere . " ";
    }
    $strSQL = $sqlHead . ' ' . $sqlFrom . $strWhere . $sqlTail;
    //	$strSQL=AddWhere($strSQL,$where);
    LogInfo($strSQL);
    $rs = db_query($strSQL, $conn);
    $data = db_fetch_array($rs);
    if (!$data) {
        $strTableName = $oldTableName;
        return;
    }
    $keylink = "";
    $keylink .= "&key1=" . htmlspecialchars(rawurlencode(@$data["ID"]));
    //	ID -
    $value = "";
    $value = ProcessLargeText(GetData($data, "ID", ""), "field=ID" . $keylink, "", MODE_PRINT);
    $xt->assign("ID_mastervalue", $value);
    //	Module Type -
    $value = "";
    $value = DisplayLookupWizard("Module Type", $data["Module Type"], $data, $keylink, MODE_PRINT);
    $xt->assign("Module_Type_mastervalue", $value);
    //	Module Status -
    $value = "";
    $value = DisplayLookupWizard("Module Status", $data["Module Status"], $data, $keylink, MODE_PRINT);
    $xt->assign("Module_Status_mastervalue", $value);
    //	Module Condition -
    $value = "";
    $value = DisplayLookupWizard("Module Condition", $data["Module Condition"], $data, $keylink, MODE_PRINT);
    $xt->assign("Module_Condition_mastervalue", $value);
    //	Serial Num -
    $value = "";
    $value = ProcessLargeText(GetData($data, "Serial Num", ""), "field=Serial+Num" . $keylink, "", MODE_PRINT);
    $xt->assign("Serial_Num_mastervalue", $value);
    //	Entry Date - Short Date
    $value = "";
    $value = ProcessLargeText(GetData($data, "Entry Date", "Short Date"), "field=Entry+Date" . $keylink, "", MODE_PRINT);
    $xt->assign("Entry_Date_mastervalue", $value);
    $xt->display("Module_masterprint.htm");
    $strTableName = $oldTableName;
}
开发者ID:samsulpendis,项目名称:Instant_Appointment,代码行数:85,代码来源:Module_masterprint.php

示例5: unset

            $_SESSION[$strTableName . "_masterkey" . $i] = $masterKeys["masterkey" . $i];
            $i++;
        }
    }
    if (isset($_SESSION[$strTableName . "_masterkey" . $i])) {
        unset($_SESSION[$strTableName . "_masterkey" . $i]);
    }
} else {
    $mastertable = $_SESSION[$strTableName . "_mastertable"];
}
//$strSQL = $gstrSQL;
if ($mastertable == "pad.pad_jenis_pajak") {
    $where = "";
    $where .= GetFullFieldName("pajak_id", $strTableName, false) . "=" . make_db_value("pajak_id", $_SESSION[$strTableName . "_masterkey1"]);
    $where .= " and ";
    $where .= GetFullFieldName("pajak_id", $strTableName, false) . "=" . make_db_value("pajak_id", $_SESSION[$strTableName . "_masterkey2"]);
}
$str = SecuritySQL("Search");
if (strlen($str)) {
    $where .= " and " . $str;
}
$strSQL = $gQuery->gSQLWhere($where);
$strSQL .= " " . $gstrOrderBy;
$rowcount = $gQuery->gSQLRowCount($where);
$xt->assign("row_count", $rowcount);
if ($rowcount) {
    $xt->assign("details_data", true);
    $rs = db_query($strSQL, $conn);
    $display_count = 10;
    if ($mode == "inline") {
        $display_count *= 2;
开发者ID:aagusti,项目名称:padl-tng,代码行数:31,代码来源:pad_pad_tarif_pajak_detailspreview.php

示例6: GetSiteUrl

			else
				$value=(0+$value);
		}
		$sWhere.=" or ".GetFullFieldName($cEmailField,"webreport_users",false)."=".$value.")";
	
		if($tosearch && $globalEvents->exists("BeforeRemindPassword"))
			$tosearch = $globalEvents->BeforeRemindPassword($strUsernameEmail,$strUsernameEmail, $pageObject);
		
		if($tosearch)
		{
			$selectClause = "select ".GetFullFieldName($cUserNameField,"webreport_users",false)." as ".AddFieldWrappers($cUserNameField)
				.",".GetFullFieldName($cPasswordField,"webreport_users",false)." as ".AddFieldWrappers($cPasswordField);
			
			// prevent aliases mixing
			if( $cUserNameField != $cEmailField )
				$strSQL.= ",".GetFullFieldName($cEmailField,"webreport_users",false)." as ".AddFieldWrappers($cEmailField);

				
			$strSQL = $selectClause." from ".AddTableWrappers("webreport_users")." where ".$sWhere;
			
			$rs = db_query($strSQL, $conn);
			$data = $cipherer->DecryptFetchedArray($rs);
			if($data)
			{
				$password=$data[$cPasswordField];
				$strUsername = $data[$cUserNameField];
		
	
				$url = GetSiteUrl();
				$url.= $_SERVER["SCRIPT_NAME"];
				$url2 = str_replace("remind.","login.",$url)."?username=".$data[$cUserNameField];
开发者ID:helbertfurbino,项目名称:sgmofinanceiro,代码行数:31,代码来源:remind.php

示例7: unset

        $i++;
    }
    if (isset($_SESSION[$strTableName . "_masterkey" . $i])) {
        unset($_SESSION[$strTableName . "_masterkey" . $i]);
    }
} else {
    $mastertable = $_SESSION[$strTableName . "_mastertable"];
}
//$strSQL = $gstrSQL;
if ($mastertable == "dbo.LU_Customer Type") {
    $where = "";
    $where .= GetFullFieldName("Customer Type") . "=" . make_db_value("Customer Type", $_SESSION[$strTableName . "_masterkey1"]);
}
if ($mastertable == "dbo.LU_Locations") {
    $where = "";
    $where .= GetFullFieldName("Location") . "=" . make_db_value("Location", $_SESSION[$strTableName . "_masterkey1"]);
}
$str = SecuritySQL("Search");
if (strlen($str)) {
    $where .= " and " . $str;
}
$strSQL = gSQLWhere($where);
$strSQL .= " " . $gstrOrderBy;
$rowcount = gSQLRowCount($where);
$xt->assign("row_count", $rowcount);
if ($rowcount) {
    $xt->assign("details_data", true);
    $rs = db_query($strSQL, $conn);
    $display_count = 10;
    if ($mode == "inline") {
        $display_count *= 2;
开发者ID:samsulpendis,项目名称:Instant_Appointment,代码行数:31,代码来源:Customers_detailspreview.php

示例8: addWhereWithMasterTable

 /**
  * add where clause with foreign keys of current table and it's master table master keys
  *
  * @return string
  */
 function addWhereWithMasterTable()
 {
     $where = "";
     if (count($this->detailKeysByM)) {
         for ($i = 0; $i < count($this->detailKeysByM); $i++) {
             if ($i != 0) {
                 $where .= " and ";
             }
             if ($this->cipherer && isEncryptionByPHPEnabled()) {
                 $mValue = $this->cipherer->MakeDBValue($this->detailKeysByM[$i], $_SESSION[$this->sessionPrefix . "_masterkey" . ($i + 1)]);
             } else {
                 $mValue = make_db_value($this->detailKeysByM[$i], $_SESSION[$this->sessionPrefix . "_masterkey" . ($i + 1)]);
             }
             if (!empty($mValue)) {
                 $where .= GetFullFieldName($this->detailKeysByM[$i], "", false) . "=" . $mValue;
             } else {
                 $where .= "1=0";
             }
         }
     }
     return $where;
 }
开发者ID:aagusti,项目名称:padl-tng,代码行数:27,代码来源:listpage.php

示例9: SQLWhere

 function SQLWhere($SearchFor, $strSearchOption, $SearchFor2, $etype, $isSuggest)
 {
     $baseResult = $this->baseSQLWhere($strSearchOption);
     if ($baseResult === false) {
         return "";
     }
     if ($baseResult != "") {
         return $baseResult;
     }
     if (IsCharType($this->type)) {
         if (!$this->pageObject->cipherer->isFieldPHPEncrypted($this->field)) {
             $gstrField = $this->pageObject->pSetEdit->isEnableUpper(GetFullFieldName($this->field, "", false));
         } else {
             $gstrField = GetFullFieldName($this->field, "", false);
         }
     } elseif ($strSearchOption == "Contains" || $strSearchOption == "Starts with") {
         $gstrField = db_field2char(GetFullFieldName($this->field, "", false), $this->type);
     } else {
         $gstrField = GetFullFieldName($this->field, "", false);
     }
     $ret = "";
     if ($this->isMysql) {
         $SearchFor = str_replace('\\\\', '\\\\\\\\', $SearchFor);
     }
     if ($strSearchOption == "Contains") {
         $SearchFor = "%" . $SearchFor . "%";
     } else {
         if ($strSearchOption == "Starts with") {
             $SearchFor = $SearchFor . "%";
         }
     }
     if ($strSearchOption == "Contains" || $strSearchOption == "Starts with" || $strSearchOption == "Equals") {
         return $this->buildWhere($gstrField, $SearchFor, $strSearchOption == "Equals");
     }
     return "";
 }
开发者ID:aagusti,项目名称:padl-tng,代码行数:36,代码来源:FileField.php

示例10: countDetailsRecsNoSubQ

 /**
  * Use for count details recs number, if subQueryes not supported, or keys have different types
  *
  * @param integer $i
  * @param array $detailid
  */
 function countDetailsRecsNoSubQ($dInd, &$detailid)
 {
     global $tables_data;
     global $masterTablesData;
     global $detailsTablesData;
     $dDataSourceTable = $this->allDetailsTablesArr[$dInd]['dDataSourceTable'];
     $gQuery = GetTableData($dDataSourceTable, '.sqlquery', null);
     $dObjHaving = $gQuery->Having();
     $dSqlHaving = $dObjHaving->toSql($gQuery);
     $dSqlGroupBy = $gQuery->GroupByToSql();
     $dSqlHead = $this->allDetailsTablesArr[$dInd]['sqlHead'];
     $dSqlFrom = $this->allDetailsTablesArr[$dInd]['sqlFrom'];
     $dSqlWhere = $this->allDetailsTablesArr[$dInd]['sqlWhere'];
     //$sqlTail = $detailTableInfo['sqlTail'];
     $detailKeys = GetDetailKeysByMasterTable($this->tName, $dDataSourceTable);
     $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 ";
         }
         $masterwhere .= GetFullFieldName($detailKeys[$idx], $dDataSourceTable) . "=" . make_db_value($detailKeys[$idx], $detailid[$idx]);
     }
     return gSQLRowCount_int($dSqlHead, $dSqlFrom, $dSqlWhere, $dSqlGroupBy, $dSqlHaving, $masterwhere, "");
 }
开发者ID:samsulpendis,项目名称:Instant_Appointment,代码行数:35,代码来源:runnerpage.php

示例11: DoInsertRecordSQL

function DoInsertRecordSQL($table, &$avalues, &$blobfields, $pageid, &$pageObject)
{
    global $error_happened, $conn, $inlineadd, $usermessage, $message, $failed_inline_add, $keys, $strTableName;
    //	make SQL string
    $strSQL = "insert into " . AddTableWrappers($table) . " ";
    $strFields = "(";
    $strValues = "(";
    $blobs = PrepareBlobs($avalues, $blobfields);
    foreach ($avalues as $akey => $value) {
        $strFields .= GetFullFieldName($akey) . ", ";
        if (in_array($akey, $blobfields)) {
            $strValues .= $value . ", ";
        } else {
            $strValues .= add_db_quotes($akey, $value) . ", ";
        }
    }
    if (substr($strFields, -2) == ", ") {
        $strFields = substr($strFields, 0, strlen($strFields) - 2);
    }
    if (substr($strValues, -2) == ", ") {
        $strValues = substr($strValues, 0, strlen($strValues) - 2);
    }
    $strSQL .= $strFields . ") values " . $strValues . ")";
    if (!ExecuteUpdate($strSQL, $blobs, true)) {
        return false;
    }
    if ($error_happened) {
        return false;
    }
    $pageObject->ProcessFiles();
    if ($inlineadd == ADD_INLINE) {
        $status = "ADDED";
        $message = "" . mlang_message("RECORD_ADDED") . "";
        $IsSaved = true;
    } else {
        $message = "<<< " . mlang_message("RECORD_ADDED") . " >>>";
    }
    if ($usermessage != "") {
        $message = $usermessage;
    }
    $auditObj = GetAuditObject($table);
    if ($inlineadd == ADD_SIMPLE || $inlineadd == ADD_INLINE || $inlineadd == ADD_ONTHEFLY || $inlineadd == ADD_POPUP || $inlineadd == ADD_MASTER || tableEventExists("AfterAdd", $strTableName) || $auditObj) {
        $failed_inline_add = false;
        $keyfields = GetTableKeys();
        foreach ($keyfields as $k) {
            if (array_key_exists($k, $avalues)) {
                $keys[$k] = $avalues[$k];
            } elseif (IsAutoincField($k)) {
                $lastrs = db_query("select @@IDENTITY", $conn);
                if ($lastdata = db_fetch_numarray($lastrs)) {
                    $keys[$k] = $lastdata[0];
                }
            } else {
                $failed_inline_add = true;
            }
        }
    }
    return true;
}
开发者ID:samsulpendis,项目名称:Instant_Appointment,代码行数:59,代码来源:commonfunctions.php

示例12: getSelectColumnsAndJoinFromPart

	/**
	 * Get the substitute columns list for the SELECT Clause and the FORM clause part 
	 * that will be joined to the basic page's FROM clause 	 
	 * @param String searchFor
	 * @param String searchOpt
	 * @param Boolean isSuggest
	 * @return Array
	 */
	public function getSelectColumnsAndJoinFromPart($searchFor, $searchOpt, $isSuggest)
	{
		return array(
			"selectColumns"=> GetFullFieldName( $this->field ),
			"joinFromPart"=> ""
		);
	}
开发者ID:helbertfurbino,项目名称:sgmofinanceiro,代码行数:15,代码来源:Control.php

示例13: DisplayMasterTableInfo_pad_pad_spt

function DisplayMasterTableInfo_pad_pad_spt($params)
{
    $detailtable = $params["detailtable"];
    $keys = $params["keys"];
    $detailPageObj = $params["detailPageObj"];
    global $conn, $strTableName;
    $xt = new Xtempl();
    $oldTableName = $strTableName;
    $strTableName = "pad.pad_spt";
    $settings = new ProjectSettings($strTableName, PAGE_LIST);
    $cipherer = new RunnerCipherer($strTableName);
    $masterQuery = $settings->getSQLQuery();
    $viewControls = new ViewControlsContainer($settings, PAGE_LIST);
    $where = "";
    $mKeys = array();
    $showKeys = "";
    global $page_styles, $page_layouts, $page_layout_names, $container_styles;
    $layout = new TLayout("masterlist", "RoundedGreen", "MobileGreen");
    $layout->blocks["bare"] = array();
    $layout->containers["0"] = array();
    $layout->containers["0"][] = array("name" => "masterlistheader", "block" => "", "substyle" => 1);
    $layout->skins["0"] = "empty";
    $layout->blocks["bare"][] = "0";
    $layout->containers["mastergrid"] = array();
    $layout->containers["mastergrid"][] = array("name" => "masterlistfields", "block" => "", "substyle" => 1);
    $layout->skins["mastergrid"] = "grid";
    $layout->blocks["bare"][] = "mastergrid";
    $page_layouts["pad_pad_spt_masterlist"] = $layout;
    if ($detailtable == "pad.pad_air_tanah_hit") {
        $where .= GetFullFieldName("id", "", false) . "=" . $cipherer->MakeDBValue("id", $keys[1 - 1], "", "", true);
        $showKeys .= " " . "Id" . ": " . $keys[1 - 1];
        $xt->assign('showKeys', $showKeys);
    }
    if ($detailtable == "pad.pad_stpd") {
        $where .= GetFullFieldName("id", "", false) . "=" . $cipherer->MakeDBValue("id", $keys[1 - 1], "", "", true);
        $showKeys .= " " . "Id" . ": " . $keys[1 - 1];
        $xt->assign('showKeys', $showKeys);
    }
    if (!$where) {
        $strTableName = $oldTableName;
        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();
    //	$strSQL = AddWhere($strSQL,$where);
    LogInfo($strSQL);
    $rs = db_query($strSQL, $conn);
    $data = $cipherer->DecryptFetchedArray($rs);
    if (!$data) {
        $strTableName = $oldTableName;
        return;
    }
    $keylink = "";
    $keylink .= "&key1=" . htmlspecialchars(rawurlencode(@$data["id"]));
    //	id -
    $value = "";
    $xt->assign("id_mastervalue", $viewControls->showDBValue("id", $data, $keylink));
    //	tahun -
    $value = "";
    $xt->assign("tahun_mastervalue", $viewControls->showDBValue("tahun", $data, $keylink));
    //	sptno -
    $value = "";
    $xt->assign("sptno_mastervalue", $viewControls->showDBValue("sptno", $data, $keylink));
    //	customer_id -
    $value = "";
    $xt->assign("customer_id_mastervalue", $viewControls->showDBValue("customer_id", $data, $keylink));
    //	customer_usaha_id -
    $value = "";
    $xt->assign("customer_usaha_id_mastervalue", $viewControls->showDBValue("customer_usaha_id", $data, $keylink));
    //	rekening_id -
    $value = "";
    $xt->assign("rekening_id_mastervalue", $viewControls->showDBValue("rekening_id", $data, $keylink));
    //	pajak_id -
    $value = "";
    $xt->assign("pajak_id_mastervalue", $viewControls->showDBValue("pajak_id", $data, $keylink));
    //	type_id -
    $value = "";
    $xt->assign("type_id_mastervalue", $viewControls->showDBValue("type_id", $data, $keylink));
    //	so -
    $value = "";
    $xt->assign("so_mastervalue", $viewControls->showDBValue("so", $data, $keylink));
    //	masadari - Short Date
    $value = "";
    $xt->assign("masadari_mastervalue", $viewControls->showDBValue("masadari", $data, $keylink));
    //	masasd - Short Date
    $value = "";
    $xt->assign("masasd_mastervalue", $viewControls->showDBValue("masasd", $data, $keylink));
    //	jatuhtempotgl - Short Date
    $value = "";
    $xt->assign("jatuhtempotgl_mastervalue", $viewControls->showDBValue("jatuhtempotgl", $data, $keylink));
    //	r_bayarid -
    $value = "";
    $xt->assign("r_bayarid_mastervalue", $viewControls->showDBValue("r_bayarid", $data, $keylink));
//.........这里部分代码省略.........
开发者ID:aagusti,项目名称:padl-tng,代码行数:101,代码来源:pad_pad_spt_masterlist.php

示例14: SQLWhere

 function SQLWhere($SearchFor, $strSearchOption, $SearchFor2, $etype, $isSuggest)
 {
     $baseResult = $this->baseSQLWhere($strSearchOption);
     if ($baseResult === false) {
         return "";
     }
     if ($baseResult != "") {
         return $baseResult;
     }
     $value1 = $this->pageObject->cipherer->MakeDBValue($this->field, $SearchFor, $etype, "", true);
     $value2 = false;
     $cleanvalue2 = false;
     if ($strSearchOption == "Between") {
         $cleanvalue2 = prepare_for_db($this->field, $SearchFor2, $etype);
         $value2 = make_db_value($this->field, $SearchFor2, $etype);
     }
     if ($strSearchOption != "Contains" && $strSearchOption != "Starts with" && ($value1 === "null" || $value2 === "null") && !$this->pageObject->cipherer->isFieldPHPEncrypted($this->field)) {
         return "";
     }
     if (IsCharType($this->type) && !$this->btexttype) {
         if (!$this->pageObject->cipherer->isFieldPHPEncrypted($this->field)) {
             $value1 = $this->pageObject->pSetEdit->isEnableUpper($value1);
             $value2 = $this->pageObject->pSetEdit->isEnableUpper($value2);
             $gstrField = $this->pageObject->pSetEdit->isEnableUpper(GetFullFieldName($this->field, "", false));
         } else {
             $gstrField = GetFullFieldName($this->field, "", false);
         }
     } elseif ($strSearchOption == "Contains" || $strSearchOption == "Starts with") {
         $gstrField = db_field2char(GetFullFieldName($this->field, "", false), $this->type);
     } elseif ($this->pageObject->pSetEdit->getViewFormat($this->field) == FORMAT_TIME) {
         $gstrField = db_field2time(GetFullFieldName($this->field, "", false), $this->type);
     } else {
         $gstrField = GetFullFieldName($this->field, "", false);
     }
     $ret = "";
     if ($strSearchOption == "Contains") {
         $SearchFor = $this->escapeSearchValForMySQL($SearchFor);
         if ($this->pageObject->cipherer->isFieldPHPEncrypted($this->field)) {
             return $gstrField . "=" . $this->pageObject->cipherer->MakeDBValue($this->field, $SearchFor);
         }
         if (IsCharType($this->type) && !$this->btexttype) {
             return $gstrField . " " . $this->like . " " . $this->pageObject->pSetEdit->isEnableUpper(db_prepare_string("%" . $SearchFor . "%"));
         } else {
             return $gstrField . " " . $this->like . " " . db_prepare_string("%" . $SearchFor . "%");
         }
     } else {
         if ($strSearchOption == "Equals") {
             return $gstrField . "=" . $value1;
         } else {
             if ($strSearchOption == "Starts with") {
                 $SearchFor = $this->escapeSearchValForMySQL($SearchFor);
                 if (IsCharType($this->type) && !$this->btexttype) {
                     return $gstrField . " " . $this->like . " " . $this->pageObject->pSetEdit->isEnableUpper(db_prepare_string($SearchFor . "%"));
                 } else {
                     return $gstrField . " " . $this->like . " " . db_prepare_string($SearchFor . "%");
                 }
             } else {
                 if ($strSearchOption == "More than") {
                     return $gstrField . ">" . $value1;
                 } else {
                     if ($strSearchOption == "Less than") {
                         return $gstrField . "<" . $value1;
                     } else {
                         if ($strSearchOption == "Equal or more than") {
                             return $gstrField . ">=" . $value1;
                         } else {
                             if ($strSearchOption == "Equal or less than") {
                                 return $gstrField . "<=" . $value1;
                             } else {
                                 if ($strSearchOption == "Between") {
                                     $ret = $gstrField . ">=" . $value1 . " and ";
                                     if (IsDateFieldType($this->type)) {
                                         $timeArr = db2time($cleanvalue2);
                                         // for dates without time, add one day
                                         if ($timeArr[3] == 0 && $timeArr[4] == 0 && $timeArr[5] == 0) {
                                             $timeArr = adddays($timeArr, 1);
                                             $value2 = $timeArr[0] . "-" . $timeArr[1] . "-" . $timeArr[2];
                                             $value2 = add_db_quotes($this->field, $value2, $this->pageObject->tName);
                                             $ret .= $gstrField . "<" . $value2;
                                         } else {
                                             $ret .= $gstrField . "<=" . $value2;
                                         }
                                     } else {
                                         $ret .= $gstrField . "<=" . $value2;
                                     }
                                     return $ret;
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     return "";
 }
开发者ID:aagusti,项目名称:padl-tng,代码行数:96,代码来源:Control.php

示例15: SQLWhere

 function SQLWhere($SearchFor, $strSearchOption, $SearchFor2, $etype, $isSuggest)
 {
     if ($this->lookupType == LT_LISTOFVALUES) {
         return parent::SQLWhere($SearchFor, $strSearchOption, $SearchFor2, $etype, $isSuggest);
     }
     $baseResult = $this->baseSQLWhere($strSearchOption);
     if ($baseResult === false) {
         return "";
     }
     if ($baseResult != "") {
         return $baseResult;
     }
     $displayFieldType = $this->type;
     if ($this->lookupType == LT_QUERY) {
         $displayFieldType = $this->lookupPSet->getFieldType($this->field);
         $this->btexttype = IsTextType($displayFieldType);
     }
     if ($this->multiselect) {
         $SearchFor = splitvalues($SearchFor);
     } else {
         $SearchFor = array($SearchFor);
     }
     $ret = "";
     if ($this->linkAndDisplaySame) {
         $gstrField = GetFullFieldName($this->field, "", false);
     } else {
         $gstrField = GetFullFieldName($this->displayFieldName, $this->lookupTable, false);
     }
     if ($this->customDisplay) {
         $gstrField = $this->lwDisplayFieldWrapped;
     } else {
         if (!$this->linkAndDisplaySame && $this->lookupType == LT_QUERY && IsCharType($displayFieldType) && !$this->btexttype && !$this->ciphererDisplay->isFieldPHPEncrypted($this->displayFieldName)) {
             $gstrField = $this->lookupPSet->isEnableUpper(GetFullFieldName($this->displayFieldName, $this->lookupTable, false));
         }
     }
     foreach ($SearchFor as $value) {
         if (!($value == "null" || $value == "Null" || $value == "")) {
             if (strlen(trim($ret))) {
                 $ret .= " or ";
             }
             if (!$this->multiselect) {
                 if ($strSearchOption == "Starts with") {
                     $value .= '%';
                 }
                 if ($isSuggest || $strSearchOption == "Contains") {
                     $value = '%' . $value . '%';
                 }
                 if ($isSuggest || $strSearchOption == "Contains" || $strSearchOption == "Starts with" || $strSearchOption == "More than" || $strSearchOption == "Less than" || $strSearchOption == "Equal or more than" || $strSearchOption == "Equal or less than" || $strSearchOption == "Between" || $strSearchOption == "Equals" && $this->LCType == LCT_AJAX && !$this->linkAndDisplaySame) {
                     $value = $this->escapeSearchValForMySQL($value);
                     if ($this->lookupType == LT_QUERY && IsCharType($displayFieldType) && !$this->btexttype) {
                         $value = $this->lookupPSet->isEnableUpper(db_prepare_string($value));
                     } else {
                         $value = db_prepare_string($value);
                     }
                 } else {
                     if ($strSearchOption == "Equals") {
                         $value = make_db_value($this->field, $value);
                     }
                 }
             }
             if ($strSearchOption == "Equals") {
                 if (!($value == "null" || $value == "Null")) {
                     if ($this->LCType == LCT_AJAX && !$this->linkAndDisplaySame) {
                         $condition = $gstrField . '=' . $value;
                     } else {
                         $condition = GetFullFieldName($this->field, "", false) . '=' . $value;
                     }
                 }
             } else {
                 if ($strSearchOption == "Starts with" || $strSearchOption == "Contains" && !$this->multiselect) {
                     $condition = $gstrField . " " . $this->like . " " . $value;
                 } else {
                     if ($strSearchOption == "More than") {
                         $condition = $gstrField . " > " . $value;
                     } else {
                         if ($strSearchOption == "Less than") {
                             $condition = $gstrField . "<" . $value;
                         } else {
                             if ($strSearchOption == "Equal or more than") {
                                 $condition = $gstrField . ">=" . $value1;
                             } else {
                                 if ($strSearchOption == "Equal or less than") {
                                     $condition = $gstrField . "<=" . $value1;
                                 } else {
                                     if ($strSearchOption == "Between") {
                                         if ($this->lookupType == LT_QUERY && IsCharType($displayFieldType) && !$this->btexttype) {
                                             $value2 = $this->lookupPSet->isEnableUpper(db_prepare_string($SearchFor2));
                                         } else {
                                             $value2 = db_prepare_string($SearchFor2);
                                         }
                                         $condition = $gstrField . ">=" . $value . " and ";
                                         if (IsDateFieldType($this->type)) {
                                             $timeArr = db2time($SearchFor2);
                                             // for dates without time, add one day
                                             if ($timeArr[3] == 0 && $timeArr[4] == 0 && $timeArr[5] == 0) {
                                                 $timeArr = adddays($timeArr, 1);
                                                 $SearchFor2 = $timeArr[0] . "-" . $timeArr[1] . "-" . $timeArr[2];
                                                 $SearchFor2 = add_db_quotes($this->field, $SearchFor2, $this->pageObject->tName);
                                                 $condition .= $gstrField . "<" . $SearchFor2;
                                             } else {
//.........这里部分代码省略.........
开发者ID:aagusti,项目名称:padl-tng,代码行数:101,代码来源:LookupField.php


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