$CNSTATS_SSL_CHECK = $_SERVER['HTTPS'];
if($CNSTATS_SSL_CHECK=='on') {
$http_prefix='https';
} else {
$http_prefix='http';
}
$CNSTATS_OLD_ERROR_REPORTING=error_reporting(E_ALL&~E_NOTICE);
$CNSTATS_OLD_USER_ABORT=ignore_user_abort(true);
function _161827d9($_a5e3b32d){if($_a5e3b32d=="255.255.255.255")return(true);if(substr($_a5e3b32d,0,8)=="192.168.")return(true);if(substr($_a5e3b32d,0,7)=="172.16.")return(true);if(substr($_a5e3b32d,0,7)=="172.17.")return(true);if(substr($_a5e3b32d,0,7)=="172.18.")return(true);if(substr($_a5e3b32d,0,7)=="172.19.")return(true);if(substr($_a5e3b32d,0,7)=="172.20.")return(true);if(substr($_a5e3b32d,0,7)=="172.21.")return(true);if(substr($_a5e3b32d,0,7)=="172.22.")return(true);if(substr($_a5e3b32d,0,7)=="172.23.")return(true);if(substr($_a5e3b32d,0,7)=="172.24.")return(true);if(substr($_a5e3b32d,0,7)=="172.25.")return(true);if(substr($_a5e3b32d,0,7)=="172.26.")return(true);if(substr($_a5e3b32d,0,7)=="172.27.")return(true);if(substr($_a5e3b32d,0,7)=="172.28.")return(true);if(substr($_a5e3b32d,0,7)=="172.29.")return(true);if(substr($_a5e3b32d,0,7)=="172.30.")return(true);if(substr($_a5e3b32d,0,7)=="172.31.")return(true);if(substr($_a5e3b32d,0,3)=="10.")return(true);return(false);}function _35c2eaac($_24bdb5eb,$_2cbdec2e){GLOBAL$STATS_CONF,$COUNTER;if($STATS_CONF["sqlserver"]="MySql"){if($COUNTER["MySql_Error"]===true)return NULL;$_6c09ff9d=@mysql_db_query($STATS_CONF["dbname"],$_24bdb5eb,$_2cbdec2e);if(mysql_errno($_2cbdec2e)!=0){if($COUNTER["senderrorsbymail"]=="yes"&&!empty($STATS_CONF["adminemail"])){if(!mail($STATS_CONF["adminemail"],"CNStats MySql Error",">A fatal MySQL error occured\n\n".mysql_error()."\nQuery:\n------------\n".$_24bdb5eb."\n-----------\nURL: ".$http_prefix."://".$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"]."\nDate: ".date("Y-m-d H:i:s"),"Content-Type: text/plain; charset=iso8859-1\r\nFrom: ".$STATS_CONF["adminemail"],"-f".$STATS_CONF["adminemail"]))mail($STATS_CONF["adminemail"],"CNStats MySql Error",">A fatal MySQL error occured\n\n".mysql_error()."\nQuery:\n------------\n".$_24bdb5eb."\n-----------\nURL: ".$http_prefix."://".$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"]."\nDate: ".date("Y-m-d H:i:s"),"Content-Type: text/plain; charset=iso8859-1\r\nFrom: ".$STATS_CONF["adminemail"]);}if($STATS_CONF["quiet"]!="yes")die("<font color=red><B>A fatal MySQL error occured:</B></font><br><br>\n\n".mysql_error($_2cbdec2e)."<br><br>\n\n ".$_24bdb5eb);$COUNTER["MySql_Error"]=true;}}return($_6c09ff9d);}
function _f0769e75(){GLOBAL$COUNTER,$_2adbf61b,$STATS_CONF;$_2cbdec2e=$COUNTER["CONN"];$_d1f99aaf=1;include_once$_2adbf61b."/mail.php";}function _f90807e6(){global$COUNTER,$STATS_CONF;$_6c09ff9d=_35c2eaac("SHOW TABLE STATUS",$COUNTER["CONN"]);$_f7c0246a=0;while($_e8b7be43=mysql_fetch_array($_6c09ff9d,MYSQL_ASSOC)){while(list($_8a90aba9,$_97dfba65)=each($_e8b7be43)){if($_8a90aba9=="Data_length"&&(substr($_b5171008,0,strlen($STATS_CONF["sqlprefix"]))==$STATS_CONF["sqlprefix"]))$_f7c0246a+=$_97dfba65;if($_8a90aba9=="Index_length"&&(substr($_b5171008,0,strlen($STATS_CONF["sqlprefix"]))==$STATS_CONF["sqlprefix"]))$_f7c0246a+=$_97dfba65;if($_8a90aba9=="Name")$_b5171008=$_97dfba65;}}_35c2eaac("INSERT IGNORE INTO ".$STATS_CONF["sqlprefix"]."size SET date=NOW(), size='".$_f7c0246a."';",$COUNTER["CONN"]);$_b2f04e78=intval($COUNTER["savelog"]);if($_b2f04e78<1||$_b2f04e78>300)$_b2f04e78=300;_35c2eaac("DELETE FROM ".$STATS_CONF["sqlprefix"]."today",$COUNTER["CONN"]);_35c2eaac("DELETE FROM ".$STATS_CONF["sqlprefix"]."log WHERE date<'".date("Y-m-d H:i:s",mktime(0,0,0,date("m"),date("d")-$_b2f04e78,date("Y"))+$COUNTER["timeoffset"])."'",$COUNTER["CONN"]);_f0769e75($COUNTER["CONN"]);mysql_close($COUNTER["CONN"]);}function _1b4669b5($_2adbf61b,$_a5e3b32d,$_7372c9be){if(_161827d9(long2ip($_a5e3b32d)))$_59329eea=long2ip($_7372c9be);else$_59329eea=long2ip($_a5e3b32d);if(is_file($_2adbf61b."/geoip/GeoIPCity.dat")){include_once($_2adbf61b."/geoip/geoipcity.inc");$_5f0b3663=geoip_open($_2adbf61b."/geoip/GeoIPCity.dat",GEOIP_STANDARD);$_b8edc449=geoip_record_by_addr($_5f0b3663,$_59329eea);$_5373c966=$_b8edc449->country_code;$_2d5b0234=mysql_real_escape_string($_b8edc449->city."||".intval($_b8edc449->latitude*10)."|".intval($_b8edc449->longitude*10));}elseif(is_file($_2adbf61b."/geoip/GeoIP.dat")){include_once($_2adbf61b."/geoip/geoip.inc");$_5f0b3663=geoip_open($_2adbf61b."/geoip/GeoIP.dat",GEOIP_STANDARD);$_5373c966=geoip_country_code_by_addr($_5f0b3663,$_59329eea);geoip_close($_5f0b3663);}else{$_5373c966=$_2d5b0234="";if(is_file($_2adbf61b."/cngeoip/cngeoip.dat")){include_once($_2adbf61b."/cngeoip/cngeoip.php");$_4b56443e=cngeoip_lookup_ip($_59329eea);if(is_array($_4b56443e)){$_5373c966=$_4b56443e[2];$_2d5b0234=mysql_real_escape_string($_4b56443e[1]."|".$_4b56443e[0]."|".intval($_4b56443e[3]*10)."|".intval($_4b56443e[4]*10));}}}if($_5373c966!="")$_5373c966=(ord($_5373c966[0])<<8)+ord($_5373c966[1]);else$_5373c966=0;$_136ac113=Array(0=>$_5373c966,1=>$_2d5b0234);return$_136ac113;}function _b9566752(){GLOBAL$STATS_CONF,$COUNTER,$_2adbf61b,$CNSTATS_TITLE,$CNSTATS_JAVASCRIPT_CODE,$CNSTATS404;$_c674e474=true;if(@is_array($STATS_CONF))if(isset($STATS_CONF["graph"]))$_c674e474=false;if($_c674e474){$STATS_CONF=Array("noclose"=>"","sqlinstructions"=>Array(),"sqlprefix"=>"cns_","graph"=>0,"is_cookie"=>0);$COUNTER=Array("excludeip"=>Array(),"excludemask"=>Array(),"excludeurl"=>Array(),"timeoffset"=>0,"sqlwritelog"=>"","HTTPheaders"=>Array());}$_2adbf61b=dirname(__FILE__);$_2adbf61b=str_replace(chr(92),"/",$_2adbf61b);if(substr($_2adbf61b,-1)!="/")$_2adbf61b.="/";if(!isset($STATS_CONF["dbname"])){if(is_file($_2adbf61b."/config.php"))include$_2adbf61b."/config.php";else{print"<a href=\"http://www.cnstats.com/\">CNStats</a> installed incorrectly. Configuration file not found.";return;}}if(empty($STATS_CONF["sqlprefix"]))$STATS_CONF["sqlprefix"]="cns_";$COUNTER["MySql_Error"]=false;if($STATS_CONF["noclose"]===true)$_6a642390=true;else$_6a642390=false;if(!is_array($COUNTER["excludeip"])){$_fbf7c968=$COUNTER["excludeip"];$_62fe98d2=$COUNTER["excludemask"];$COUNTER["excludemask"]=$COUNTER["excludeip"]=Array();$COUNTER["excludeip"][]=$_fbf7c968;$COUNTER["excludemask"][]=$_62fe98d2;}$_6282e779=false;while(list($_8a90aba9,$_97dfba65)=each($COUNTER["excludeip"])){$_5567710b=ip2long($_97dfba65);$_c9db130c=ip2long($COUNTER["excludemask"][$_8a90aba9]);if((ip2long($_SERVER["REMOTE_ADDR"])&$_c9db130c)==($_5567710b&$_c9db130c)){$_6282e779=true;break;}}if(is_array($COUNTER["excludeurl"])){if(isset($STATS_CONF["page"]))$_140ab620=$STATS_CONF["page"];else$_140ab620=$http_prefix."://".$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"];foreach($COUNTER["excludeurl"]as$_97dfba65)if(strpos($_140ab620,$_97dfba65)!==false){$_6282e779=true;break;}}if(version_compare(phpversion(),"4.2.0",">="))$_2cbdec2e=@mysql_connect($STATS_CONF["sqlhost"],$STATS_CONF["sqluser"],$STATS_CONF["sqlpassword"],TRUE);else$_2cbdec2e=@mysql_connect($STATS_CONF["sqlhost"],$STATS_CONF["sqluser"],$STATS_CONF["sqlpassword"]);if(!$_2cbdec2e)return;if(!@mysql_select_db($STATS_CONF["dbname"],$_2cbdec2e))return;if($_6282e779){$_6c09ff9d=_35c2eaac("SELECT t_hits,hits,hosts FROM ".$STATS_CONF["sqlprefix"]."counter;",$_2cbdec2e);$STATS_CONF=mysql_fetch_array($_6c09ff9d,MYSQL_ASSOC);mysql_close($_2cbdec2e);return;}if(is_array($STATS_CONF["sqlinstructions"]))foreach($STATS_CONF["sqlinstructions"]as$_dbd66adf)_35c2eaac($_dbd66adf,$_2cbdec2e);$_268b9c9d=htmlspecialchars($_SERVER["HTTP_USER_AGENT"]);$_a5e3b32d=$_SERVER["REMOTE_ADDR"];$_7372c9be="";if(!empty($_SERVER["HTTP_X_FORWARDED_FOR"])){$_7372c9be=$_a5e3b32d;$_a5e3b32d=$_SERVER["HTTP_X_FORWARDED_FOR"];}$_5a5ea05a=strrpos($_a5e3b32d,",");if($_5a5ea05a!=0)$_a5e3b32d=trim(substr($_a5e3b32d,$_5a5ea05a+1));$_a5e3b32d=ip2long($_a5e3b32d);$_5a5ea05a=strrpos($_7372c9be,",");if($_5a5ea05a!=0)$_7372c9be=trim(substr($_7372c9be,$_5a5ea05a+1));$_7372c9be=ip2long($_7372c9be);if(isset($_GET["c"]))$_06b9df6f=intval($_GET["c"]);else$_06b9df6f=0;if($STATS_CONF["graph"]==1){$_140ab620=$STATS_CONF["page"];$_55dc3685=$STATS_CONF["referer"];$_2b36786b=mysql_real_escape_string($STATS_CONF["title"]);$_79b2da48=$STATS_CONF["res"];$_faa31c69=$STATS_CONF["depth"];}else{if(isset($STATS_CONF["page"]))$_140ab620=urlencode(htmlspecialchars($STATS_CONF["page"]));else$_140ab620=urlencode(htmlspecialchars($http_prefix."://".$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"]));if(isset($STATS_CONF["referer"]))$_55dc3685=htmlspecialchars($STATS_CONF["referer"]);else if(isset($_SERVER["HTTP_REFERER"]))$_55dc3685=htmlspecialchars($_SERVER["HTTP_REFERER"]);else$_55dc3685="";$_2b36786b=mysql_real_escape_string($CNSTATS_TITLE);$_79b2da48=$_faa31c69=0;}$_aa9e377a=date("Y-m-d H:i:s",time()+$COUNTER["timeoffset"]);if(isset($_SERVER["HTTP_ACCEPT_LANGUAGE"]))$_d4db71b5=htmlspecialchars($_SERVER["HTTP_ACCEPT_LANGUAGE"]);else$_d4db71b5="";if(@is_array($COUNTER["HTTPheaders"])){foreach($COUNTER["HTTPheaders"]as$_0862575d=>$_6b643b84)@header($_0862575d.": ".$_6b643b84);}elseif(!isset($COUNTER["HTTPheaders"]["P3P"]))@header("P3P: policyref=\"/w3c/p3p.xml\", CP=\"UNI\"");$_6c09ff9d=_35c2eaac("UPDATE ".$STATS_CONF["sqlprefix"]."counter SET last='".date("d",time()+$COUNTER["timeoffset"])."';",$_2cbdec2e);if(mysql_affected_rows()>0){@ignore_user_abort(1);@set_time_limit(0);$_aa9e377a=date("Y-m-d H:i:s",mktime(0,0,0,date("m"),date("d")-1,date("Y"))+$COUNTER["timeoffset"]);$_6c09ff9d=_35c2eaac("SELECT hits,hosts,users,u_hits,u_hosts FROM ".$STATS_CONF["sqlprefix"]."counter LIMIT 1",$_2cbdec2e);if($_e8b7be43=@mysql_fetch_assoc($_6c09ff9d)){_35c2eaac("INSERT INTO ".$STATS_CONF["sqlprefix"]."counter_total set hits='".$_e8b7be43["hits"]."',hosts='".$_e8b7be43["hosts"]."', u_hits='".$_e8b7be43["u_hits"]."', u_hosts='".$_e8b7be43["u_hosts"]."', date='".$_aa9e377a."', users='".$_e8b7be43["users"]."';",$_2cbdec2e);}_35c2eaac("UPDATE ".$STATS_CONF["sqlprefix"]."counter SET hits=0, hosts=0, users=0, u_hits=0, u_hosts=0;",$_2cbdec2e);$COUNTER["CONN"]=$_2cbdec2e;$_6a642390=true;register_shutdown_function("_f90807e6");}$_2d5b0234=$_5373c966="";if($STATS_CONF["is_cookie"]==1){$_52596c31=intval($_COOKIE["cnstid"]);if($_52596c31==0){$_52596c31=crc32($_SERVER["REMOTE_ADDR"].$_SERVER["HTTP_X_FORWARDED_FOR"].time());}if(isset($STATS_CONF["cookiedomain"])){@setcookie("cnstid",$_52596c31,mktime(23,59,59,date("m"),date("d"),date("Y")+1),"/",$STATS_CONF["cookiedomain"]);@setcookie("cnslastvisit",time()+$COUNTER["timeoffset"],mktime(23,59,59,date("m"),date("d"),date("Y")+1),"/",$STATS_CONF["cookiedomain"]);}else{@setcookie("cnstid",$_52596c31,mktime(23,59,59,date("m"),date("d"),date("Y")+1),"/");@setcookie("cnslastvisit",time()+$COUNTER["timeoffset"],mktime(23,59,59,date("m"),date("d"),date("Y")+1),"/");}if(isset($_COOKIE["cnsuid"]))$_539b0606=intval($_COOKIE["cnsuid"]);else$_539b0606=0;_35c2eaac("SELECT GET_LOCK('cnstatslock',60);",$_2cbdec2e);if($_539b0606!=0)$_c1e2a98c=0;else{$_6c09ff9d=_35c2eaac("select max(uid) from ".$STATS_CONF["sqlprefix"]."log",$_2cbdec2e);$_539b0606=mysql_result($_6c09ff9d,0,0)+1;$_c1e2a98c=1;if(isset($STATS_CONF["cookiedomain"]))@setcookie("cnsuid",$_539b0606,mktime(23,59,59,date("m"),date("d"),date("Y")),"/",$STATS_CONF["cookiedomain"]);else@setcookie("cnsuid",$_539b0606,mktime(23,59,59,date("m"),date("d"),date("Y")),"/");}$_6c09ff9d=_35c2eaac("SELECT UNIX_TIMESTAMP(date) as date,hid,city,country FROM ".$STATS_CONF["sqlprefix"]."today WHERE ip='$_a5e3b32d' AND proxy='$_7372c9be';",$_2cbdec2e);if(mysql_num_rows($_6c09ff9d)==0){$_0d0e09b1=_35c2eaac("SELECT max(hid) FROM ".$STATS_CONF["sqlprefix"]."log;",$_2cbdec2e);$_47653625=mysql_result($_0d0e09b1,0,0)+1;$_d1f4eb9a=1;mysql_free_result($_0d0e09b1);$_775ee79c=_1b4669b5($_2adbf61b,$_a5e3b32d,$_7372c9be);$_5373c966=$_775ee79c[0];$_2d5b0234=$_775ee79c[1];_35c2eaac("INSERT IGNORE INTO ".$STATS_CONF["sqlprefix"]."today (ip,proxy,date, uid, hid, city, country) VALUES ('$_a5e3b32d','$_7372c9be','".date("Y-m-d H:i:s",time()+$COUNTER["timeoffset"])."','$_539b0606','$_47653625','".mysql_real_escape_string($_775ee79c[1])."','".$_775ee79c[0]."')",$_2cbdec2e);}else{$_d1f4eb9a=0;$_47653625=mysql_result($_6c09ff9d,0,1);$_2d5b0234=mysql_result($_6c09ff9d,0,2);$_5373c966=mysql_result($_6c09ff9d,0,3);_35c2eaac("UPDATE ".$STATS_CONF["sqlprefix"]."today SET date='".date("Y-m-d H:i:s",time()+$COUNTER["timeoffset"])."' WHERE ip='$_a5e3b32d' AND proxy='$_7372c9be';",$_2cbdec2e);}_35c2eaac("SELECT RELEASE_LOCK('cnstatslock');",$_2cbdec2e);}else{$_52596c31=0;_35c2eaac("SELECT GET_LOCK('cnstatslock',60);",$_2cbdec2e);$_6c09ff9d=_35c2eaac("SELECT UNIX_TIMESTAMP(date) as date,uid,hid,city,country FROM ".$STATS_CONF["sqlprefix"]."today WHERE ip='$_a5e3b32d' AND proxy='$_7372c9be';",$_2cbdec2e);if(mysql_num_rows($_6c09ff9d)==0){$_d1f4eb9a=1;$_c1e2a98c=1;$_0d0e09b1=_35c2eaac("SELECT max(hid), max(uid) FROM ".$STATS_CONF["sqlprefix"]."log;",$_2cbdec2e);$_47653625=mysql_result($_0d0e09b1,0,0)+1;$_539b0606=mysql_result($_0d0e09b1,0,1)+1;mysql_free_result($_0d0e09b1);$_775ee79c=_1b4669b5($_2adbf61b,$_a5e3b32d,$_7372c9be);$_5373c966=$_775ee79c[0];$_2d5b0234=$_775ee79c[1];_35c2eaac("INSERT IGNORE INTO ".$STATS_CONF["sqlprefix"]."today (ip,proxy,date, uid, hid, country, city) VALUES ('$_a5e3b32d','$_7372c9be','".date("Y-m-d H:i:s",time()+$COUNTER["timeoffset"])."','$_539b0606','$_47653625','".$_775ee79c[0]."','".mysql_real_escape_string($_775ee79c[1])."')",$_2cbdec2e);}else{$_47653625=mysql_result($_6c09ff9d,0,2);$_2d5b0234=mysql_result($_6c09ff9d,0,3);$_5373c966=mysql_result($_6c09ff9d,0,4);$_d1f4eb9a=0;if(mysql_result($_6c09ff9d,0,0)+3600<time()){$_c1e2a98c=1;$_0d0e09b1=_35c2eaac("SELECT max(uid) FROM ".$STATS_CONF["sqlprefix"]."log;",$_2cbdec2e);$_539b0606=mysql_result($_0d0e09b1,0,0)+1;mysql_free_result($_0d0e09b1);$_59323c7f=", uid='".$_539b0606."'";}else{$_c1e2a98c=0;$_59323c7f="";$_539b0606=mysql_result($_6c09ff9d,0,1);}_35c2eaac("UPDATE ".$STATS_CONF["sqlprefix"]."today SET date='".date("Y-m-d H:i:s",time()+$COUNTER["timeoffset"])."' ".$_59323c7f." WHERE ip='$_a5e3b32d' AND proxy='$_7372c9be';",$_2cbdec2e);}_35c2eaac("SELECT RELEASE_LOCK('cnstatslock');",$_2cbdec2e);}if($COUNTER["type"]==3){$_539b0606=0;$_c1e2a98c=0;}$_10fd20de="user";$_6c09ff9d=_35c2eaac("SELECT d2 FROM ".$STATS_CONF["sqlprefix"]."data WHERE type=3",$_2cbdec2e);while($_e8b7be43=mysql_fetch_assoc($_6c09ff9d)){if(strpos($_268b9c9d,$_e8b7be43["d2"])!==false){$_10fd20de="robot";break;}}if(isset($_COOKIE["cnslastvisit"]))$_17f4ec1b=time()+$COUNTER["timeoffset"]-intval($_COOKIE["cnslastvisit"]);else$_17f4ec1b=-1;$_d4db71b5=substr($_d4db71b5,0,32);$_79b2da48=intval(substr($_79b2da48,0,10));$_2d5b0234=substr($_2d5b0234,0,128);$_2b36786b=substr($_2b36786b,0,128);$_268b9c9d=substr($_268b9c9d,0,128);$_5373c966=intval($_5373c966);$_7372c9be=intval($_7372c9be);if($_7372c9be==0)$_7372c9be=-1;$_a5e3b32d=intval($_a5e3b32d);if($_a5e3b32d==0)$_a5e3b32d=-1;_35c2eaac("INSERT ".$COUNTER["sqlwritelog"]." INTO ".$STATS_CONF["sqlprefix"]."log (date,ip,type,proxy,page,agent,referer,language,type1,uid,tid,hid,res,depth,cookie,country,city,title,isrobot,prevdate,is404) VALUES ('".$_aa9e377a."','".$_a5e3b32d."',".$_d1f4eb9a.",'".$_7372c9be."','".mysql_real_escape_string($_140ab620)."','".mysql_real_escape_string($_268b9c9d)."','".mysql_real_escape_string($_55dc3685)."','".mysql_real_escape_string($_d4db71b5)."','".$_c1e2a98c."','".$_539b0606."','".$_52596c31."','".$_47653625."','".mysql_real_escape_string($_79b2da48)."','".$_faa31c69."','".$_06b9df6f."','".$_5373c966."','".mysql_real_escape_string($_2d5b0234)."','".mysql_real_escape_string($_2b36786b)."','".$_10fd20de."',".$_17f4ec1b.",'".($CNSTATS404=="yes"?"yes":"no")."')",$_2cbdec2e);if($COUNTER["type"]==3){if(!isset($STATS_CONF["cnstats_http_path"])){$_9606c2fe=strlen($_SERVER["DOCUMENT_ROOT"]);if(substr(__FILE__,0,$_9606c2fe)==$_SERVER["DOCUMENT_ROOT"]){$_e3e3007f=substr(__FILE__,$_9606c2fe);}$_e3e3007f=str_replace("cnt.php","cnt-combined.php",$_e3e3007f);}else{$_e3e3007f=$STATS_CONF["cnstats_http_path"];if(substr($_e3e3007f,-1)!="/")$_e3e3007f.="/";if(substr($_e3e3007f,0,1)!="/")$_e3e3007f="/".$_e3e3007f;$_e3e3007f.="cnt-combined.php";}$_46a75c12=mysql_result(_35c2eaac("SELECT LAST_INSERT_ID();",$_2cbdec2e),0,0);if($STATS_CONF["codegeneration"]=="onlyid"){$CNSTATS_JAVASCRIPT_CODE=$_46a75c12;}else{if(substr($STATS_CONF["cnsoftwaredomain"],0,4)=="www.")$_a7a91e0b=substr($STATS_CONF["cnsoftwaredomain"],4);else$_a7a91e0b=$STATS_CONF["cnsoftwaredomain"];if($_SERVER["HTTP_HOST"]==$_a7a91e0b||$_SERVER["HTTP_HOST"]=="www.".$_a7a91e0b)$_2f20964b=$_SERVER["HTTP_HOST"];else$_2f20964b=$_a7a91e0b;if($_e3e3007f=="//")$_e3e3007f="/";$CNSTATS_JAVASCRIPT_CODE="";if($STATS_CONF["code"]=="HTML"||$STATS_CONF["code"]=="html"){$CNSTATS_JAVASCRIPT_CODE.="\n<!-- RUDBstats begin -->\n";$CNSTATS_JAVASCRIPT_CODE.="<script type=\"text/javascript\">\n";$CNSTATS_JAVASCRIPT_CODE.="cnsd=document;cnst=escape(cnsd.title);\n";$CNSTATS_JAVASCRIPT_CODE.="cnst=cnst.replace(/\+/g,'%2B');cnsa=navigator.appName;\n";$CNSTATS_JAVASCRIPT_CODE.="cnsn=(cnsa.substring(0,2)=='Mi')?0:1;cnss=screen;cnspx=(cnsn==0)?cnss.colorDepth:cnss.pixelDepth;\n";$CNSTATS_JAVASCRIPT_CODE.="document.write('<img src=\"".$http_prefix."://".$_2f20964b.$_e3e3007f."?i=".$_46a75c12."&e='+cnss.width+'.'+cnss.height+'&d='+cnspx+'&r='+escape(cnsd.referrer)+'&p='+escape(cnsd.location)+'&t='+cnst+'\" width=\"1\" height=\"1\" border=\"0\">');\n";$CNSTATS_JAVASCRIPT_CODE.="</script>";$CNSTATS_JAVASCRIPT_CODE.="<noscript><img src=\"".$http_prefix."://".$_2f20964b.$_e3e3007f."?i=".$_46a75c12."\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /></noscript>";$CNSTATS_JAVASCRIPT_CODE.="\n<!-- RUDBstats end -->\n";}else{$CNSTATS_JAVASCRIPT_CODE.="\n<!-- RUDBstats begin -->\n";$CNSTATS_JAVASCRIPT_CODE.="<span id=\"cnstats_span\"><script type=\"text/javascript\">\n";$CNSTATS_JAVASCRIPT_CODE.="cnsd=document;\n";$CNSTATS_JAVASCRIPT_CODE.="cnst=escape(cnsd.title);\n";$CNSTATS_JAVASCRIPT_CODE.="cnst=cnst.replace(/\+/g,'%2B');\n";$CNSTATS_JAVASCRIPT_CODE.="cnsa=navigator.appName;\n";$CNSTATS_JAVASCRIPT_CODE.="cnsn=(cnsa.substring(0,2)=='Mi')?0:1;\n";$CNSTATS_JAVASCRIPT_CODE.="cnss=screen;cnspx=(cnsn==0)?cnss.colorDepth:cnss.pixelDepth;\n";$CNSTATS_JAVASCRIPT_CODE.="if (cnsd.getElementById)\n";$CNSTATS_JAVASCRIPT_CODE.="{\n";$CNSTATS_JAVASCRIPT_CODE.=" var i=cnsd.createElement('img');\n";$CNSTATS_JAVASCRIPT_CODE.=" var iurl='".$http_prefix."://".$_2f20964b.$_e3e3007f."?i=".$_46a75c12."';\n";$CNSTATS_JAVASCRIPT_CODE.=" var amp=String.fromCharCode(38);\n";$CNSTATS_JAVASCRIPT_CODE.=" iurl+=amp+'e='+cnss.width+'.'+cnss.height;\n";$CNSTATS_JAVASCRIPT_CODE.=" iurl+=amp+'d='+cnspx+amp+'r='+escape(cnsd.referrer);\n";$CNSTATS_JAVASCRIPT_CODE.=" iurl+=amp+'p='+escape(cnsd.location)+amp+'t='+cnst;\n";$CNSTATS_JAVASCRIPT_CODE.=" i.src=iurl;\n";$CNSTATS_JAVASCRIPT_CODE.=" i.width=1;i.height=1;i.border=0;\n";$CNSTATS_JAVASCRIPT_CODE.="cnsd.getElementById('cnstats_span').appendChild(i);\n";$CNSTATS_JAVASCRIPT_CODE.="}\n";$CNSTATS_JAVASCRIPT_CODE.="</script></span>\n";$CNSTATS_JAVASCRIPT_CODE.="<noscript><img src=\"".$http_prefix."://".$_2f20964b.$_e3e3007f."?i=".$_46a75c12."\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /></noscript>";$CNSTATS_JAVASCRIPT_CODE.="\n<!-- RUDBstats end -->\n";}if($STATS_CONF["codegeneration"]!="variable"){print$CNSTATS_JAVASCRIPT_CODE;}}}if($_10fd20de=="user")$_c4e504c6=" ,u_hosts=u_hosts+".intval($_d1f4eb9a).", u_t_hosts=u_t_hosts+".intval($_d1f4eb9a).", u_hits=u_hits+1, u_t_hits=u_t_hits+1";else$_c4e504c6="";_35c2eaac("UPDATE ".$STATS_CONF["sqlprefix"]."counter SET hits=hits+1, hosts=hosts+".intval($_d1f4eb9a).", t_hits=t_hits+1, t_hosts=t_hosts+".intval($_d1f4eb9a).", users=users+".$_c1e2a98c.", t_users=t_users+".$_c1e2a98c.$_c4e504c6.";",$_2cbdec2e);$_6c09ff9d=_35c2eaac("SELECT hits,hosts,t_hits FROM ".$STATS_CONF["sqlprefix"]."counter",$_2cbdec2e);$STATS_CONF=array_merge($STATS_CONF,mysql_fetch_assoc($_6c09ff9d));if(!$_6a642390)mysql_close($_2cbdec2e);}_b9566752();error_reporting($CNSTATS_OLD_ERROR_REPORTING);ignore_user_abort($CNSTATS_OLD_USER_ABORT);