Esempio n. 1
0
{
    foreach (func_get_args() as $name) {
        foreach ($GLOBALS[$name] as $key => $value) {
            if (isset($GLOBALS[$key])) {
                unset($GLOBALS[$key]);
            }
        }
    }
}
if (@ini_get('register_globals')) {
    unregister_globals('_POST', '_GET', '_COOKIE', '_REQUEST', '_SERVER', '_ENV', '_FILES');
}
if (function_exists("get_magic_quotes_gpc") && get_magic_quotes_gpc() || @ini_get('magic_quotes_sybase') && strtolower(@ini_get('magic_quotes_sybase')) != "off") {
    stripslashes_our($_GET);
    stripslashes_our($_POST);
    stripslashes_our($_COOKIE);
}
//time of start and end and wutever
function get_microtime()
{
    list($usec, $sec) = explode(' ', microtime());
    return (double) $usec + (double) $sec;
}
$starttm = get_microtime();
//path
if (!defined('PATH')) {
    define('PATH', './');
}
// there is a config
require PATH . 'includes/config.php';
//include files .. & classes ..
Esempio n. 2
0
$starttm = get_microtime();
//Kill globals varibles
unregister_globals();
if (!is_bot()) {
    @session_name('sid');
    @session_start();
}
//try close it
if (@get_magic_quotes_runtime()) {
    @set_magic_quotes_runtime(0);
}
if (@get_magic_quotes_gpc()) {
    $_GET = stripslashes_our($_GET);
    $_POST = stripslashes_our($_POST);
    $_COOKIE = stripslashes_our($_COOKIE);
    $_REQUEST = stripslashes_our($_REQUEST);
    //we use this sometime
}
//clean string and remove bad chars
$_GET = kleeja_clean_string($_GET);
$_POST = kleeja_clean_string($_POST);
$_REQUEST = kleeja_clean_string($_REQUEST);
$_COOKIE = kleeja_clean_string($_COOKIE);
//path
if (!defined('PATH')) {
    if (!defined('__DIR__')) {
        define('__DIR__', dirname(__FILE__));
    }
    define('PATH', str_replace(DIRECTORY_SEPARATOR . 'includes', '', __DIR__) . DIRECTORY_SEPARATOR);
}
// no config