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

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

?? adodb-lib.inc.php

?? 類似youtube的視頻分享網(wǎng)站源碼。有后臺管理系統(tǒng)及模板
?? PHP
字號:
<?php
/* 
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. See License.txt. 
  Set tabs to 4 for best viewing.
  
  Less commonly used functions are placed here to reduce size of adodb.inc.php. 
*/ 


// Force key to upper. 
// See also http://www.php.net/manual/en/function.array-change-key-case.php
function _array_change_key_case($an_array)
{
	if (is_array($an_array)) {
      	foreach($an_array as $key => $value)
        	$new_array[strtoupper($key)] = $value;

       	return $new_array;
   }

	return $an_array;
}

// Requires $ADODB_FETCH_MODE = ADODB_FETCH_NUM
function _adodb_getmenu(&$zthis, $name,$defstr='',$blank1stItem=true,$multiple=false,
			$size=0, $selectAttr='',$compareFields0=true)
{
	$hasvalue = false;

	if ($multiple or is_array($defstr)) {
		if ($size==0) $size=5;
		$attr = " multiple size=$size";
		if (!strpos($name,'[]')) $name .= '[]';
	} else if ($size) $attr = " size=$size";
	else $attr ='';

	$s = "<select name=\"$name\"$attr $selectAttr>";
	if ($blank1stItem) 
		if (is_string($blank1stItem))  {
			$barr = explode(':',$blank1stItem);
			if (sizeof($barr) == 1) $barr[] = '';
			$s .= "\n<option value=\"".$barr[0]."\">".$barr[1]."</option>";
		} else $s .= "\n<option></option>";

	if ($zthis->FieldCount() > 1) $hasvalue=true;
	else $compareFields0 = true;
	
	$value = '';
	while(!$zthis->EOF) {
		$zval = trim(reset($zthis->fields));
		if (sizeof($zthis->fields) > 1) {
			if (isset($zthis->fields[1]))
				$zval2 = trim($zthis->fields[1]);
			else
				$zval2 = trim(next($zthis->fields));
		}
		$selected = ($compareFields0) ? $zval : $zval2;
		
		if ($blank1stItem && $zval=="") {
			$zthis->MoveNext();
			continue;
		}
		if ($hasvalue) 
			$value = ' value="'.htmlspecialchars($zval2).'"';
		
		if (is_array($defstr))  {
			
			if (in_array($selected,$defstr)) 
				$s .= "<option selected$value>".htmlspecialchars($zval).'</option>';
			else 
				$s .= "\n<option".$value.'>'.htmlspecialchars($zval).'</option>';
		}
		else {
			if (strcasecmp($selected,$defstr)==0) 
				$s .= "<option selected$value>".htmlspecialchars($zval).'</option>';
			else
				$s .= "\n<option".$value.'>'.htmlspecialchars($zval).'</option>';
		}
		$zthis->MoveNext();
	} // while
	
	return $s ."\n</select>\n";
}

