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

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

?? cb.sql.upgrader.php

?? 最受歡迎的Joomla社區用戶管理收費插件 - Commnity Builder 1.2 RC2。 Community Builder suite (CB) extends the Joomla!
?? PHP
?? 第 1 頁 / 共 5 頁
字號:
<?php/*** @version $Id: cb.sql.upgrader.php 444 2008-03-05 02:25:39Z beat $* @package Community Builder* @subpackage cb.sql.upgrader.php* @author Beat* @copyright (C) 2007 Beat and Lightning MultiCom SA, 1009 Pully, Switzerland* @license Lightning Proprietary. See licence. Allowed for free use within CB and for CB plugins.*/// no direct accessif ( ! ( defined( '_VALID_CB' ) || defined( '_JEXEC' ) || defined( '_VALID_MOS' ) ) ) { die( 'Direct Access to this location is not allowed.' ); }// cbimport('cb.xml.simplexml'); needed to use this./** * CB SQL versioning / upgrading functions: *  * WARNING: * This new library is experimental work in progress and should not be used directly by plugins and 3pds, * as it is subject to change without notice, and is not part of current CB API. *  * @access private *  */class CBSQLupgrader {	/** Database	 * @var CBdatabase */	var $_db				=	null;	var $_silentTestLogs	=	true;	var $_logs				=	array();	var $_errors			=	array();	var $_logsIndex			=	0;	var $_dryRun			=	false;	/**	 * Constructor	 *	 * @param  CBdatabase     $db	 * @param  boolean        $silentTestLogs  TRUE: Silent on successful tests	 * @return CBSQLupgrader	 */	function CBSQLupgrader( &$db, $silentTestLogs = true ) {		$this->_db								=&	$db;		$this->_silentTestLogs					=	$silentTestLogs;	}	/**	 * Sets if SQL tables changing queries should not be run (for a dryrun)	 *	 * @param  boolean  $dryRun  FALSE (default): tables are changed, TRUE: Dryrunning	 */	function setDryRun( $dryRun ) {		$this->_dryRun							=	$dryRun;	}	/**	 * LOGS OF ACTIONS AND OF ERRORS:	 */	/**	 * Records error with details (details here is SQL query)	 * @access private	 *	 * @param  string  $error	 * @param  string  $info	 */	function _setError( $error, $info = null) {		$this->_errors[++$this->_logsIndex]		=	array( $error, $info );	}	/**	 * Returns all errors logged	 *	 * @param  string|boolean  $implode         False: returns full array, if string: imploding string	 * @param  string|boolean  $detailsImplode  False: no details, otherwise imploding string	 * @return string|array	 */	function getErrors( $implode = "\n", $detailsImplode = false ) {		if ( $implode === false) {			return $this->_errors;		} else {			$errors								=	array();			if ( $detailsImplode ) {				foreach ( $this->_errors as $errInfo ) {					$errors[]					=	implode( $detailsImplode, $errInfo );				}			} else {				foreach ( $this->_errors as $errInfo ) {					$errors[]					=	$errInfo[0];				}			}			return implode( $implode, $errors );		}	}	/**	 * Records logs with details (details here are SQL queries ( ";\n"-separated )	 * @access private	 *	 * @param  string  $log	 * @param  string  $info	 * @param  string  $type  'ok': successful check, 'change': successful change	 */	function _setLog( $log, $info = null, $type ) {		if ( ( $type != 'ok' ) || ! $this->_silentTestLogs ) {			$this->_logs[++$this->_logsIndex]	=	array( $log, $info );		}	}	/**	 * Returns all logs logged	 *	 * @param  string|boolean  $implode         False: returns full array, if string: imploding string	 * @param  string|boolean  $detailsImplode  False: no details, otherwise imploding string	 * @return string|array	 */	function getLogs( $implode = "\n", $detailsImplode = false ) {		if ( $implode === false) {			return $this->_logs;		} else {			$logs								=	array();			if ( $detailsImplode ) {				foreach ( $this->_logs as $logInfo ) {					$logs[]						=	implode( $detailsImplode, $logInfo );				}			} else {				foreach ( $this->_logs as $logInfo ) {					$logs[]						=	$logInfo[0];				}			}			return implode( $implode, $logs );		}	}	/**	 * SQL ACCESS FUNCTIONS:	 */	/**	 * Checks if a given table exists in the database	 * @access private	 *	 * @param  string  $tableName  Name of table	 * @return boolean	 */	function checkTableExists( $tableName ) {		$allTables								=	$this->_db->getTableList();		return ( in_array( $tableName, $allTables ) );	}	/**	 * Checks if table exists in database and returns all fields of table.	 * Otherwise returns boolean false.	 * @access private	 *	 * @param  string  $tableName  Name of table	 * @return array|boolean       Array of SHOW COLUMNS FROM ... in SQL or boolean FALSE	 */	function getAllTableColumns( $tableName ) {		if ( $this->checkTableExists( $tableName ) ) {			$fields								=	$this->_db->getTableFields( $tableName, false );			if ( isset( $fields[$tableName] ) ) {				return $fields[$tableName];			}		}		return false;	}	/**	 * Returns all indexes of the table	 * @access private	 *	 * @param  string  $tableName  Name of table	 * @return array               Array of SHOW INDEX FROM ... in SQL	 */	function getAllTableIndexes( $tableName ) {		$sortedIndex							=	array();		$idx									=	$this->_db->getTableIndex( $tableName );		if ( is_array( $idx ) ) {			foreach ( $idx as $k => $n ) {				$sortedIndex[$n->Key_name][$n->Seq_in_index]	=	array(	'name'		=>	$n->Column_name,																			'size'		=>	$n->Sub_part,																			'ordering'	=>	$n->Collation,																			'type'		=>	( $n->Key_name == 'PRIMARY' ? 'primary' : ( $n->Non_unique == 0 ? 'unique' : '' ) ),																			'using'		=>	( array_key_exists( 'Index_type', $n ) ? strtolower( $n->Index_type ) : ( $n->Comment == 'FULLTEXT' ? 'fulltext' : '' ) )	// mysql <4.0.2 support																		 );			}		}		return $sortedIndex;	}	/**	 * COLUMNS CHECKS:	 */	/**	 * Checks if a column exists and has the type of the parameters below:	 * @access private	 *	 * @param  string              $tableName        Name of table (for error strings)	 * @param  array               $allColumns       From $this->getAllTableColumns( $table )	 * @param  CBSimpleXMLElement  $column           Column to check	 * @param  string              $colNamePrefix    Prefix to add to all column names	 * @param  boolean             $change           TRUE: only true/false check type, FALSE: logs success and if mismatch, error details	 * @return boolean             TRUE: identical (no check on indexes), FALSE: errors are in $this->getErrors()	 */	function checkColumnExistsType( $tableName, &$allColumns, &$column, $colNamePrefix, $change ) {		$colName								=	$this->_prefixedName( $column, $colNamePrefix );		if ( isset( $allColumns[$colName] ) ) {			if ( ! cbStartOfStringMatch( $column->attributes( 'type' ), 'sql:' ) ) {				$this->_setError( sprintf( 'Table %s Column %s type is %s instead of being prefixed by "sql:"', $tableName, $colName, $column->attributes( 'type' ) ) );				return false;			}			if ( $column->attributes( 'strict' ) === 'false' ) {				$this->_setLog( sprintf( 'Table %s Column %s exists but is not of strict type, so not checked.', $tableName, $colName ), null, 'ok' );				return true;			}			$type								=	substr( $column->attributes( 'type' ), 4 );			$shouldbeType						=	$type . ( $column->attributes( 'unsigned' ) === 'true' ? ' unsigned' : '' );			if ( $allColumns[$colName]->Type !== $shouldbeType ) {				if ( $change === false ) {					$this->_setError( sprintf( 'Table %s Column %s type is %s instead of %s', $tableName, $colName, $allColumns[$colName]->Type, $shouldbeType ) );				}				return false;			}			if ( ( $column->attributes( 'null' ) === 'true' ) !== ( $allColumns[$colName]->Null == 'YES' ) ) {		//if ( $column->attributes( 'null' ) !== null ): no attribute NULL means NOT NULL				if ( $change === false ) {					$this->_setError( sprintf( 'Table %s Column %s NULL attribute is %s instead of %s', $tableName, $colName, $allColumns[$colName]->Null, ( $column->attributes( 'null' ) === 'true' ? 'YES' : 'NO') ) );				}				return false;			}			// BLOB and TEXT columns cannot have DEFAULT values. http://dev.mysql.com/doc/refman/5.0/en/blob.html			$defaultValuePossible				=	! in_array( $type, array( 'text', 'blob', 'tinytext', 'mediumtext', 'longtext', 'tinyblob', 'mediumblob', 'longblob' ) );			// autoincremented columns don't care for default values:			$autoIncrementedColumn				=	! in_array( $column->attributes( 'auto_increment' ), array( null, '', 'false' ), true );			if ( $defaultValuePossible && ! $autoIncrementedColumn ) {				if ( $column->attributes( 'default' ) === null ) {					if ( $column->attributes( 'null' ) === 'true' ) {						$shouldbeDefault			=	array( null );					} else {						$shouldbeDefault			=	$this->defaultValuesOfTypes( $this->mysqlToXmlsql( $column->attributes( 'type' ) ) );					}				} else {					$shouldbeDefault				=	( $column->attributes( 'default' ) === 'NULL' ? array( null ) : array( $column->attributes( 'default' ) ) );				}				if ( ! in_array( $allColumns[$colName]->Default, $shouldbeDefault, true ) ) {					if ( $change === false ) {						$this->_setError( sprintf( 'Table %s Column %s DEFAULT is %s instead of %s', $tableName, $colName, $this->displayNull( $allColumns[$colName]->Default ), $column->attributes( 'default' ) ) );					}					return false;				}			}			$shouldbeExtra						=	( $autoIncrementedColumn ? 'auto_increment' : '' );			if ( $allColumns[$colName]->Extra !== $shouldbeExtra ) {				if ( $change === false ) {					$this->_setError( sprintf( 'Table %s Column %s AUTO_INCREMENT attribute is "%s" instead of "%s"', $tableName, $colName, $allColumns[$colName]->Extra, $shouldbeExtra ) );				}				return false;			}			$this->_setLog( sprintf( 'Table %s Column %s structure is up-to-date.', $tableName, $colName ), null, 'ok' );			return true;		}		if ( $change === false ) {			$this->_setError( sprintf( 'Table %s Column %s does not exist', $tableName, $colName ), null );		}		return false;	}	/**	 * Utility to display NULL for nulls and quotations.	 *	 * @param unknown_type $val	 * @return unknown	 */	function displayNull( $val ) {		if ( $val === null ) {			return 'NULL';		} elseif ( is_numeric( $val ) ) {			return $val;		} else {			return "'" . $val . "'";		}	}	/**	 * Checks if a column exists and has the type of the parameters below:	 * @access private	 *	 * @param  string              $tableName       Name of table (for error strings)	 * @param  array               $allColumns      From $this->getAllTableColumns( $table )	 * @param  CBSimpleXMLElement  $columns         Columns to check array of string  Name of columns which are allowed to (should) exist	 * @param  string              $colNamePrefix    Prefix to add to all column names	 * @param  boolean             $drop            TRUE If drops unneeded columns or not	 * @return boolean             TRUE: no other columns exist, FALSE: errors are in $this->getErrors()	 */	function checkOtherColumnsExist( $tableName, &$allColumns, &$columns, $colNamePrefix, $drop = false ) {		$isMatching								=	false;		if ( $columns->name() == 'columns' ) {			$isMatching							=	true;			foreach ( array_keys( $allColumns ) as $existingColumnName ) {				if ( ! $this->_inXmlChildrenAttribute( $existingColumnName, $columns, 'column', 'name', $colNamePrefix ) ) {					if ( $drop ) {						if ( ! $this->dropColumn( $tableName, $existingColumnName ) ) {							$isMatching			=	false;						}					} else {						$isMatching				=	false;						$this->_setError( sprintf( 'Table %s Column %s exists but should not exist', $tableName, $existingColumnName ), null );					}				}			}			if ( $isMatching && ! $drop ) {				$this->_setLog( sprintf( 'Table %s has no unneeded columns.', $tableName ), null, 'ok' );			}		}		return $isMatching;	}	/**	 * INDEXES CHECKS:	 */	/**	 * Checks if an index exists and has the type of the parameters below:	 * @access private	 *	 * @param  string              $tableName        Name of table (for error strings)	 * @param  array               $allIndexes       From $this->getAllTableIndexes( $table )	 * @param  CBSimpleXMLElement  $index            Index to check	 * @param  string              $colNamePrefix    Prefix to add to all column names	 * @param  boolean             $change           TRUE: only true/false check type, FALSE: logs success and if mismatch, error details	 * @return boolean             TRUE: identical, FALSE: errors are in $this->getErrors()	 */	function checkIndexExistsType( $tableName, &$allIndexes, &$index, $colNamePrefix, $change ) {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产欧美精品国产国产专区| 美女尤物国产一区| 视频一区中文字幕| 成人国产亚洲欧美成人综合网| 欧美性大战久久久久久久蜜臀 | 亚洲成人av在线电影| 国内精品伊人久久久久av一坑 | voyeur盗摄精品| 91精品国产一区二区三区| 中文字幕在线一区| 久久国产精品色婷婷| 欧美日韩高清一区二区三区| 中国色在线观看另类| 狠狠色综合色综合网络| 欧美巨大另类极品videosbest | 天堂久久久久va久久久久| 99久久久久久99| 国产精品女主播在线观看| 国产综合色在线| 精品欧美久久久| 日本伊人午夜精品| 欧美精品v国产精品v日韩精品| 一区二区三区美女视频| 99久久777色| 国产精品成人免费在线| 国产不卡视频一区| 国产婷婷色一区二区三区| 精品在线你懂的| 日韩一级大片在线观看| 秋霞成人午夜伦在线观看| 欧美日韩国产一级片| 偷拍亚洲欧洲综合| 91超碰这里只有精品国产| 丝瓜av网站精品一区二区| 欧美日韩aaa| 青娱乐精品在线视频| 精品久久久影院| 国产一区二区三区视频在线播放 | 欧美日韩在线三区| 五月婷婷综合激情| 欧美日韩高清一区二区三区| 午夜欧美一区二区三区在线播放| 欧美日韩亚洲国产综合| 天天亚洲美女在线视频| 欧美一区二区不卡视频| 韩国一区二区视频| 国产欧美日韩三区| 色婷婷久久综合| 亚洲第一福利一区| 日韩欧美激情四射| 国产精品12区| 自拍偷自拍亚洲精品播放| 欧洲亚洲国产日韩| 美国一区二区三区在线播放| 久久亚洲精品小早川怜子| 成人黄色国产精品网站大全在线免费观看| 国产精品欧美极品| 欧美亚洲动漫另类| 久久精品国产亚洲5555| 国产精品久久久久影院色老大| 91美女片黄在线| 三级久久三级久久| 久久精品夜色噜噜亚洲a∨| 不卡的电影网站| 午夜视频久久久久久| 国产亚洲一区二区三区在线观看 | 日韩一区欧美小说| 欧美一级黄色录像| 93久久精品日日躁夜夜躁欧美| 亚洲成人自拍偷拍| 久久久五月婷婷| 欧美伊人久久大香线蕉综合69| 久久精品免费观看| 亚洲人成在线播放网站岛国| 欧美一区二区三区思思人| 国产69精品久久久久777| 亚洲国产精品久久人人爱蜜臀| 精品欧美一区二区久久| 欧美在线视频你懂得| 国产精品自拍在线| 亚洲444eee在线观看| 欧美国产乱子伦| 欧美一级一区二区| 91黄色激情网站| 国产999精品久久久久久 | 国产精品久久久久久久久图文区| 欧美日韩国产综合一区二区 | 中文字幕一区三区| 日韩免费电影网站| 欧美性猛交xxxxxx富婆| 99久久精品费精品国产一区二区| 久草在线在线精品观看| 亚洲一级二级在线| 欧美国产精品劲爆| 精品电影一区二区| 欧美乱妇20p| 欧美午夜精品免费| 色综合天天综合网天天看片| 粉嫩嫩av羞羞动漫久久久| 美女脱光内衣内裤视频久久影院| 亚洲激情五月婷婷| 中文字幕一区日韩精品欧美| 国产亚洲1区2区3区| 日韩丝袜美女视频| 欧美精三区欧美精三区| 欧美三级电影一区| 91福利区一区二区三区| 99re热视频精品| 不卡的av电影| 91在线视频免费91| av资源网一区| 91在线国内视频| jlzzjlzz欧美大全| 91色.com| 91黄视频在线| 欧美日韩中文字幕精品| 欧美在线啊v一区| 在线观看免费亚洲| 91极品美女在线| 欧美日韩aaaaa| 日韩一区二区麻豆国产| 欧美一二三区在线| 精品精品欲导航| 精品国产露脸精彩对白| 久久久不卡影院| 亚洲欧洲av一区二区三区久久| 亚洲视频一区二区免费在线观看| 亚洲三级小视频| 亚洲伊人伊色伊影伊综合网| 亚洲成人动漫在线免费观看| 老司机午夜精品| 韩国成人精品a∨在线观看| 懂色av一区二区三区免费观看| 91香蕉视频在线| 欧美人与禽zozo性伦| 欧美精品一区男女天堂| 欧美韩国日本一区| 亚洲在线视频一区| 老司机精品视频一区二区三区| 国产成人av一区二区三区在线 | 99久久免费视频.com| 在线视频国产一区| 欧美tickling挠脚心丨vk| 国产精品视频线看| 午夜精品aaa| 久久影音资源网| 久久众筹精品私拍模特| 中文av一区特黄| 亚洲女同女同女同女同女同69| 国产成人精品在线看| 成人av网址在线| 色哟哟一区二区在线观看| 91精品国产综合久久久久久漫画 | 成人免费不卡视频| 欧美午夜电影一区| 精品国产一二三| 18欧美乱大交hd1984| 日韩专区在线视频| 丁香天五香天堂综合| 88在线观看91蜜桃国自产| 国产精品色眯眯| 日本成人在线网站| av一区二区三区| 欧美va亚洲va| 亚洲激情网站免费观看| 国产乱人伦偷精品视频不卡| 欧美三级电影网| 亚洲欧洲美洲综合色网| 久久精品国产澳门| 欧美性生活久久| 日本一区二区动态图| 日本特黄久久久高潮| 色综合网色综合| 国产日韩欧美精品综合| 久久99国产精品免费网站| 在线观看成人小视频| 国产女人水真多18毛片18精品视频| 亚洲成人精品在线观看| 99re视频精品| 国产精品免费aⅴ片在线观看| 久久se精品一区精品二区| 欧美性色欧美a在线播放| 1区2区3区国产精品| 成人va在线观看| 国产欧美精品一区二区色综合| 精品无码三级在线观看视频| 欧美一区二区三区喷汁尤物| 亚洲风情在线资源站| 91免费小视频| 综合久久综合久久| 成人精品视频一区二区三区| 久久久国产一区二区三区四区小说 | 亚洲一区二区三区中文字幕在线 | 欧美一a一片一级一片| 亚洲私人黄色宅男| 91麻豆产精品久久久久久| 国产精品乱码久久久久久 | 蜜臀久久久久久久| 欧美日韩国产高清一区二区三区| 亚洲一二三区在线观看|