<?php 
//错误的屏蔽
error_reporting(0);
//时间戳修正
define("TIME",8*3600);
//程序根目录
define("ROOT",dirname(__FILE__));
//初始化目录
define("OPEN",ROOT."/..");
//安装系统吧
require ROOT."/auto.php";
//用户认证吧
require ROOT."/admin.php";
//载入对象库
require ROOT."/kernel.php";
//载入函数库
require ROOT."/system.php";
require ROOT."/xhtml.php";
//最大化运行
if(function_exists("set_time_limit")) set_time_limit(0);
if(function_exists("ignore_user_abort")) ignore_user_abort(true);
if(function_exists("ini_set")) ini_set("max_execution_time","0");
//用户的登录
if(!isset($_SESSION['adminstatus']))
{
    if($admin == 1){
            $_SESSION['adminstatus']=true;
            header("Location: {$_SERVER['PHP_SELF']}?".str_ireplace("&logout","",$_SERVER['QUERY_STRING']));
            exit;
      }
	ehtml("您的权限不足!");
   
    exit;
}
else
{
    if($_SESSION['adminstatus']!==true || isset($_GET['logout']))
    {
        unset($_SESSION['adminstatus']);
        header("Location: {$_SERVER['PHP_SELF']}?".str_ireplace("&logout","",$_SERVER['QUERY_STRING']));
        exit;
    }
}
?>