/*
	Count the number of records this sql statement will return by using
	query rewriting techniques...
	
	Does not work with UNIONs.
*/
function _adodb_getcount(&$zthis, $sql,$inputarr=false,$secs2cache=0) 
{
	 if (preg_match("/^\s*SELECT\s+DISTINCT/i", $sql) || preg_match('/\s+GROUP\s+BY\s+/is',$sql)) {
		// ok, has SELECT DISTINCT or GROUP BY so see if we can use a table alias
		// but this is only supported by oracle and postgresql...
		if ($zthis->dataProvider == 'oci8') {
			
			$rewritesql = preg_replace('/(\sORDER\s+BY\s.*)/is','',$sql);
			$rewritesql = "SELECT COUNT(*) FROM ($rewritesql)"; 
			
		} else if ( $zthis->databaseType == 'postgres' || $zthis->databaseType == 'postgres7')  {
			
			$info = $zthis->ServerInfo();
			if (substr($info['version'],0,3) >= 7.1) { // good till version 999
				$rewritesql = preg_replace('/(\sORDER\s+BY\s.*)/is','',$sql);
				$rewritesql = "SELECT COUNT(*) FROM ($rewritesql) _ADODB_ALIAS_";
			}
		}
	} else { 
		// now replace SELECT ... FROM with SELECT COUNT(*) FROM
		
		$rewritesql = preg_replace(
					'/^\s*SELECT\s.*\s+FROM\s/Uis','SELECT COUNT(*) FROM ',$sql);
		
		// fix by alexander zhukov, alex#unipack.ru, because count(*) and 'order by' fails 
		// with mssql, access and postgresql. Also a good speedup optimization - skips sorting!
		$rewritesql = preg_replace('/(\sORDER\s+BY\s.*)/is','',$rewritesql); 
	}
	
	if (isset($rewritesql) && $rewritesql != $sql) {
		if ($secs2cache) {
			// we only use half the time of secs2cache because the count can quickly
			// become inaccurate if new records are added
			$qryRecs = $zthis->CacheGetOne($secs2cache/2,$rewritesql,$inputarr);
			
		} else {
			$qryRecs = $zthis->GetOne($rewritesql,$inputarr);
	  	}
		if ($qryRecs !== false) return $qryRecs;
	}
	
	// query rewrite failed - so try slower way...
	$rewritesql = preg_replace('/(\sORDER\s+BY\s.*)/is','',$sql); 
	$rstest = &$zthis->Execute($rewritesql);
	if ($rstest) {
   		$qryRecs = $rstest->RecordCount();
		if ($qryRecs == -1) { 
		global $ADODB_EXTENSION;
		// some databases will return -1 on MoveLast() - change to MoveNext()
			if ($ADODB_EXTENSION) {
				while(!$rstest->EOF) {
					adodb_movenext($rstest);
				}
			} else {
				while(!$rstest->EOF) {
					$rstest->MoveNext();
				}
			}
			$qryRecs = $rstest->_currentRow;
		}
		$rstest->Close();
		if ($qryRecs == -1) return 0;
	}

	return $qryRecs;
}

/*
 	Code originally from "Cornel G" <conyg@fx.ro>

	This code will not work with SQL that has UNION in it	
	
	Also if you are using CachePageExecute(), there is a strong possibility that
	data will get out of synch. use CachePageExecute() only with tables that
	rarely change.
*/
function &_adodb_pageexecute_all_rows(&$zthis, $sql, $nrows, $page, 
						$inputarr=false, $arg3=false, $secs2cache=0) 
{
	$atfirstpage = false;
	$atlastpage = false;
	$lastpageno=1;

	// If an invalid nrows is supplied, 
	// we assume a default value of 10 rows per page
	if (!isset($nrows) || $nrows <= 0) $nrows = 10;

	$qryRecs = false; //count records for no offset
	
	$qryRecs = _adodb_getcount($zthis,$sql,$inputarr,$secs2cache);
	$lastpageno = (int) ceil($qryRecs / $nrows);
	$zthis->_maxRecordCount = $qryRecs;
	
	// If page number <= 1, then we are at the first page
	if (!isset($page) || $page <= 1) {	
		$page = 1;
		$atfirstpage = true;
	}

	// ***** Here we check whether $page is the last page or 
	// whether we are trying to retrieve 
	// a page number greater than the last page number.
	if ($page >= $lastpageno) {
		$page = $lastpageno;
		$atlastpage = true;
	}
	
	// We get the data we want
	$offset = $nrows * ($page-1);
	if ($secs2cache > 0) 
		$rsreturn = &$zthis->CacheSelectLimit($secs2cache, $sql, $nrows, $offset, $inputarr, $arg3);
	else 
		$rsreturn = &$zthis->SelectLimit($sql, $nrows, $offset, $inputarr, $arg3, $secs2cache);

	
	// Before returning the RecordSet, we set the pagination properties we need
	if ($rsreturn) {
		$rsreturn->_maxRecordCount = $qryRecs;
		$rsreturn->rowsPerPage = $nrows;
		$rsreturn->AbsolutePage($page);
		$rsreturn->AtFirstPage($atfirstpage);
		$rsreturn->AtLastPage($atlastpage);
		$rsreturn->LastPageNo($lastpageno);
	}
	return $rsreturn;
}

