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


PHP ProjectSettings::getFieldType方法代码示例

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


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

示例1:

 //	Grp_id -
 $viewContainer->recId = $recordsCounter;
 $value = $viewContainer->showDBValue("Grp_id", $data, $keylink);
 $row["Grp_id_value"] = $value;
 $format = $pSet->getViewFormat("Grp_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($pSet->getFieldType("Grp_id"))) {
     $class = ' rnr-field-number';
 }
 $row["Grp_id_class"] = $class;
 //	StockCode -
 $viewContainer->recId = $recordsCounter;
 $value = $viewContainer->showDBValue("StockCode", $data, $keylink);
 $row["StockCode_value"] = $value;
 $format = $pSet->getViewFormat("StockCode");
 $class = "rnr-field-text";
 if ($format == FORMAT_FILE) {
     $class = ' rnr-field-file';
 }
 if ($format == FORMAT_AUDIO) {
     $class = ' rnr-field-audio';
 }
开发者ID:sdev1,项目名称:CloudStockEnquiry,代码行数:31,代码来源:StockMaster_detailspreview.php

示例2: array

            continue;
        }
        if ($masterTablesInfoArr[$i]['dispInfo']) {
            $detailKeys = $masterTablesInfoArr[$i]['detailKeys'];
            for ($j = 0; $j < count($detailKeys); $j++) {
                $masterWhere .= " and " . $controls->getControl($detailKeys[$j])->getSuggestWhere('Equals', @$_SESSION[$strTableName . "_masterkey" . ($j + 1)]);
            }
        }
        break;
    }
}
$result = array();
// traversing searchable fields
foreach ($allSearchFields as $f) {
    // filter fields by type
    $fType = $pSet->getFieldType($f);
    if (!IsCharType($fType) && !IsNumberType($fType) && !IsGuid($fType) || in_array($f, $detailKeys)) {
        continue;
    }
    if ($_connection->dbType == nDATABASE_Oracle && IsTextType($fType)) {
        continue;
    }
    if ($searchField != '' && $searchField != GoodFieldName($f) || !$pSet->checkFieldPermissions($f)) {
        continue;
    }
    $fieldControl = $controls->getControl($f);
    $isAggregateField = $pSet->isAggregateField($f);
    $where = $fieldControl->getSuggestWhere($searchOpt, $searchFor, $isAggregateField);
    $having = $fieldControl->getSuggestHaving($searchOpt, $searchFor, $isAggregateField);
    if (!strlen($where) && !strlen($having)) {
        continue;
开发者ID:sdev1,项目名称:CloudStockEnquiry,代码行数:31,代码来源:searchsuggest.php

示例3: LogDelete

 function LogDelete($str_table, $values, $keys)
 {
     global $globalEvents;
     $retval = true;
     $table = $str_table;
     $pSet = new ProjectSettings($str_table);
     $arr = array();
     if ($globalEvents->exists("OnAuditLog")) {
         $retval = $globalEvents->OnAuditLog($this->strDelete, $this->params, $table, $keys, $values, $arr);
     }
     if ($retval) {
         if (count($keys) > 0) {
             $key = "";
             foreach ($keys as $idx => $val) {
                 if ($key != "") {
                     $key .= ",";
                 }
                 $key .= $val;
             }
         }
         $fp = $this->CreateLogFile();
         $str = format_datetime_custom(db2time(now()), "MMM dd,yyyy") . chr(9) . format_datetime_custom(db2time(now()), "HH:mm:ss") . chr(9) . $this->params[0] . chr(9) . $this->params[1] . chr(9) . $table . chr(9) . $this->strDelete . chr(9) . $key;
         $str_add = "";
         if ($this->logValueEnable($str_table)) {
             foreach ($values as $idx => $val) {
                 $v = "";
                 if (IsBinaryType($pSet->getFieldType($idx))) {
                     $v = "<binary value>";
                 } else {
                     $v = str_replace(array("\r\n", "\n", "\t"), " ", $val);
                     if (strlen($v) > $this->maxFieldLength) {
                         $v = substr($v, 0, $this->maxFieldLength);
                     }
                 }
                 if ($fp) {
                     $str_add .= $str . chr(9) . $idx . chr(9) . $v . "\r\n";
                 }
             }
         } else {
             $str_add = $str . "\r\n";
         }
         if ($fp) {
             fputs($fp, $str_add);
             fclose($fp);
         }
     }
     return $retval;
 }
开发者ID:aagusti,项目名称:padl-tng,代码行数:48,代码来源:audit.php

示例4: WRCustomGetFieldType

function WRCustomGetFieldType($table, $field)
{
    global $conn;
    if (is_wr_project()) {
        $pSet = new ProjectSettings($_SESSION['webreports']['tables'][0]);
        $type = $pSet->getFieldType($field);
        if ($type) {
            return $type;
        }
    }
    if (is_wr_db()) {
        global $wr_is_standalone;
        if (!$wr_is_standalone) {
            global $dal;
            if ($dal->Table($table)) {
                return $dal->GetFieldType($table, $field);
            }
        }
        return dbinfoFieldsType($table, $field);
    }
    if (is_wr_custom()) {
        $res = "";
        $sql = $_SESSION["object_sql"];
        if ($sql) {
            //The default connection is temporary used #9875
            $connection = getDefaultConnection();
            $arr = $connection->getFieldsList($sql);
            foreach ($arr as $val) {
                if ($val["fieldname"] == $field) {
                    $res = $val["type"];
                }
            }
        }
        return $res;
    }
}
开发者ID:kcallow,项目名称:MatchMe,代码行数:36,代码来源:reportfunctions.php

示例5: GetFieldType

function GetFieldType($field, $table = "")
{
    global $pageObject;
    if ($table != "" || !isset($pageObject)) {
        if ($table == "") {
            global $strTableName;
            $table = $strTableName;
        }
        $newSet = new ProjectSettings($table);
        return $newSet->getFieldType($field);
    } else {
        return $pageObject->pSet->getFieldType($field);
    }
}
开发者ID:aagusti,项目名称:padl-tng,代码行数:14,代码来源:commonfunctions.php

示例6:

{
	$flag=true;
	$i=0;
	$fields_type=array();
	if(is_wr_custom())
		$fields_type=WRGetAllCustomFieldType();
	while(($data=db_fetch_array($rs)) && $i<$num_rows)
	{
		$i++;

		if ($flag) {
			foreach( array_keys($data) as $key ) 
			{
				if(is_wr_project())
				{
					if(IsBinaryType($gSettings->getFieldType($key)))
						continue;
				}
				elseif(is_wr_custom())
				{
					if(IsBinaryType($fields_type[$key]))
						continue;
				}
				if($gSettings)
					$gKey = $gSettings->label($key);
				else
					$gKey = $key;
				
				$res_head .= "<th>" . runner_htmlspecialchars($gKey) . "</th>";		
			}
		}
开发者ID:helbertfurbino,项目名称:sgmofinanceiro,代码行数:31,代码来源:web_query.php

示例7: GetType

	function GetType()
	{
		$pSet = new ProjectSettings($this->m_strTable);
		return $pSet->getFieldType($this->m_strName);
	}
开发者ID:helbertfurbino,项目名称:sgmofinanceiro,代码行数:5,代码来源:sql.php

示例8: addSpanVal

 /**
  * Add span val for lookup fields, and average|total|count totals
  */
 function addSpanVal($fName, &$data)
 {
     global $strTableName;
     $pSet = new ProjectSettings($strTableName, PAGE_LIST);
     $type = $pSet->getFieldType($fName);
     if ((@$this->arrFieldSpanVal[$fName] == 2 || @$this->arrFieldSpanVal[$fName] == 1) && !IsBinaryType($type)) {
         return "val=\"" . runner_htmlspecialchars($data[$fName]) . "\" ";
     }
 }
开发者ID:sdev1,项目名称:CloudStockEnquiry,代码行数:12,代码来源:listpage.php

示例9: 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
	* @return String
	*/
	function getFilterWhereByType($filterType, $fName, $fValue, $sValue, $parentValues) 
	{
		$pSet = new ProjectSettings($this->tName, PAGE_SEARCH);
		
		$fullFieldName = $pSet->getFullFieldNameCiph($fName, $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);

			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[] = $pSet->getFullFieldNameCiph($parentName, $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");
			
			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:helbertfurbino,项目名称:sgmofinanceiro,代码行数:99,代码来源:searchclause.php

示例10: WRCustomGetFieldType

function WRCustomGetFieldType($table,$field)
{
	global $conn;
	if(is_wr_project())
	{
		$pSet = new ProjectSettings($_SESSION['webreports']['tables'][0]);
		$type = $pSet->getFieldType($field);
		if($type)
			return $type;
	}
	if(is_wr_db())
	{
		global $wr_is_standalone;
		if(!$wr_is_standalone)
		{
			global $dal;
			if($dal->Table($table))
				return $dal->GetFieldType($table,$field);
		}
		return dbinfoFieldsType($table,$field);
	}
	if(is_wr_custom())
	{
		$res="";
		$sql=$_SESSION["object_sql"];
		if($sql)
		{
			$arr=db_getfieldslist($sql);
			foreach($arr as $val)
				if($val["fieldname"]==$field)
					$res=$val["type"];
		}
		return $res;
	}
}
开发者ID:helbertfurbino,项目名称:sgmofinanceiro,代码行数:35,代码来源:reportfunctions.php


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