예제 #1
0
파일: config.php 프로젝트: cwcw/cms
$cfg_admin_skin = 1;
// 后台管理风格
if (file_exists(DEDEDATA . '/admin/skin.txt')) {
    $skin = file_get_contents(DEDEDATA . '/admin/skin.txt');
    $cfg_admin_skin = !in_array($skin, array(1, 2, 3, 4)) ? 1 : $skin;
}
//获得当前脚本名称,如果你的系统被禁用了$_SERVER变量,请自行更改这个选项
$dedeNowurl = $s_scriptName = '';
$isUrlOpen = @ini_get('allow_url_fopen');
$dedeNowurl = GetCurUrl();
$dedeNowurls = explode('?', $dedeNowurl);
$s_scriptName = $dedeNowurls[0];
$cfg_remote_site = empty($cfg_remote_site) ? 'N' : $cfg_remote_site;
//检验用户登录状态
$cuserLogin = new userLogin();
if ($cuserLogin->getUserID() == -1) {
    header("location:login.php?gotopage=" . urlencode($dedeNowurl));
    exit;
}
function XSSClean($val)
{
    if (is_array($val)) {
        while (list($key) = each($val)) {
            $val[$key] = XSSClean($val[$key]);
        }
        return $val;
    }
    return RemoveXss($val);
}
if ($cfg_dede_log == 'Y') {
    $s_nologfile = '_main|_list';
예제 #2
0
<?php 
//该页仅用于检测用户登录的情况,如要手工更改系统配置,请更改config_base.php
require_once(dirname(__FILE__)."/../config_base.php");
require_once(dirname(__FILE__)."/../inc_userlogin.php");

//获得当前脚本名称,如果你的系统被禁用了$_SERVER变量,请自行更改这个选项
$dedeNowurl = "";
$s_scriptName="";
 
$dedeNowurl = GetCurUrl();
$dedeNowurls = explode("?",$dedeNowurl);
$s_scriptName = $dedeNowurls[0];

//检验用户登录状态
$cuserLogin = new userLogin();
if($cuserLogin->getUserID()==-1)
{
	if($cuserLogin->adminDir=='') exit('Request Error!');
	$gurl = "../../{$cuserLogin->adminDir}/login.php?gotopage=".urlencode($dedeNowurl);
	echo "<script language='javascript'>location='$gurl';</script>";
	exit();
}

?>
예제 #3
0
require_once(DEDEADMIN."/../include/config_base.php");
require_once(DEDEADMIN."/../include/inc_userlogin.php");
require_once(DEDEADMIN."/inc/inc_admin_pub.php");
header("Cache-Control:private");

//获得当前脚本名称,如果你的系统被禁用了$_SERVER变量,请自行更改这个选项
$dedeNowurl = "";
$s_scriptName="";
 
$dedeNowurl = GetCurUrl();
$dedeNowurls = explode("?",$dedeNowurl);
$s_scriptName = $dedeNowurls[0];

//检验用户登录状态
$cuserLogin = new userLogin();
if($cuserLogin->getUserID()==-1)
{
	header("location:login.php?gotopage=".urlencode($dedeNowurl));
	exit();
}

if($cfg_dede_log=='Y')
{
  $s_nologfile = "_main|_list|index";
  $s_needlogfile = "sys_|file_";
  isset($_SERVER['REQUEST_METHOD']) ? $s_method=$_SERVER['REQUEST_METHOD'] : $s_method="";
  isset($dedeNowurls[1]) ? $s_query = $dedeNowurls[1] : $s_query = "";
  $s_scriptNames = explode('/',$s_scriptName);
  $s_scriptNames = $s_scriptNames[count($s_scriptNames)-1];
  $s_userip = GetIP();
  if( $s_method=='POST' 
예제 #4
0
파일: config.php 프로젝트: iabing/mzzyc
 * @copyright      Copyright (c) 2007 - 2010, DesDev, Inc.
 * @license        http://help.dedecms.com/usersguide/license.html
 * @link           http://www.dedecms.com
 */
require_once dirname(__FILE__) . "/../common.inc.php";
require_once dirname(__FILE__) . "/../userlogin.class.php";
//获得当前脚本名称,如果你的系统被禁用了$_SERVER变量,请自行更改这个选项
$dedeNowurl = '';
$s_scriptName = '';
$isUrlOpen = @ini_get('allow_url_fopen');
$dedeNowurl = GetCurUrl();
$dedeNowurls = explode("?", $dedeNowurl);
$s_scriptName = $dedeNowurls[0];
//检验用户登录状态
$cuserLogin = new userLogin();
if ($cuserLogin->getUserID() <= 0) {
    if (empty($adminDirHand)) {
        ShowMsg("<b>提示:需输入后台管理目录才能登录</b><br /><form>请输入后台管理目录名:<input type='hidden' name='gotopage' value='" . urlencode($dedeNowurl) . "' /><input type='text' name='adminDirHand' value='dede' style='width:120px;' /><input style='width:80px;' type='submit' name='sbt' value='转入登录' /></form>", "javascript:;");
        exit;
    }
    $adminDirHand = HtmlReplace($adminDirHand, 1);
    $gurl = "../../{$adminDirHand}/login.php?gotopage=" . urlencode($dedeNowurl);
    echo "<script language='javascript'>location='{$gurl}';</script>";
    exit;
}
//启用远程站点则创建FTP类
if ($cfg_remote_site == 'Y') {
    require_once DEDEINC . '/ftp.class.php';
    if (file_exists(DEDEDATA . "/cache/inc_remote_config.php")) {
        require_once DEDEDATA . "/cache/inc_remote_config.php";
    }
예제 #5
0
파일: config.php 프로젝트: hensonvip/ymroad
<?php

require_once dirname(__FILE__) . "/../../include/common.inc.php";
require_once DEDEINC . "/dedetemplate.class.php";
require_once DEDEINC . "/datalistcp.class.php";
require_once DEDEINC . "/request.class.php";
require_once DEDEINC . '/userlogin.class.php';
define(SEOINC, DEDEROOT . "/xapp/include");
define(SEOTEMPLETS, DEDEROOT . "/xapp/templets");
define(SEOCONTROL, DEDEROOT . "/xapp/control");
define(SEOMODEL, DEDEROOT . "/xapp/moudle");
define(SEODATA, DEDEROOT . "/xapp/data");
//检验用户登录状态
$cuserLogin = new userLogin();
if ($cuserLogin->getUserID() == -1 && $m == 'admin') {
    ShowMsg("您无权登录此页面", '/');
    exit;
}
//引入控制器基类
require_once SEOINC . "/base.class.php";
$base = new Base();
function RunSeoApp($m, $c, $a)
{
    $m = request("m", "index");
    $c = request("c", "index");
    $a = request("a", "index");
    $appfile = SEOCONTROL . '/' . $m . '/action_' . $c . '.php';
    if (file_exists($appfile)) {
        require_once $appfile;
    } else {
        die("CONTROL NOT EXISTS");