<strong><br />
<?php
ob_start();
error_reporting(E_ALL);
include("config.php");
mysql_connect($conf['MysqlHost'], $conf['MysqlUser'], $conf['MysqlPass']);
mysql_select_db($conf['MysqlDb']);
?>
<html>
<head>
<title>Statistieken :: <?php echo $conf['Titel']; ?></title>
<style>
body, td { font-family: Verdana; font-size: x-small; }
</style>
</head>
<body>
<center>
<?php
if($conf['Totaal']) {
$query = mysql_query("SELECT * FROM stats GROUP BY ip") or die(mysql_error());
$uhits = mysql_num_rows($query);
$hits = mysql_result(mysql_query("SELECT sum(hits) as total FROM stats"), 0, "total");
$query = mysql_query("SELECT * FROM stats GROUP BY datum") or die(mysql_error());
$delen = mysql_num_rows($query);
$total = $uhits + $hits;
$bar1 = round($hits / $total * 100);
$bar2 = round($uhits / $total * 100);
?>
<table border="0" cellpadding="5" cellspacing="0" width="100%" style="border: 1px solid #DDDDDD;">
<tr>
<td colspan="2" style="border-bottom: 1px dashed #DDDDDD;" bgcolor="#EFEFEF"><b>Totaal</b></td>
</tr>
<tr>
<td width="140">Hits: (<?php echo $hits; ?>)</td>
<td><img src="bar_line.gif" width="1" height="15"><img src="bar_line.gif" width="1" height="15"><img src="bar_line.gif" width="1" height="15"></td>
</tr>
<tr>
<td width="140" bgcolor="#EFEFEF">Unieke hits: (<?php echo $uhits; ?>)</td>
<td bgcolor="#EFEFEF"><img src="bar_line.gif" width="1" height="15"><img src="bar_line.gif" width="1" height="15"><img src="bar_line.gif" width="1" height="15"></td>
</tr>
</table>
<br>
<?php
}
$select1 = mysql_query("SELECT * FROM stats GROUP BY datum ORDER BY datum DESC LIMIT 0,".$conf['Limit']) or die (mysql_error());
while($get = mysql_fetch_object($select1)) {
$select = mysql_query("SELECT * FROM stats WHERE datum = '".$get->datum."'") or die (mysql_error());
$uhits = mysql_num_rows($select);
$hits = mysql_result(mysql_query("SELECT sum(hits) as total FROM stats WHERE datum = '".$get->datum."'"), 0, "total");
$total = $uhits + $hits;
$bar1 = $hits / $total * 100;
$bar2 = $uhits / $total * 100;
$date = explode("-", $get->datum);
?>
<table border="0" cellpadding="5" cellspacing="0" width="100%" style="border: 1px solid #DDDDDD;">
<tr>
<td colspan="2" style="border-bottom: 1px dashed #DDDDDD;" bgcolor="#EFEFEF"><b><?php echo $date[2]."-".$date[1]."-".$date[0]; ?></b></td>
</tr>
<tr>
<td width="140">Hits: (<?php echo $hits; ?>)</td>
<td><img src="bar_line.gif" width="1" height="15"><img src="bar_line.gif" width="1" height="15"><img src="bar_line.gif" width="1" height="15"></td>
</tr>
<tr>
<td width="140" bgcolor="#EFEFEF">Unieke hits: (<?php echo $uhits; ?>)</td>
<td bgcolor="#EFEFEF"><img src="bar_line.gif" width="1" height="15"><img src="bar_line.gif" width="1" height="15"><img src="bar_line.gif" width="1" height="15"></td>
</tr>
</table>
<br>
<?php
}
?>