include("config.php"); #SERVERSCHUTZ# include("ctracker.php"); if($_SESSION['nickname']){ $tools=mysql_fetch_array(mysql_query("SELECT tool FROM premium WHERE nickname = '$_SESSION[nickname]'")); if($tools['tool']!=0){ $hoch=215; } else{ $hoch=215; } } else{ $hoch=187; } $ip2 = $_SERVER['REMOTE_ADDR']; $host2 = $_SERVER['HTTP_USER_AGENT']; $referer = $_SERVER['HTTP_REFERER']; $besh_db = mysql_query("SELECT * FROM bes WHERE ip = '$ip2'"); $besh = mysql_fetch_array($besh_db); if($besh == false){ $tag = strftime("%d", time()); $monat = strftime("%m", time()); $jahr = strftime("%Y", time()); if($_GET['adref']){ $adref = $_GET['adref']; $adr_db = mysql_query("SELECT * FROM adref WHERE adref = '$adref' && tag = '0' && monat = '0' && jahr = '0'"); $adr = mysql_fetch_array($adr_db); $adr2_db = mysql_query("SELECT * FROM adref WHERE adref = '$adref' && tag = '$tag' && monat = '$monat' && jahr = '$jahr'"); $adr2 = mysql_fetch_array($adr2_db); if($adr == true){ mysql_query("UPDATE adref SET klicks=klicks+1 WHERE adref = '$adref' && tag = '0' && monat = '0' && jahr = '0'"); } else{ mysql_query("INSERT INTO adref (adref, klicks, tag, monat, jahr) VALUES ('$adref', '1', '0', '0', '0')"); } if($adr2 == true){ mysql_query("UPDATE adref SET klicks=klicks+1 WHERE adref = '$adref' && tag = '$tag' && monat = '$monat' && jahr = '$jahr'"); } else{ mysql_query("INSERT INTO adref (adref, klicks, tag, monat, jahr) VALUES ('$adref', '1', '$tag', '$monat', '$jahr')"); } } else{ $adref = "noref"; $adr3_db = mysql_query("SELECT * FROM adref WHERE adref = '$adref' && tag = '$tag' && monat = '$monat' && jahr = '$jahr'"); $adr3 = mysql_fetch_array($adr3_db); if($adr3 == true){ mysql_query("UPDATE adref SET klicks=klicks+1 WHERE adref = '$adref' && tag = '0' && monat = '0' && jahr = '0'"); mysql_query("UPDATE adref SET klicks=klicks+1 WHERE adref = '$adref' && tag = '$tag' && monat = '$monat' && jahr = '$jahr'"); } else{ mysql_query("UPDATE adref SET klicks=klicks+1 WHERE adref = '$adref' && tag = '0' && monat = '0' && jahr = '0'"); mysql_query("INSERT INTO adref (adref, klicks, tag, monat, jahr) VALUES ('$adref', '1', '$tag', '$monat', '$jahr')"); } } mysql_query("UPDATE today Set bes=bes+1 WHERE today = '$today'"); mysql_query("UPDATE config Set besucher=besucher+1 WHERE ID = '1'"); mysql_query("INSERT INTO bes (datum, host, ip, ref, adref) VALUES ('$time', '$host2', '$ip2', '$referer', '$adref')"); } ?>