supesite >index.php
<?php
/*
[SupeSite/X-Space] (C)2001-2006 Comsenz Inc.
首页
$RCSfile: index.php,v $
$Revision: 1.68.6.5 $
$Date: 2007/06/20 19:19:13 $
*/
include_once('./include/main.inc.php');
//获取变量
if($_SCONFIG['urltype'] == '2' || $_SCONFIG['urltype'] == '5') $parsegetvar = empty($_SERVER['PATH_INFO'])?'':substr($_SERVER['PATH_INFO'], 1);
if(empty($parsegetvar)) $parsegetvar = empty($_SERVER['QUERY_STRING'])?''_SERVER['QUERY_STRING'];
if(!empty($parsegetvar)) {
$parsegetvar = addslashes($parsegetvar);
if($_SCONFIG['allowdomain'] == 3 && !preg_match("/[^a-z0-9]/i", $parsegetvar) && !is_numeric(substr($parsegetvar, 0, 1))) mydomain($parsegetvar);
$_SGET = parseparameter(str_replace(array('-','_'), '/', $parsegetvar));
} else {
if(!empty($_SCONFIG['allowdomain'])) {
if(strpos(S_URL_ALL, $_SERVER['HTTP_HOST']) === false) {
$hostarr = explode('.', $_SERVER['HTTP_HOST']);
if(count($hostarr) > 2) {
if(count($hostarr) > 3 && $hostarr[0] == 'www') {
$hostdomain = $hostarr[1];
} else {
$hostdomain = $hostarr[0];
}
}
}
if(!empty($hostdomain)) mydomain(rawurlencode($hostdomain));
}
}
再这个后面加上这一段东西就行了
getcookie(1);
if ($_SGLOBAL['supe_uid']==0){
$_SGET['action']='login';
}
[ 本帖最后由 cnmaxi 于 2007-7-31 16:19 编辑 ] |