예제 #1
0
    $_COOKIE = $HTTP_COOKIE_VARS;
    $_ENV = $HTTP_ENV_VARS;
    $_FILES = $HTTP_POST_FILES;
    // _SESSION is the only superglobal which is conditionally set
    if (isset($HTTP_SESSION_VARS)) {
        $_SESSION = $HTTP_SESSION_VARS;
    } else {
        $_SESSION = array();
    }
}
if (!isset($_REQUEST)) {
    $_REQUEST = array_merge($_GET, $_POST, $_COOKIE);
}
// Request data is placed in the untrusted array "as is" no
// slashes added or string validation is done. validation is
// done later depending on what that data value is used for
// SEE : security_functions: filter_sql , filter_html, filter_what
$addslashes = false;
$UNTRUSTED = parse_incoming($addslashes);
// _SESSION is the only superglobal which is conditionally set
if (!isset($_SESSION)) {
    $_SESSION = array();
}
// Delete Globals:
$da_kine_globals = array_merge($_GET, $_POST, $_COOKIE, $_SESSION);
unset($da_kine_globals['da_kine_globals']);
while (list($var, $val) = @each($da_kine_globals)) {
    unset(${$var});
}
unset($val);
unset($da_kine_globals);
예제 #2
0
//数据地址定义。
$config['pic_thumb'] = BASIC_PATH . 'data/thumb/';
// 缩略图生成存放地址
$config['cache_dir'] = BASIC_PATH . 'data/cache/';
// 缓存文件地址
$config['app_startTime'] = mtime();
//起始时间
//系统编码配置
$config['app_charset'] = 'utf-8';
//该程序整体统一编码
$config['check_charset'] = 'ASCII,UTF-8,GBK';
//文件打开自动检测编码
//when edit a file ;check charset and auto converto utf-8;
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
    $config['system_os'] = 'windows';
    $config['system_charset'] = 'gbk';
    //user set your server system charset
} else {
    $config['system_os'] = 'linux';
    $config['system_charset'] = 'utf-8';
}
$in = parse_incoming();
if (isset($in['PHPSESSID'])) {
    //office edit post
    session_id($in['PHPSESSID']);
}
@session_start();
check_post_many();
session_write_close();
//避免session锁定问题;之后要修改$_SESSION 需要先调用session_start()
$config['autorun'] = array(array('controller' => 'user', 'function' => 'loginCheck'), array('controller' => 'user', 'function' => 'authCheck'));
예제 #3
0
파일: index.php 프로젝트: EZDM/omeyocan
// Test to make sure the user didn't miss the last install step
if (@$_GET['act'] != "frame") {
    if (file_exists("./install.php") || file_exists("./upgradev1.php")) {
        print "<div align='center'><font color='red'>You must delete the files \n            install.php and upgradev1.php before using the chatroom.\n            </font></div>";
        exit;
    }
}
// Import the database library
include_once "./lib/db/" . strtolower($X7CHAT_CONFIG['DB_TYPE']) . ".php";
// Create a new database connection
$db = new x7chat_db();
// Include the classes needed for loading
// Include the security
include_once "./lib/security.php";
// Clean all incoming data
parse_incoming();
include_once "./lib/load.php";
// Load the server variables
$x7c = new settings();
// Include the authentication functions
include_once "./lib/auth.php";
// Include the AuthMod file
include_once "./lib/auth/" . strtolower($X7CHAT_CONFIG['AUTH_MODE']) . ".php";
// Force Settings from AuthMod
if ($auth_disable_guest) {
    $x7c->settings['allow_guests'] = 0;
}
// Create a new session
$x7s = new session();
// Is the user trying to login?  If so give them a cookie
if (isset($_POST['dologin']) && @$_POST['username'] != "") {