// Iv醤 Oliva version
function &_adodb_pageexecute_no_last_page(&$zthis, $sql, $nrows, $page, $inputarr=false, $arg3=false, $secs2cache=0) 
{

	$atfirstpage = false;
	$atlastpage = false;
	
	if (!isset($page) || $page <= 1) {	// If page number <= 1, then we are at the first page
		$page = 1;
		$atfirstpage = true;
	}
	if ($nrows <= 0) $nrows = 10;	// If an invalid nrows is supplied, we assume a default value of 10 rows per page
	
	// ***** Here we check whether $page is the last page or whether we are trying to retrieve a page number greater than 
	// the last page number.
	$pagecounter = $page + 1;
	$pagecounteroffset = ($pagecounter * $nrows) - $nrows;
	if ($secs2cache>0) $rstest = &$zthis->CacheSelectLimit($secs2cache, $sql, $nrows, $pagecounteroffset, $inputarr, $arg3);
	else $rstest = &$zthis->SelectLimit($sql, $nrows, $pagecounteroffset, $inputarr, $arg3, $secs2cache);
	if ($rstest) {
		while ($rstest && $rstest->EOF && $pagecounter>0) {
			$atlastpage = true;
			$pagecounter--;
			$pagecounteroffset = $nrows * ($pagecounter - 1);
			$rstest->Close();
			if ($secs2cache>0) $rstest = &$zthis->CacheSelectLimit($secs2cache, $sql, $nrows, $pagecounteroffset, $inputarr, $arg3);
			else $rstest = &$zthis->SelectLimit($sql, $nrows, $pagecounteroffset, $inputarr, $arg3, $secs2cache);
		}
		if ($rstest) $rstest->Close();
	}
	if ($atlastpage) {	// If we are at the last page or beyond it, we are going to retrieve it
		$page = $pagecounter;
		if ($page == 1) $atfirstpage = true;	// We have to do this again in case the last page is the same as the first
			//... page, that is, the recordset has only 1 page.
	}
	
	// We get the data we want
	$offset = $nrows * ($page-1);
	if ($secs2cache > 0) $rsreturn = &$zthis->CacheSelectLimit($secs2cache, $sql, $nrows, $offset, $inputarr, $arg3);
	else $rsreturn = &$zthis->SelectLimit($sql, $nrows, $offset, $inputarr, $arg3, $secs2cache);
	
	// Before returning the RecordSet, we set the pagination properties we need
	if ($rsreturn) {
		$rsreturn->rowsPerPage = $nrows;
		$rsreturn->AbsolutePage($page);
		$rsreturn->AtFirstPage($atfirstpage);
		$rsreturn->AtLastPage($atlastpage);
	}
	return $rsreturn;
}

