001.<?php
003.
004.
005.*/
006.
007.@define('IN_UCHOME', TRUE);
008.define('D_BUG', '0');
009.
010.D_BUG?error_reporting(7):error_reporting(0);
011.set_magic_quotes_runtime(0);
012.
013.$_SGLOBAL = $_SCONFIG = $_SBLOCK = $_TPL = $_SCOOKIE = $_SN = $space = array();
014.
015.//程序目录
016.define('S_ROOT', dirname(__FILE__).DIRECTORY_SEPARATOR);
017.
018.//基本文件
019.include_once(S_ROOT.'./ver.php');
020.if(!@include_once(S_ROOT.'./config.php')) {
021.
022.
023.}
024.include_once(S_ROOT.'./source/function_common.php');
025.
026.//时间
027.$mtime = explode(' ', microtime());
028.$_SGLOBAL['timestamp'] = $mtime[1]; //取得当前的年/月/日 时/分/钞
029.$_SGLOBAL['supe_starttime'] = $_SGLOBAL['timestamp'] + $mtime[0];
030.
031.//GPC过滤
032.$magic_quote = get_magic_quotes_gpc();
033.if(empty($magic_quote)) {
034.
035.
036.}
037.
038.//本站URL
039.if(empty($_SC['siteurl'])) $_SC['siteurl'] = getsiteurl();
040.
041.//链接数据库
042.dbconnect();
043.
044.//缓存文件
045.if(!@include_once(S_ROOT.'./data/data_config.php')) { //是否存在网站初始化信息的缓存
046.
047.
048.
049.}
050.foreach (array('app', 'userapp', 'ad', 'magic') as $value) {
051.
052.}
053.
054.//COOKIE
055.$prelength = strlen($_SC['cookiepre']);
056.foreach($_COOKIE as $key => $val) {
057.
058.
059.
060.}
061.
062.//启用GIP
063.if ($_SC['gzipcompress'] &amp;&amp; function_exists('ob_gzhandler')) {
064.
065.} else {
066.
067.}
068.
069.//初始化
070.$_SGLOBAL['supe_uid'] = 0;
071.$_SGLOBAL['supe_username'] = '';
072.$_SGLOBAL['inajax'] = empty($_GET['inajax'])?0:intval($_GET['inajax']);
073.$_SGLOBAL['mobile'] = empty($_GET['mobile'])?'':trim($_GET['mobile']);
074.$_SGLOBAL['ajaxmenuid'] = empty($_GET['ajaxmenuid'])?'':$_GET['ajaxmenuid'];
075.$_SGLOBAL['refer'] = empty($_SERVER['HTTP_REFERER'])?'':$_SERVER['HTTP_REFERER'];
076.if(empty($_GET['m_timestamp']) || $_SGLOBAL['mobile'] != md5($_GET['m_timestamp']."\t".$_SCONFIG['sitekey'])) $_SGLOBAL['mobile'] = '';
077.
078.//登录注册防灌水机
079.if(empty($_SCONFIG['login_action'])) $_SCONFIG['login_action'] = md5('login'.md5($_SCONFIG['sitekey']));
080.if(empty($_SCONFIG['register_action'])) $_SCONFIG['register_action'] = md5('register'.md5($_SCONFIG['sitekey']));
081.
082.//整站风格
083.if(empty($_SCONFIG['template'])) { //如果没有设置网站的风格则采用default中的
084.
085.}
086.if($_SCOOKIE['mytemplate']) {
087.
088.
089.
090.
091.
092.
093.}
094.
095.//url:http://u.codedesign.cn/space.php?do=home
096.//$_SERVER['REQUEST_URI']得到的:space.php?do=home
097.//$_SERVER['PHP_SELF'] 得到的:space.php
098.//$_SERVER['QUERY_STRING'] :
099.//处理REQUEST_URI
100.if(!isset($_SERVER['REQUEST_URI'])) {
101.
102.
103.}
104.if($_SERVER['REQUEST_URI']) {
105.
106.
107.
108.
109.}
110.
111.//判断用户登录状态
112.checkauth(); //判断是否登录
113.$_SGLOBAL['uhash'] = md5($_SGLOBAL['supe_uid']."\t".substr($_SGLOBAL['timestamp'], 0, 6)); //将用户的uid与当前时间的前六位进行md5加密
114.
115.//用户菜单
116.getuserapp();
117.
118.//处理UC应用
119.$_SCONFIG['uc_status'] = 0;
120.$_SGLOBAL['appmenus'] = $_SGLOBAL['appmenu'] = array();
121.if($_SGLOBAL['app']) {
122.
123.
124.
125.
126.
127.
128.
129.
130.
131.
132.
133.
134.}
135.
136.?>