<?php
//自动加载类文件
function __autoload($className) {
	$baseUrl = dirname ( __FILE__ ) . "/";
	if (strpos ( $className, 'BLL_' ) !== false) {
		//逻辑层类
		require_once $baseUrl . 'Class/BLL/' . str_replace ( "BLL_", "", $className ) . '.php';
	} elseif (strpos ( $className, 'DAL_' ) !== false) {
		//数据层类
		require_once $baseUrl . 'Class/DAL/' . str_replace ( "DAL_", "", $className ) . '.php';
	} elseif (strpos ( $className, 'USL_' ) !== false) {
		//表示层类
		require_once $baseUrl . str_replace ( "USL_", "", $className ) . '.php';
	} elseif (strpos ( $className, 'COM_' ) !== false) {
		//辅助类
		require_once $baseUrl . 'Class/COM/' . str_replace ( "COM_", "", $className ) . '.php';
	} elseif (strpos ( $className, 'Smarty' ) !== false || strpos ( $className, 'smarty' ) !== false) {
		//Smarty模板引擎
		if ($className == 'Smarty') {
			require_once $baseUrl . 'Smarty/Smarty.class.php';
		} elseif ($className == 'SmartyBC') {
			require_once $baseUrl . 'Smarty/SmartyBC.class';
		} else {
			if (file_exists ( $baseUrl . "Smarty/sysplugins/" . strtolower ( $className ) . ".php" )) {
				require_once $baseUrl . 'Smarty/sysplugins/' . strtolower ( $className ) . '.php';
			} else {
				require_once $baseUrl . 'Smarty/plugins/' . str_replace ( "smarty_", "", strtolower ( $className ) ) . '.php';
			}
		}
	} elseif ($className == "BackUSL_ManagerBase") {
		//后台基础类
		require_once $baseUrl . 'Manager/ManagerBase.php';
	} else {
	
	}
}
?>