File size: 1.68Kb
<?
list($msec, $sec) = explode(chr(32), microtime());
$headtime = $sec + $msec;
$folder_level ='';
$count=substr_count($_SERVER['SCRIPT_NAME'], '/');
for ($i=1;$i<$count;$i++){
$folder_level .= "../";}
define("BASEDIR", $folder_level);
if (!is_file(BASEDIR."SYSTEM/include/mysql.php")){
header("Location: ../INSTALL/");
exit;}
if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
else if(isset($_SERVER['HTTP_CLIENT_IP'])) $ip = $_SERVER['HTTP_CLIENT_IP'];
else if(isset($_SERVER['REMOTE_ADDR'])) $ip = $_SERVER['REMOTE_ADDR'];
else {$ip = 'hide';}
$ip=mysql_escape_string(stripslashes(htmlspecialchars($ip)));
$ip_1='';
$ip_2='';
$ip_op='';
if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) $ip_1 = mysql_escape_string(htmlspecialchars(stripslashes($_SERVER['HTTP_X_FORWARDED_FOR'])));
if (isset($_SERVER['HTTP_CLIENT_IP'])) $ip_2 = mysql_escape_string(htmlspecialchars(stripslashes($_SERVER['HTTP_CLIENT_IP'])));
if (isset($_SERVER['REMOTE_ADDR'])) $ip_op = mysql_escape_string(htmlspecialchars(stripslashes($_SERVER['REMOTE_ADDR'])));
if (isset($_SERVER['HTTP_X_OPERAMINI_PHONE_UA'])) {$ua = htmlspecialchars(stripslashes($_SERVER['HTTP_X_OPERAMINI_PHONE_UA']));}
else{$ua=stripslashes(htmlspecialchars($_SERVER["HTTP_USER_AGENT"]));}
$ua=strtok($ua,'(');
$ua=strtok($ua,' ');
$ua=mysql_escape_string(strtok($ua,'/'));
$time=time();
$page=1;
$opdirbase=opendir(BASEDIR.'SYSTEM/functions');
while ($filebase=readdir($opdirbase))
{
if (eregi('.php',$filebase))
{
include_once(BASEDIR.'SYSTEM/functions/'.$filebase);
}
}
function amp($crop_amp){
return str_replace("&SESS=", "&SESS=", $crop_amp);
}
ob_start ("amp");
?>