Ejemplo n.º 1
0
function addslashes_deep($value)
{
    global $_DB;
    if ($_DB['type'] == 'mysql') {
        return mysql_addslashes_deep($value);
    } elseif ($_DB['type'] == 'sqlite') {
        return sqlite_addslashes_deep($value);
    }
}
Ejemplo n.º 2
0
            $_GET = stripslashes_deep($_GET);
        }
        if (!empty($_POST)) {
            $_POST = stripslashes_deep($_POST);
        }
        $_COOKIE = stripslashes_deep($_COOKIE);
        $_REQUEST = stripslashes_deep($_REQUEST);
    }
    if (!empty($_GET)) {
        $_GET = sqlite_addslashes_deep($_GET);
    }
    if (!empty($_POST)) {
        $_POST = sqlite_addslashes_deep($_POST);
    }
    $_COOKIE = sqlite_addslashes_deep($_COOKIE);
    $_REQUEST = sqlite_addslashes_deep($_REQUEST);
}
unregister_globals('_POST', '_GET', '_COOKIE', '_REQUEST', '_SERVER', '_ENV', '_FILES');
require_once INC_P . '/webcore_class.php';
require_once getCacheFilePath('langs.php');
require_once getCacheFilePath('global.php');
//网站的langid
if ($_GET['langid']) {
    setCookies("langid", $_GET['langid'], 3600 * 24 * 365);
    $_SYS['langid'] = $_GET['langid'];
} else {
    $_SYS['langid'] = getCookies('langid');
}
if (!array_key_exists($_SYS['langid'], $cache_langs)) {
    $def_cache_lang = array_slice($cache_langs, 0, 1);
    $_SYS['langid'] = $def_cache_lang[0]['id'];