function _adodb_getupdatesql(&$zthis,&$rs, $arrFields,$forceUpdate=false,$magicq=false)
{
		if (!$rs) {
			printf(ADODB_BAD_RS,'GetUpdateSQL');
			return false;
		}
	
		$fieldUpdatedCount = 0;
		$arrFields = _array_change_key_case($arrFields);

		// Get the table name from the existing query.
		preg_match("/FROM\s+".ADODB_TABLE_REGEX."/i", $rs->sql, $tableName);

		// Get the full where clause excluding the word "WHERE" from
		// the existing query.
		preg_match('/\sWHERE\s(.*)/i', $rs->sql, $whereClause);
		
		$discard = false;
		// not a good hack, improvements?
		if ($whereClause)
			preg_match('/\s(LIMIT\s.*)/i', $whereClause[1], $discard);
		
		if ($discard)
			$whereClause[1] = substr($whereClause[1], 0, strlen($whereClause[1]) - strlen($discard[1]));
		
		// updateSQL will contain the full update query when all
		// processing has completed.
		$updateSQL = "UPDATE " . $tableName[1] . " SET ";

		$hasnumeric = isset($rs->fields[0]);
		
		// Loop through all of the fields in the recordset
		for ($i=0, $max=$rs->FieldCount(); $i < $max; $i++) {
		
			// Get the field from the recordset
			$field = $rs->FetchField($i);

			// If the recordset field is one
			// of the fields passed in then process.
			$upperfname = strtoupper($field->name);
			if (isset($arrFields[$upperfname])) {

				// If the existing field value in the recordset
				// is different from the value passed in then
				// go ahead and append the field name and new value to
				// the update query.
				
				if ($hasnumeric) $val = $rs->fields[$i];
				else if (isset($rs->fields[$upperfname])) $val = $rs->fields[$upperfname];
				else $val = '';
				
				if ($forceUpdate || strcmp($val, $arrFields[$upperfname])) {
					// Set the counter for the number of fields that will be updated.
					$fieldUpdatedCount++;

					// Based on the datatype of the field
					// Format the value properly for the database
					$mt = $rs->MetaType($field->type);
					
					// "mike" <mike@partner2partner.com> patch and "Ryan Bailey" <rebel@windriders.com> 
					//PostgreSQL uses a 't' or 'f' and therefore needs to be processed as a string ('C') type field.
					if ((strncmp($zthis->databaseType,"postgres",8) === 0) && ($mt == "L")) $mt = "C";
					// is_null requires php 4.0.4
					if (/*is_null($arrFields[$fieldname]) ||*/ $arrFields[$upperfname] === 'null') 
						$updateSQL .= $field->name . " = null, ";
					else		
					switch($mt) {
						case 'null':
						case "C":
						case "X":
						case 'B':
							$updateSQL .= $field->name . " = " . $zthis->qstr($arrFields[$upperfname],$magicq) . ", ";
							break;
						case "D":
							$updateSQL .= $field->name . " = " . $zthis->DBDate($arrFields[$upperfname]) . ", ";
	   						break;
						case "T":
							$updateSQL .= $field->name . " = " . $zthis->DBTimeStamp($arrFields[$upperfname]) . ", ";
							break;
						default:
							$updateSQL .= $field->name . " = " . (float) $arrFields[$upperfname] . ", ";
							break;
					};
				};
			};
		};

		// If there were any modified fields then build the rest of the update query.
		if ($fieldUpdatedCount > 0 || $forceUpdate) {
			// Strip off the comma and space on the end of the update query.
			$updateSQL = substr($updateSQL, 0, -2);

			// If the recordset has a where clause then use that same where clause
			// for the update.
			if ($whereClause[1]) $updateSQL .= " WHERE " . $whereClause[1];

			return $updateSQL;
		} else {
			return false;
   		};
}

