0;$i--) {
if(strlen($i)<2) $i = "0".$i;
$tmp = mysql_fetch_array(safe_query("SELECT count FROM ".PREFIX."counter_stats WHERE dates='".$i.$datemonth."'"));
if($tmp[count]) $visits = $tmp[count]; else $visits=0;
$i%2 ? $backgroundcolor1=BG_1 : $backgroundcolor1=BG_2;
$i%2 ? $backgroundcolor2=BG_3 : $backgroundcolor2=BG_4;
$prozent = $visits*100/$month;
$monatsstat .= '
'.$i.$datemonth.': |
'.$visits.' ![](images/icons/poll.gif) |
';
}
$tmp = mysql_fetch_array(safe_query("SELECT online FROM ".PREFIX."counter"));
$days_online = round((time()-$tmp[online])/(3600*24));
if(!$days_online) $days_online = 1;
$perday = round($total/$days_online,2);
$perhour = round($total/$days_online/24,2);
$permonth = round($total/$days_online*24,2);
$tmp = mysql_fetch_array(safe_query("SELECT max(count) as MAXIMUM FROM ".PREFIX."counter_stats"));
$maxvisits = $tmp[MAXIMUM];
$online_lasthour = mysql_num_rows(safe_query("SELECT ip FROM ".PREFIX."counter_iplist WHERE del>".(time()-3600)));
$online = mysql_num_rows(safe_query("SELECT time FROM ".PREFIX."whoisonline"));
$dm=mysql_fetch_array(safe_query("SELECT maxonline FROM ".PREFIX."counter"));
$maxonline=$dm['maxonline'];
$guests = mysql_num_rows(safe_query("SELECT ip FROM ".PREFIX."whoisonline WHERE userID=''"));
$user = mysql_num_rows(safe_query("SELECT userID FROM ".PREFIX."whoisonline WHERE ip=''"));
$useronline = $guests + $user;
if($user==1) $user_on='1 user';
else $user_on=$user.' users';
if($guests==1) $guests_on='1 guest';
else $guests_on= $guests.' guests';
eval ("\$stats = \"".gettemplate("counter_stats")."\";");
echo $stats;
?>