<?php
$db_type = MICE_DB;
$fdb = (($db_type=='txt') || (strpos($db_type,'sqlite')===0));

if ($fdb) {
	if (!IsWritable(MICE_DIR.MICE_PRIVATE.MICE_DBNAME.'/')) {
		exit;
	}
}

if ($db_type == 'txt') {
	global $GLADIUS_DB_ROOT;
	$GLADIUS_DB_ROOT = MICE_DIR.MICE_PRIVATE;
	include_once MICE_DIR.'classes/gladius/gladius.php';
	include_once MICE_DIR.'classes/gladius/gladius_rs.php';
	$db_type = 'gladius';
}


include_once MICE_DIR.'classes/DBBase.class.php';

//include_once MICE_DIR.'classes/adodb_lite/adodb-errorhandler.inc.php';
include_once MICE_DIR.'classes/adodb_lite/adodb.inc.php';

$conn = new DBBase($db_type);
//在此处建立一个数据库连接，其他地方共享使用，如果不同的模块连接不同的数据库，可把此句移到模块对应的首文件里
?>