function _adodb_getinsertsql(&$zthis,&$rs,$arrFields,$magicq=false)
{
	$values = '';
	$fields = '';
	$arrFields = _array_change_key_case($arrFields);
	if (!$rs) {
			printf(ADODB_BAD_RS,'GetInsertSQL');
			return false;
		}

		$fieldInsertedCount = 0;
	
		// Get the table name from the existing query.
		preg_match("/FROM\s+".ADODB_TABLE_REGEX."/i", $rs->sql, $tableName);

		// Loop through all of the fields in the recordset
		for ($i=0, $max=$rs->FieldCount(); $i < $max; $i++) {

			// Get the field from the recordset
			$field = $rs->FetchField($i);
			// If the recordset field is one
			// of the fields passed in then process.
			$upperfname = strtoupper($field->name);
			if (isset($arrFields[$upperfname])) {
	
				// Set the counter for the number of fields that will be inserted.
				$fieldInsertedCount++;

				// Get the name of the fields to insert
				$fields .= $field->name . ", ";
				
				$mt = $rs->MetaType($field->type);
				
				// "mike" <mike@partner2partner.com> patch and "Ryan Bailey" <rebel@windriders.com> 
				//PostgreSQL uses a 't' or 'f' and therefore needs to be processed as a string ('C') type field.
				if ((strncmp($zthis->databaseType,"postgres",8) === 0) && ($mt == "L")) $mt = "C";

				// Based on the datatype of the field
				// Format the value properly for the database
				if (/*is_null($arrFields[$fieldname]) ||*/ $arrFields[$upperfname] === 'null') 
						$values .= "null, ";
				else		
				switch($mt) {
					case "C":
					case "X":
					case 'B':
						$values .= $zthis->qstr($arrFields[$upperfname],$magicq) . ", ";
						break;
					case "D":
						$values .= $zthis->DBDate($arrFields[$upperfname]) . ", ";
						break;
					case "T":
						$values .= $zthis->DBTimeStamp($arrFields[$upperfname]) . ", ";
						break;
					default:
						$values .= (float) $arrFields[$upperfname] . ", ";
						break;
				};
			};
	  	};

		// If there were any inserted fields then build the rest of the insert query.
		if ($fieldInsertedCount > 0) {

			// Strip off the comma and space on the end of both the fields
			// and their values.
			$fields = substr($fields, 0, -2);
			$values = substr($values, 0, -2);

			// Append the fields and their values to the insert query.
			$insertSQL = "INSERT INTO " . $tableName[1] . " ( $fields ) VALUES ( $values )";

			return $insertSQL;

		} else {
			return false;
   		};
}
?>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
丰满亚洲少妇av| 亚洲狠狠爱一区二区三区| 亚洲人午夜精品天堂一二香蕉| 欧美精品久久久久久久久老牛影院 | 精品久久久久一区| 日韩一区二区三区免费观看| 欧美福利电影网| 欧美男同性恋视频网站| 欧美日韩激情在线| 欧美视频完全免费看| 在线不卡免费av| 欧美一区二区美女| 久久久精品免费观看| 久久在线观看免费| 国产精品九色蝌蚪自拍| 亚洲女厕所小便bbb| 亚洲韩国精品一区| 免费在线观看成人| 国产精品一二三区| 亚洲成a人v欧美综合天堂| 欧美三级电影网| 欧美亚洲动漫制服丝袜| 欧美少妇bbb| 日韩久久精品一区| 国产精品国产自产拍高清av| 亚洲欧美国产77777| 亚洲成人福利片| 精品亚洲欧美一区| 99国产精品国产精品毛片| 欧美日韩欧美一区二区| 欧美岛国在线观看| 亚洲视频在线一区| 免费成人在线播放| 91影院在线免费观看| 欧美丰满嫩嫩电影| 国产三级精品三级在线专区| 国产精品久久免费看| 欧美日韩国产一级| 久久久亚洲高清| 亚洲综合色噜噜狠狠| 狠狠色丁香久久婷婷综合丁香| 成人开心网精品视频| 欧美日韩精品一区二区在线播放| 中文字幕亚洲综合久久菠萝蜜| 亚洲人精品午夜| 国产一区激情在线| 欧美日韩国产成人在线91| 亚洲国产精品ⅴa在线观看| 日日夜夜精品免费视频| 成人网页在线观看| 337p粉嫩大胆噜噜噜噜噜91av| 一区二区三区在线视频观看 | 欧美一区二区三区在线观看| 国产精品成人免费在线| 粉嫩蜜臀av国产精品网站| 久久久久久一二三区| 亚洲一级二级在线| 国产成人综合视频| 精品久久久久久久人人人人传媒| 一区二区免费在线| www.欧美色图| 中文字幕国产一区| 大白屁股一区二区视频| 亚洲精品一区二区三区99| 奇米一区二区三区| 欧美日韩在线播| 亚洲精品你懂的| www.激情成人| 国产精品麻豆网站| 97超碰欧美中文字幕| 国产精品污污网站在线观看| 国产成人精品三级| 久久久久久久性| 精品中文字幕一区二区小辣椒| 欧美日韩午夜精品| 亚洲日本一区二区| 一区二区三区日韩精品视频| 亚洲私人黄色宅男| 成a人片国产精品| 国产精品麻豆99久久久久久| 不卡的av电影| 国产精品国产成人国产三级| 91在线观看美女| 亚洲日本va在线观看| 在线这里只有精品| 亚洲成av人片在www色猫咪| 色av一区二区| 亚洲一区二区在线观看视频 | 亚洲欧美偷拍三级| 91视频观看视频| 亚洲国产成人porn| 日韩欧美国产电影| 国产毛片一区二区| 国产精品白丝在线| 欧美综合视频在线观看| 亚洲成人激情av| 久久综合九色综合97婷婷| 粉嫩欧美一区二区三区高清影视 | 精品久久免费看| 欧美精品国产精品| 精品一区二区三区欧美| 亚洲国产精品国自产拍av| 色一区在线观看| 日韩avvvv在线播放| 久久精品综合网| 色婷婷综合久久久久中文| 日韩成人免费电影| 国产欧美日韩亚州综合 | 91蜜桃视频在线| 日本最新不卡在线| 日本一区二区三区电影| 欧美在线观看视频在线| 久久99久久久久| 亚洲精品国产第一综合99久久 | 91麻豆精品国产自产在线观看一区| 麻豆高清免费国产一区| 中文文精品字幕一区二区| 欧美日韩久久久久久| 国产电影精品久久禁18| 亚洲成年人网站在线观看| 国产亚洲欧美激情| 欧美一二三区在线观看| 91丝袜国产在线播放| 久久99在线观看| 洋洋av久久久久久久一区| 国产亚洲欧洲一区高清在线观看| 欧美亚男人的天堂| 波波电影院一区二区三区| 美女视频黄久久| 一区二区三区自拍| 中文字幕免费不卡在线| 日韩欧美在线影院| 欧美裸体一区二区三区| 在线欧美日韩精品| 波多野结衣一区二区三区 | 91啪在线观看| 国产精品一色哟哟哟| 免费成人在线观看视频| 五月综合激情网| 亚洲精品成a人| 亚洲同性gay激情无套| 欧美精彩视频一区二区三区| 亚洲精品在线观| 日韩你懂的电影在线观看| 欧美电影一区二区| 在线视频欧美精品| 欧美中文字幕久久| 欧美日韩在线播| 欧美日韩成人综合| 欧美蜜桃一区二区三区| 欧美理论片在线| 欧美日韩一二三区| 欧美男生操女生| 日韩欧美中文字幕公布| 日韩美女一区二区三区四区| 欧美一区二区三级| 欧美成人女星排行榜| 日韩欧美一二区| www激情久久| 国产精品日韩成人| 国产精品国产三级国产有无不卡| 欧美—级在线免费片| 中文字幕亚洲欧美在线不卡| 亚洲欧美激情在线| 2022国产精品视频| 午夜精品久久久久久久蜜桃app| 日韩国产欧美在线视频| 欧美日韩在线免费视频| 欧美羞羞免费网站| 欧美精品视频www在线观看| 欧美一区二区黄色| 久久综合999| 亚洲欧美日韩人成在线播放| 一区二区三区四区蜜桃| 一区二区三区美女| 日本sm残虐另类| 国产一区二区在线观看视频| 成人激情动漫在线观看| 日本韩国欧美一区| 日韩亚洲欧美高清| 国产精品情趣视频| 伊人开心综合网| 毛片av中文字幕一区二区| 国产成人av福利| 在线一区二区三区四区| 日韩一区二区三区精品视频| 欧美国产综合色视频| 亚洲va国产天堂va久久en| 久久99日本精品| 色婷婷av一区二区三区软件| 欧美精品18+| 日本一区二区免费在线观看视频 | 欧美特级限制片免费在线观看| 91精品国产品国语在线不卡| 久久久久国产免费免费| 亚洲国产一二三| 丁香婷婷综合五月| 欧美一级国产精品| 一区二区成人在线| 国产精品影视网|