<?php
require_once '../../Config.php';
header ( "Content-Type: text/html; charset=utf-8" );
if (intval ( BLL_Admin::isLogin () ) === 0) {
	header ( 'Location:../index.html' );
	die ();
}
new BackUSL_Controller ( $_REQUEST ['action'] );

/**
 * 系统设置控制器
 *
 * @author Wzb
 *        
 */
class BackUSL_Controller {
	/**
	 * 构造函数
	 *
	 * @param string $action 处理方法名
	 */
	public function __construct($action) {
		if (! method_exists ( $this, $action )) {
			die ( "该方法不存在" );
		}
		switch ($action) {
			case "edit" : // 修改系统配置
				break;
			default :
				die ( "该方法错误" );
				break;
		}
		$this->{$action} ();
	}
	
	/**
	 * 修改系统配置
	 */
	private function edit() {
		if (BLL_WebSet::edit ( $_POST ) > 0) {
			echo COM_OftenJavaScript::alertGoToUrl ( "修改成功!!!", "WebSet_Edit.php" );
		} else {
			echo COM_OftenJavaScript::alertGoBack ( "修改失败!!!" );
		}
	}
}
?>