File size: 1.08Kb
<?
session_name('SESS');
session_start();
$sess = session_id();
date_default_timezone_set('Europe/Kiev');
$time = time();
$time_new = (time() - 86400);
$folder_level ='';
$count=substr_count($_SERVER['SCRIPT_NAME'], '/');
for ($i=1;$i<$count;$i++){
$folder_level .= "../";}
define("H", $folder_level);
ini_set('error_reporting', true);
ini_set('display_errors',true);
ini_set('register_globals', false);
ini_set('session.use_cookies', true);
ini_set('session.use_trans_sid', false);
ini_set('arg_separator.output', "&");
ini_set('arg_separator.input', "&");
ini_set('magic_quotes_gpc', false);
ini_set('mbstring.internal_encoding', 'UTF-8');
ini_set('iconv.set.encoding', 'UTF-8');
ob_start();
include (H.'sys/inc/mysql.php');
function antihack($var){
if(is_array($var)) array_walk($var, 'antihack');
else $var = htmlspecialchars(stripslashes(mysql_real_escape_string($var)), ENT_QUOTES, 'UTF-8');
}
foreach(array('_SERVER', '_GET', '_POST', '_COOKIE', '_REQUEST') as $v){
if(!empty(${$v})) array_walk(${$v}, 'antihack');
}
include (H.'sys/inc/fnc.php');
?>