'".($zeit+100)."'"); mysql_query("DELETE FROM ".$db_table."counter_data WHERE ip=''"); ## wird eine IP übermittelt? if(ereg ("(^[0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3}$)",$addr)){ ## IP in den letzten X Minuten schon mal dagewesen? $ip_check = mysql_num_rows(mysql_query("SELECT id FROM ".$db_table."counter_data WHERE ip='$addr' && time>'".($zeit-$ip_lock)."' && date='".date("Y-m-d", $zeit )."'")); } else { $ip_check=9; } ## Seitenaufruf (Counteraufruf) hochzählen (keine IP-Sperre) $max_hits_old = mysql_result(mysql_query("SELECT max_hits FROM ".$db_table."counter_max"),0,0); mysql_query("UPDATE ".$db_table."counter_max SET max_hits='".($max_hits_old+1)."'"); ## schreibe wenn ip noch nicht innerhalb von 24h vorhanden ist if($ip_check==0){ ## schreibe neuen Counterstand $counterstand_old = mysql_result(mysql_query("SELECT visits_all FROM ".$db_table."counter_max"),0,0); mysql_query("UPDATE ".$db_table."counter_max SET visits_all='".($counterstand_old+1)."'"); ## schreibe neue User Daten mysql_query("INSERT INTO ".$db_table."counter_data (id, ip, time, date, client, host, referer, iphits) VALUES ('', '$addr', '$zeit', '".date("Y-m-d",$zeit)."', '".$user_agent."', '".gethostbyaddr($addr)."', '$referer', '0') "); ## max visits check $max_visits_new = mysql_num_rows(mysql_query("SELECT date FROM ".$db_table."counter_data WHERE date='".date("Y-m-d",$zeit)."'")); $max_visits_old = mysql_result(mysql_query("SELECT visits FROM ".$db_table."counter_max"),0,0); if($max_visits_new > $max_visits_old){mysql_query("UPDATE ".$db_table."counter_max SET visits='$max_visits_new'");} ## max user online check $max_user_new = mysql_num_rows(mysql_query("SELECT date FROM ".$db_table."counter_data WHERE time>'".(time()-$verfall)."'")); $max_user_old = mysql_result(mysql_query("SELECT user FROM ".$db_table."counter_max"),0,0); if($max_user_new > $max_user_old){mysql_query("UPDATE ".$db_table."counter_max SET user='$max_user_new'");} } else { ## Update der vorhandenen Daten mysql_query("UPDATE ".$db_table."counter_data SET time='$zeit', date='".date("Y-m-d", $zeit)."' WHERE ip='$addr' && time>'".($zeit-$ip_lock)."' && date='".date("Y-m-d", $zeit )."'"); } ## Seitenaufruf (Counteraufruf) dieser IP hochzählen $iphits_old = mysql_result(mysql_query("SELECT iphits FROM ".$db_table."counter_data WHERE ip='$addr' && time>'".($zeit-$ip_lock)."'"),0,0); mysql_query("UPDATE ".$db_table."counter_data SET iphits='".($iphits_old+1)."' WHERE ip='$addr' && time>'".($zeit-$ip_lock)."'"); ## Einträge in für die Counterstatistik $date=date("Y-m-d",$zeit); $visits = mysql_num_rows(mysql_query("SELECT id FROM ".$db_table."counter_data WHERE date='".date("Y-m-d",$zeit)."'")); $query = "SELECT * FROM ".$db_table."counter_stat WHERE date='$date' limit 0,1"; $result = mysql_query($query) or die (mysql_error()); $gesX = mysql_num_rows($result); while ($daten = mysql_fetch_array($result)) {$count=$daten['count'];} if ($gesX=="0") { mysql_query("INSERT INTO ".$db_table."counter_stat (date, count) VALUES ('$date','$visits') "); } else { mysql_query("UPDATE ".$db_table."counter_stat SET count='$visits' WHERE date='$date'"); } ## Auslesen der Config-Daten $query = "SELECT * from ".$db_table."counter_config"; $result = mysql_query($query) or die (mysql_error()); while ($daten = mysql_fetch_array($result)) { $show_lastday = $daten['lastday']; $show_visits = $daten['visits']; $show_user_online = $daten['user_online']; $show_max_user = $daten['max_user_online']; $show_max_visits = $daten['max_visits']; $show_visits_all = $daten['visits_all']; $show_page_lastday = $daten['hits_lastday']; $show_page_day = $daten['hits_day']; $show_page_hits = $daten['page_hits']; $show_statistiklink = $daten['statistiklink']; $show_stat_year = $daten['stat_year']; $show_stat_month = $daten['stat_month']; $show_stat_day = $daten['stat_day']; $page_back_color = $daten['page_back_color']; $table_back_color = $daten['table_back_color']; $table_head_color = $daten['table_head_color']; $table_lines_1 = $daten['table_lines_1']; $table_lines_2 = $daten['table_lines_2']; $text_color_1 = $daten['text_color_1']; $text_color_2 = $daten['text_color_2']; $table_style = $daten['table_style']; $link_color = $daten['link_color']; $visited_link = $daten['visited_link']; $active_links = $daten['active_link']; $hover_links = $daten['hover_link']; $balken_color = $daten['balken_color']; $url = $daten['url']; } ## Ausgabe der Daten $max_visits = mysql_result(mysql_query(" SELECT visits FROM ".$db_table."counter_max"),0,0); $max_user = mysql_result(mysql_query(" SELECT user FROM ".$db_table."counter_max"),0,0); $user_online = mysql_num_rows(mysql_query("SELECT id FROM ".$db_table."counter_data WHERE time>'".($zeit-$verfall)."'")); $lastday = mysql_num_rows(mysql_query("SELECT id FROM ".$db_table."counter_data WHERE date='".date("Y-m-d", $zeit-86400)."'")); $visits = mysql_num_rows(mysql_query("SELECT id FROM ".$db_table."counter_data WHERE date='".date("Y-m-d", $zeit)."'")); $visits_all = mysql_result(mysql_query(" SELECT visits_all FROM ".$db_table."counter_max"),0,0); $page_hits = mysql_result(mysql_query(" SELECT max_hits FROM ".$db_table."counter_max"),0,0); ## Ausgabe der Seitenaufrufe Gestern $query = "SELECT iphits FROM ".$db_table."counter_data WHERE date='".date("Y-m-d", $zeit-86400)."'"; $result = mysql_query($query) or die (mysql_error()); $page_lastday=0; while ($daten = mysql_fetch_array($result)) { $page_lastday = $page_lastday + $daten[0]; } ## Ausgabe der Seitenaufrufe Heute $query = "SELECT iphits FROM ".$db_table."counter_data WHERE date='".date("Y-m-d", $zeit)."'"; $result = mysql_query($query) or die (mysql_error()); $page_day=0; while ($daten = mysql_fetch_array($result)) { $page_day = $page_day + $daten[0]; } ## Auslesen des Styles $table_style = mysql_result(mysql_query(" SELECT table_style FROM ".$db_table."counter_config"),0,0); ?>



 


 Startseite
 Meine Person
 Meine Arbeit
 Angebote
 Projekte
 Geburtstagsfeier
 Termine und Preise
 Reisen
 Kontakt
 Impressum