亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? adodb-recordset.inc.php

?? 類似youtube的視頻分享網站源碼。有后臺管理系統及模板
?? PHP
?? 第 1 頁 / 共 2 頁
字號:
<?php
/** 
 * @version V3.40 7 April 2003 (c) 2000-2003 John Lim (jlim@natsoft.com.my). All rights reserved.
 * Released under both BSD license and Lesser GPL library license. 
 * Whenever there is any discrepancy between the two licenses, 
 * the BSD license will take precedence. 
 *
 * Set tabs to 4 for best viewing.
 * 
 * Latest version is available at http://php.weblogs.com
 *
 */

 
   /**
	 * RecordSet class that represents the dataset returned by the database.
	 * To keep memory overhead low, this class holds only the current row in memory.
	 * No prefetching of data is done, so the RecordCount() can return -1 ( which
	 * means recordcount not known).
	 */
	class ADORecordSet {
	/*
	 * public variables	
	 */
	var $dataProvider = "native";
	var $fields = false; 	/// holds the current row data
	var $blobSize = 64; 	/// any varchar/char field this size or greater is treated as a blob
							/// in other words, we use a text area for editting.
	var $canSeek = false; 	/// indicates that seek is supported
	var $sql; 				/// sql text
	var $EOF = false;		/// Indicates that the current record position is after the last record in a Recordset object. 
	
	var $emptyTimeStamp = '&nbsp;'; /// what to display when $time==0
	var $emptyDate = '&nbsp;'; /// what to display when $time==0
	var $debug = false;
	var $timeCreated=0; 	/// datetime in Unix format rs created -- for cached recordsets

	var $bind = false; 		/// used by Fields() to hold array - should be private?
	var $fetchMode;			/// default fetch mode
	var $connection = false; /// the parent connection
	/*
	 *	private variables	
	 */
	var $_numOfRows = -1;	/** number of rows, or -1 */
	var $_numOfFields = -1;	/** number of fields in recordset */
	var $_queryID = -1;		/** This variable keeps the result link identifier.	*/
	var $_currentRow = -1;	/** This variable keeps the current row in the Recordset.	*/
	var $_closed = false; 	/** has recordset been closed */
	var $_inited = false; 	/** Init() should only be called once */
	var $_obj; 				/** Used by FetchObj */
	var $_names;			/** Used by FetchObj */
	
	var $_currentPage = -1;	/** Added by Iv醤 Oliva to implement recordset pagination */
	var $_atFirstPage = false;	/** Added by Iv醤 Oliva to implement recordset pagination */
	var $_atLastPage = false;	/** Added by Iv醤 Oliva to implement recordset pagination */
	var $_lastPageNo = -1; 
	var $_maxRecordCount = 0;
	var $dateHasTime = false;
	
	/**
	 * Constructor
	 *
	 * @param queryID  	this is the queryID returned by ADOConnection->_query()
	 *
	 */
	function ADORecordSet($queryID) 
	{
		$this->_queryID = $queryID;
	}
	
	
	
	function Init()
	{
		if ($this->_inited) return;
		$this->_inited = true;
		if ($this->_queryID) @$this->_initrs();
		else {
			$this->_numOfRows = 0;
			$this->_numOfFields = 0;
		}
		if ($this->_numOfRows != 0 && $this->_numOfFields && $this->_currentRow == -1) {
			$this->_currentRow = 0;
			if ($this->EOF = ($this->_fetch() === false)) {
				$this->_numOfRows = 0; // _numOfRows could be -1
			}
		} else {
			$this->EOF = true;
		}
	}
	
	
	/**
	 * Generate a SELECT tag string from a recordset, and return the string.
	 * If the recordset has 2 cols, we treat the 1st col as the containing 
	 * the text to display to the user, and 2nd col as the return value. Default
	 * strings are compared with the FIRST column.
	 *
	 * @param name  		name of SELECT tag
	 * @param [defstr]		the value to hilite. Use an array for multiple hilites for listbox.
	 * @param [blank1stItem]	true to leave the 1st item in list empty
	 * @param [multiple]		true for listbox, false for popup
	 * @param [size]		#rows to show for listbox. not used by popup
	 * @param [selectAttr]		additional attributes to defined for SELECT tag.
	 *				useful for holding javascript onChange='...' handlers.
	 & @param [compareFields0]	when we have 2 cols in recordset, we compare the defstr with 
	 *				column 0 (1st col) if this is true. This is not documented.
	 *
	 * @return HTML
	 *
	 * changes by glen.davies@cce.ac.nz to support multiple hilited items
	 */
	function GetMenu($name,$defstr='',$blank1stItem=true,$multiple=false,
			$size=0, $selectAttr='',$compareFields0=true)
	{
		include_once(ADODB_DIR.'/adodb-lib.inc.php');
		return _adodb_getmenu($this, $name,$defstr,$blank1stItem,$multiple,
			$size, $selectAttr,$compareFields0);
	}
	
	/**
	 * Generate a SELECT tag string from a recordset, and return the string.
	 * If the recordset has 2 cols, we treat the 1st col as the containing 
	 * the text to display to the user, and 2nd col as the return value. Default
	 * strings are compared with the SECOND column.
	 *
	 */
	function GetMenu2($name,$defstr='',$blank1stItem=true,$multiple=false,$size=0, $selectAttr='')	
	{
		include_once(ADODB_DIR.'/adodb-lib.inc.php');
		return _adodb_getmenu($this,$name,$defstr,$blank1stItem,$multiple,
			$size, $selectAttr,false);
	}


	/**
	 * return recordset as a 2-dimensional array.
	 *
	 * @param [nRows]  is the number of rows to return. -1 means every row.
	 *
	 * @return an array indexed by the rows (0-based) from the recordset
	 */
	function GetArray($nRows = -1) 
	{
	global $ADODB_EXTENSION; if ($ADODB_EXTENSION) return adodb_getall($this,$nRows);
		
		$results = array();
		$cnt = 0;
		while (!$this->EOF && $nRows != $cnt) {
			$results[] = $this->fields;
			$this->MoveNext();
			$cnt++;
		}
		return $results;
	}
	
	/*
	* Some databases allow multiple recordsets to be returned. This function
	* will return true if there is a next recordset, or false if no more.
	*/
	function NextRecordSet()
	{
		return false;
	}
	
	/**
	 * return recordset as a 2-dimensional array. 
	 * Helper function for ADOConnection->SelectLimit()
	 *
	 * @param offset	is the row to start calculations from (1-based)
	 * @param [nrows]	is the number of rows to return
	 *
	 * @return an array indexed by the rows (0-based) from the recordset
	 */
	function GetArrayLimit($nrows,$offset=-1) 
	{	
		if ($offset <= 0) {
			return $this->GetArray($nrows);
		} 
		
		$this->Move($offset);
		
		$results = array();
		$cnt = 0;
		while (!$this->EOF && $nrows != $cnt) {
			$results[$cnt++] = $this->fields;
			$this->MoveNext();
		}
		
		return $results;
	}
	
	
	/**
	 * Synonym for GetArray() for compatibility with ADO.
	 *
	 * @param [nRows]  is the number of rows to return. -1 means every row.
	 *
	 * @return an array indexed by the rows (0-based) from the recordset
	 */
	function GetRows($nRows = -1) 
	{
		return $this->GetArray($nRows);
	}
	
	/**
	 * return whole recordset as a 2-dimensional associative array if there are more than 2 columns. 
	 * The first column is treated as the key and is not included in the array. 
	 * If there is only 2 columns, it will return a 1 dimensional array of key-value pairs unless
	 * $force_array == true.
	 *
	 * @param [force_array] has only meaning if we have 2 data columns. If false, a 1 dimensional
	 * 	array is returned, otherwise a 2 dimensional array is returned. If this sounds confusing,
	 * 	read the source.
	 *
	 * @param [first2cols] means if there are more than 2 cols, ignore the remaining cols and 
	 * instead of returning array[col0] => array(remaining cols), return array[col0] => col1
	 *
	 * @return an associative array indexed by the first column of the array, 
	 * 	or false if the  data has less than 2 cols.
	 */
	function GetAssoc($force_array = false, $first2cols = false) {
		$cols = $this->_numOfFields;
		if ($cols < 2) {
			return false;
		}
		$numIndex = isset($this->fields[0]);
		$results = array();
		
		if (!$first2cols && ($cols > 2 || $force_array)) {
			if ($numIndex) {
				while (!$this->EOF) {
					$results[trim($this->fields[0])] = array_slice($this->fields, 1);
					$this->MoveNext();
				}
			} else {
				while (!$this->EOF) {
					$results[trim(reset($this->fields))] = array_slice($this->fields, 1);
					$this->MoveNext();
				}
			}
		} else {
			// return scalar values
			if ($numIndex) {
				while (!$this->EOF) {
				// some bug in mssql PHP 4.02 -- doesn't handle references properly so we FORCE creating a new string
					$results[trim(($this->fields[0]))] = $this->fields[1];
					$this->MoveNext();
				}
			} else {
				while (!$this->EOF) {
				// some bug in mssql PHP 4.02 -- doesn't handle references properly so we FORCE creating a new string
					$v1 = trim(reset($this->fields));
					$v2 = ''.next($this->fields); 
					$results[$v1] = $v2;
					$this->MoveNext();
				}
			}
		}
		return $results; 
	}
	
	
	/**
	 *
	 * @param v  	is the character timestamp in YYYY-MM-DD hh:mm:ss format
	 * @param fmt 	is the format to apply to it, using date()
	 *
	 * @return a timestamp formated as user desires
	 */
	function UserTimeStamp($v,$fmt='Y-m-d H:i:s')
	{
		$tt = $this->UnixTimeStamp($v);
		// $tt == -1 if pre TIMESTAMP_FIRST_YEAR
		if (($tt === false || $tt == -1) && $v != false) return $v;
		if ($tt == 0) return $this->emptyTimeStamp;
		return adodb_date($fmt,$tt);
	}
	
	
	/**
	 * @param v  	is the character date in YYYY-MM-DD format, returned by database
	 * @param fmt 	is the format to apply to it, using date()
	 *
	 * @return a date formated as user desires
	 */
	function UserDate($v,$fmt='Y-m-d')
	{
		$tt = $this->UnixDate($v);
		// $tt == -1 if pre TIMESTAMP_FIRST_YEAR
		if (($tt === false || $tt == -1) && $v != false) return $v;
		else if ($tt == 0) return $this->emptyDate;
		else if ($tt == -1) { // pre-TIMESTAMP_FIRST_YEAR
		}
		return adodb_date($fmt,$tt);
	
	}
	
	
	/**
	 * @param $v is a date string in YYYY-MM-DD format
	 *
	 * @return date in unix timestamp format, or 0 if before TIMESTAMP_FIRST_YEAR, or false if invalid date format
	 */
	function UnixDate($v)
	{
		
		if (!preg_match( "|^([0-9]{4})[-/\.]?([0-9]{1,2})[-/\.]?([0-9]{1,2})|", 
			($v), $rr)) return false;
			
		if ($rr[1] <= 1903) return 0;
		// h-m-s-MM-DD-YY
		return @adodb_mktime(0,0,0,$rr[2],$rr[3],$rr[1]);
	}
	

	/**
	 * @param $v is a timestamp string in YYYY-MM-DD HH-NN-SS format
	 *
	 * @return date in unix timestamp format, or 0 if before TIMESTAMP_FIRST_YEAR, or false if invalid date format
	 */
	function UnixTimeStamp($v)
	{
		
		if (!preg_match( 
			"|^([0-9]{4})[-/\.]?([0-9]{1,2})[-/\.]?([0-9]{1,2})[ -]?(([0-9]{1,2}):?([0-9]{1,2}):?([0-9\.]{1,4}))?|", 
			($v), $rr)) return false;
		if ($rr[1] <= 1903 && $rr[2]<= 1) return 0;
	
		// h-m-s-MM-DD-YY
		if (!isset($rr[5])) return  adodb_mktime(0,0,0,$rr[2],$rr[3],$rr[1]);
		return  @adodb_mktime($rr[5],$rr[6],$rr[7],$rr[2],$rr[3],$rr[1]);
	}
	
	
	/**
	* PEAR DB Compat - do not use internally
	*/
	function Free()
	{
		return $this->Close();
	}
	
	
	/**
	* PEAR DB compat, number of rows
	*/
	function NumRows()
	{
		return $this->_numOfRows;
	}
	
	
	/**
	* PEAR DB compat, number of cols
	*/
	function NumCols()
	{
		return $this->_numOfFields;
	}
	
	/**
	* Fetch a row, returning false if no more rows. 
	* This is PEAR DB compat mode.
	*
	* @return false or array containing the current record
	*/
	function FetchRow()
	{
		if ($this->EOF) return false;
		$arr = $this->fields;
		$this->_currentRow++;
		if (!$this->_fetch()) $this->EOF = true;
		return $arr;
	}
	
	
	/**
	* Fetch a row, returning PEAR_Error if no more rows. 
	* This is PEAR DB compat mode.
	*
	* @return DB_OK or error object
	*/
	function FetchInto(&$arr)
	{
		if ($this->EOF) return (defined('PEAR_ERROR_RETURN')) ? new PEAR_Error('EOF',-1): false;
		$arr = $this->fields;
		$this->MoveNext();
		return 1; // DB_OK
	}
	
	
	/**
	 * Move to the first row in the recordset. Many databases do NOT support this.
	 *
	 * @return true or false
	 */
	function MoveFirst() 
	{
		if ($this->_currentRow == 0) return true;
		return $this->Move(0);			
	}			

	
	/**
	 * Move to the last row in the recordset. 
	 *
	 * @return true or false
	 */
	function MoveLast() 
	{
		if ($this->_numOfRows >= 0) return $this->Move($this->_numOfRows-1);
		if ($this->EOF) return false;
		while (!$this->EOF) {
			$f = $this->fields;
			$this->MoveNext();
		}
		$this->fields = $f;
		$this->EOF = false;
		return true;
	}
	
	
	/**
	 * Move to next record in the recordset.
	 *
	 * @return true if there still rows available, or false if there are no more rows (EOF).
	 */
	function MoveNext() 
	{
		if (!$this->EOF) {
			$this->_currentRow++;
			if ($this->_fetch()) return true;
		}
		$this->EOF = true;
		/* -- tested error handling when scrolling cursor -- seems useless.
		$conn = $this->connection;
		if ($conn && $conn->raiseErrorFn && ($errno = $conn->ErrorNo())) {
			$fn = $conn->raiseErrorFn;
			$fn($conn->databaseType,'MOVENEXT',$errno,$conn->ErrorMsg().' ('.$this->sql.')',$conn->host,$conn->database);
		}
		*/
		return false;
	}	
	
	/**
	 * Random access to a specific row in the recordset. Some databases do not support
	 * access to previous rows in the databases (no scrolling backwards).
	 *
	 * @param rowNumber is the row to move to (0-based)
	 *
	 * @return true if there still rows available, or false if there are no more rows (EOF).
	 */
	function Move($rowNumber = 0) 
	{
		$this->EOF = false;
		if ($rowNumber == $this->_currentRow) return true;
		if ($rowNumber >= $this->_numOfRows)
	   		if ($this->_numOfRows != -1) $rowNumber = $this->_numOfRows-2;
  				

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲免费观看高清完整版在线观看熊| 亚洲免费大片在线观看| 欧美丝袜丝交足nylons图片| 99riav一区二区三区| 菠萝蜜视频在线观看一区| 国产精品综合av一区二区国产馆| 久久99热这里只有精品| 青青草国产成人99久久| 九九视频精品免费| 国产99久久久久| 国产99久久久久| 91在线视频免费观看| 91国产福利在线| 欧美日韩aaaaaa| 日韩三级高清在线| 久久久不卡影院| 亚洲日本中文字幕区| 夜夜嗨av一区二区三区网页| 午夜在线成人av| 黄页视频在线91| 91视频.com| 欧美久久久久久蜜桃| 久久众筹精品私拍模特| 成人免费在线观看入口| 日本午夜精品一区二区三区电影| 激情深爱一区二区| 99精品视频在线观看| 91精品国产91久久综合桃花 | 制服丝袜亚洲播放| 日韩欧美久久一区| 欧美激情一区二区三区全黄| 亚洲成人1区2区| 丁香天五香天堂综合| 欧美日韩和欧美的一区二区| 久久精品一区二区| 亚洲大片在线观看| 国产高清不卡一区| 欧美理论片在线| 国产欧美一区二区精品秋霞影院| 亚洲国产成人精品视频| 黑人巨大精品欧美一区| 精品视频在线免费看| 国产精品视频观看| 男人的j进女人的j一区| 色狠狠桃花综合| 久久蜜桃av一区精品变态类天堂| 一区二区三区欧美视频| 国产成都精品91一区二区三 | 麻豆精品一区二区av白丝在线| 国产白丝精品91爽爽久久 | 久久只精品国产| 亚洲午夜电影在线| kk眼镜猥琐国模调教系列一区二区| 欧美一区二区私人影院日本| 亚洲欧美日韩电影| 成人深夜在线观看| 久久久久久久久久久99999| 石原莉奈在线亚洲二区| 欧美视频在线不卡| 国产精品成人网| 国产成人综合亚洲91猫咪| 欧美成人a视频| 日韩av中文字幕一区二区| 在线一区二区视频| 亚洲免费观看高清完整版在线观看熊| 成人免费看视频| 国产校园另类小说区| 韩国精品主播一区二区在线观看| 欧美人狂配大交3d怪物一区| 亚洲国产视频一区| 欧美在线制服丝袜| 亚洲激情一二三区| 欧美亚洲免费在线一区| 亚洲自拍偷拍av| 精品视频1区2区3区| 亚洲精品视频在线看| 91麻豆精品秘密| 一区二区三区四区国产精品| 色激情天天射综合网| 亚洲一区国产视频| 欧美男女性生活在线直播观看| 亚洲激情综合网| 欧美日韩精品一区二区三区| 亚洲大片一区二区三区| 69精品人人人人| 国产真实乱偷精品视频免| 久久久久久久久99精品| 欧美日韩国产在线观看| 国产一区二区三区在线观看免费| 美女脱光内衣内裤视频久久影院| 91国在线观看| 成人午夜电影久久影院| 毛片av中文字幕一区二区| 一区二区国产视频| 成人欧美一区二区三区白人| 欧美精品一区男女天堂| 91麻豆精品国产自产在线观看一区| 91网站在线播放| 成人网在线播放| 国产盗摄女厕一区二区三区| 久久精品国产免费看久久精品| 一区二区欧美国产| 中文字幕成人av| 国产喂奶挤奶一区二区三区| 久久久久久**毛片大全| 日韩一区二区不卡| 日韩一区二区三区电影在线观看 | 国产原创一区二区| 奇米四色…亚洲| 日韩av一区二区三区四区| 天天爽夜夜爽夜夜爽精品视频| 亚洲国产精品一区二区www在线| 亚洲欧美乱综合| 一区二区三区国产豹纹内裤在线| 亚洲欧美日韩一区二区| 亚洲私人黄色宅男| 亚洲人妖av一区二区| 亚洲人吸女人奶水| 亚洲综合图片区| 天堂影院一区二区| 久久国产三级精品| 国产中文字幕一区| 国产成人午夜片在线观看高清观看| 国产精品一区二区久久不卡| 国产精品99久久久久久久女警 | 另类小说综合欧美亚洲| 极品美女销魂一区二区三区 | 国内精品国产成人国产三级粉色 | 欧美综合视频在线观看| 欧美性做爰猛烈叫床潮| 91精品综合久久久久久| 欧美精品一区二区不卡 | 国产91精品久久久久久久网曝门| 国产成人精品亚洲777人妖| 9i在线看片成人免费| 在线观看日韩一区| 日韩欧美国产高清| 国产精品亲子伦对白| 一区二区三区四区在线播放 | 精品国产免费久久| 国产精品天天摸av网| 亚洲欧美视频在线观看视频| 午夜精品久久久久久不卡8050| 韩国av一区二区三区四区| 国产91精品露脸国语对白| 欧美午夜视频网站| 久久免费看少妇高潮| 亚洲欧美另类在线| 美女视频一区在线观看| 懂色一区二区三区免费观看| 在线观看不卡一区| 久久一区二区三区国产精品| 一区二区三区精品| 国产大片一区二区| 欧美日韩免费高清一区色橹橹| 久久精品夜色噜噜亚洲a∨| 一区二区高清免费观看影视大全| 免费成人性网站| 99re亚洲国产精品| 欧美电影免费观看高清完整版在线 | 亚洲综合色自拍一区| 国内精品视频一区二区三区八戒| 色就色 综合激情| 久久亚洲二区三区| 亚洲一二三四区不卡| 国产99久久精品| 91精品蜜臀在线一区尤物| 亚洲欧美另类小说视频| 国产精品乡下勾搭老头1| 777久久久精品| 一区二区欧美精品| 播五月开心婷婷综合| 久久久久久免费网| 日韩福利视频导航| 欧美亚洲国产一卡| 亚洲欧美偷拍三级| 成人a区在线观看| 久久综合99re88久久爱| 日韩精品成人一区二区三区| 在线亚洲一区二区| 中文字幕亚洲一区二区av在线| 韩国欧美国产1区| 日韩三级视频中文字幕| 日韩国产精品久久久久久亚洲| 91色九色蝌蚪| 国产精品三级电影| 国产成人日日夜夜| 久久久美女艺术照精彩视频福利播放| 日产精品久久久久久久性色| 欧美中文字幕亚洲一区二区va在线| 国产精品国产自产拍高清av王其| 国产成人精品免费在线| 久久一区二区三区四区| 国产九九视频一区二区三区| 久久尤物电影视频在线观看| 国精产品一区一区三区mba桃花| 精品国产伦一区二区三区观看方式| 日本sm残虐另类| 精品欧美一区二区在线观看 | 久久久另类综合|