<?php
ob_start();
include("config.php");

$dbres		=	mysql_query("SELECT * FROM `gebruiker` WHERE (UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(`online`) < 300)");
$online1	=	mysql_num_rows($dbres);

$dbres		=	mysql_query("SELECT * FROM `gebruiker`");
$totaal		=	mysql_num_rows($dbres);

$dbres		=	mysql_query("SELECT * FROM `gebruiker` WHERE `level`!='-2'");
$levend		=	mysql_num_rows($dbres);

$geldcash	=	0;
$dbres		=	mysql_query("SELECT * FROM `gebruiker`");
	while($user = mysql_fetch_object($dbres)){
	$geldcash	=	$user->cash+$geldcash;
	}

$geldbank	=	0;
$dbres		=	mysql_query("SELECT * FROM `gebruiker`");
	while($user = mysql_fetch_object($dbres)){
	$geldbank	=	$user->bank+$geldbank;
	}

$famgeld	=	0;
$dbres		=	mysql_query("SELECT * FROM `familie`");
	while($fam = mysql_fetch_object($dbres)){
	$famgeld	=	$fam->bank+$famgeld;
	}

$kogels		=	0;
$dbres		=	mysql_query("SELECT * FROM `gebruiker`");
	while($user = mysql_fetch_object($dbres)){
	$kogels		=	$user->kogels+$kogels;
	}

$dbres		=	mysql_query("SELECT * FROM `berichten`");
$berichten	=	mysql_num_rows($dbres);

?>

<html>
<head>
<title>Ultimatecrime - Statistieken</title>
<link rel="stylesheet" type="text/css" href="style_general.css">
</head>
<body background="layout/images/layout_12.gif" bgproperties="fixed">
<br>
<br>
<br>
<table align="center" width="600">
	<tr>
		<td class="subTitle" colspan="2"><b>Gebruikers online in de afgelopen 5 minuten</b></td>
	</tr>
	<tr>
		<td class=mainTxt colspan="2" align="center"><font color="#00FF00" size="4"><b><?php echo $online1; ?></b></font></td>
	</tr>
	<tr>
		<td colspan="2" align="center">&nbsp;</td>
	</tr>
</table>
<table align="center" width="600">
	<tr>
		<td class="subTitle" colspan="2"><b>Tellers</b></td>
	</tr>
	<tr onMouseOver="this.style.backgroundColor='#6F5E4A';" onMouseOut="this.style.backgroundColor='#4B3D32';" style="background-color: #4B3D32;">
		<td align="center" class="justborderS" width="400">Totaal aantal criminelen in Ultimatecrime</td><td align="center" class="justborderS" width="200"><?php echo geld($totaal); ?></td>
	</tr>
	<tr onMouseOver="this.style.backgroundColor='#6F5E4A';" onMouseOut="this.style.backgroundColor='#4B3D32';" style="background-color: #4B3D32;">
		<td align="center" class="justborderS" width="400">Aantal levende criminelen</td><td align="center" class="justborderS" width="200"><?php echo geld($levend); ?></td>
	</tr>
	<tr onMouseOver="this.style.backgroundColor='#6F5E4A';" onMouseOut="this.style.backgroundColor='#4B3D32';" style="background-color: #4B3D32;">
		<td align="center" class="justborderS" width="400">Totaal geld op zak Criminelen</td><td align="center" class="justborderS" width="200">€<?php echo geld($geldcash); ?></td>
	</tr>
	<tr onMouseOver="this.style.backgroundColor='#6F5E4A';" onMouseOut="this.style.backgroundColor='#4B3D32';" style="background-color: #4B3D32;">
		<td align="center" class="justborderS" width="400">Totaal geld op bank Criminelen</td><td align="center" class="justborderS" width="200">€<?php echo geld($geldbank); ?></td>
	</tr>
	<tr onMouseOver="this.style.backgroundColor='#6F5E4A';" onMouseOut="this.style.backgroundColor='#4B3D32';" style="background-color: #4B3D32;">
		<td align="center" class="justborderS" width="400">Totaal geld op Netwerken</td><td align="center" class="justborderS" width="200">€<?php echo geld($famgeld); ?></td>
	</tr>
	<tr onMouseOver="this.style.backgroundColor='#6F5E4A';" onMouseOut="this.style.backgroundColor='#4B3D32';" style="background-color: #4B3D32;">
		<td align="center" class="justborderS" width="400">Totaal ammo clips in Ultimatecrime</td><td align="center" class="justborderS" width="200"><?php echo geld($kogels); ?></td>
	</tr>
	<tr onMouseOver="this.style.backgroundColor='#6F5E4A';" onMouseOut="this.style.backgroundColor='#4B3D32';" style="background-color: #4B3D32;">
		<td align="center" class="justborderS" width="400">Aantal verzonden ingame Emails</td><td align="center" class="justborderS" width="200"><?php echo geld($berichten); ?></td>
	</tr>
</table>
</body>
</html>