<?php 
define("IN_DEMOSOSO", false); //TRUE //false
$userdir='user_20130601_2148331669';
$test='n';
//----判断是不是https-----------
 

function isdm_https() {
    if ( !empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off') {
        return true;
    } elseif ( isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https' ) {
        return true;
    }
    elseif ( isset($_SERVER['HTTP_X_CLIENT_SCHEME']) && $_SERVER['HTTP_X_CLIENT_SCHEME'] === 'https' ) {
        return true;
    } elseif ( !empty($_SERVER['HTTP_FRONT_END_HTTPS']) && strtolower($_SERVER['HTTP_FRONT_END_HTTPS']) !== 'off') {
        return true;
    }
    return false;
}

if(isdm_https()) $httpv= 'https://';
else $httpv= 'http://';

 
 
//新版本已经自动判断是否用https 
$baseurl= $httpv.substr($_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'],0,-9); 
//echo $baseurl;
  


if( isset( $_SERVER['PATH_INFO'] ) ){
	 if($_SERVER['PATH_INFO']<> '')  {
	 	echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />';
	 	echo '请不要在index.php后面加'.$_SERVER['PATH_INFO'].' - DM系统不需要使用 PATH_INFO，  此信息来自 根目录/index.php ';	
	 	exit;
	 }
}

/*
上面是通过程序判断的，如果网站域名固定，可以在这里直接写好。以http开头，以斜杠结束。然后把上面的注释了。
$baseurl = 'http://www.yoursite.com/'; 
*/
/*
//可以限制其他域名访问本站。
$enterurl = $_SERVER['HTTP_HOST'];
$allowurl ='www.yoursite---.cnnnn';
$jumpurl = 'http://'.$allowurl;
if($enterurl<>$allowurl) {
	header("HTTP/1.1 301 Moved Permanently");
	header('Location:'.$jumpurl.'/'.$_SERVER['REQUEST_URI']); 	
}


 
//-------------
if(@$_COOKIE['isadmin']<>'y'){
  	echo 'sorry,pls go to  www.demososo.com/try.php';
    exit;
}
*/
 
require_once "indexDM_load.php";


 
?>


