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

$dbres		=	mysql_query("SELECT * FROM `gebruiker` WHERE `level`!='-2' AND `level`!='-1' AND `level`!='0' ORDER BY `gekilled` DESC LIMIT 1");
$moorden	=	mysql_fetch_object($dbres);

$dbres		=	mysql_query("SELECT * FROM `gebruiker` WHERE `level`!='-2' AND `level`!='-1' AND `level`!='0' ORDER BY `cash`+`bank` DESC LIMIT 1");
$geld		=	mysql_fetch_object($dbres);

$dbres		=	mysql_query("SELECT * FROM `gebruiker` WHERE `level`!='-2' AND `level`!='-1' AND `level`!='0' ORDER BY `kogels` DESC LIMIT 1");
$kogels		=	mysql_fetch_object($dbres);

$dbres		=	mysql_query("SELECT * FROM `gebruiker` WHERE `level`!='-2' AND `level`!='-1' AND `level`!='0' ORDER BY `heist` DESC LIMIT 1");
$heist		=	mysql_fetch_object($dbres);

$dbres		=	mysql_query("SELECT * FROM `gebruiker` WHERE `level`!='-2' AND `level`!='-1' AND `level`!='0' ORDER BY `gmisdaad` DESC LIMIT 1");
$orgcrime	=	mysql_fetch_object($dbres);

$dbres		=	mysql_query("SELECT * FROM `gebruiker` WHERE `level`!='-2' AND `level`!='-1' AND `level`!='0' ORDER BY `misdaden` DESC LIMIT 1");
$misdaden	=	mysql_fetch_object($dbres);

$dbres		=	mysql_query("SELECT * FROM `gebruiker` WHERE `level`!='-2' AND `level`!='-1' AND `level`!='0' ORDER BY `autostelen` DESC LIMIT 1");
$autos		=	mysql_fetch_object($dbres);

$dbres		=	mysql_query("SELECT * FROM `gebruiker` WHERE `level`!='-2' AND `level`!='-1' AND `level`!='0' ORDER BY `uitbraken` DESC LIMIT 1");
$uitbraken	=	mysql_fetch_object($dbres);

?>

<html>
<head>
<title>Ultimatecrime - Intranet - Criminelen statistieken</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="description" content="Wie is de beste in wat? Wie is nieuw of dood? Ontdek het hier!">
<meta name="keywords" content="world, gangster, criminal, mafia, games, game, multiplayer, rpg, mmorpg, online game, online multiplayer">
<meta name="Robots" CONTENT="follow">
<meta name="REVISIT-AFTER" CONTENT="7 days">
<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>TOP Criminelen van Ultimatecrime</b>
		</td>
	</tr>
	<tr>
		<td>
		<table width=100%>
			<tr>
				<td class="subTitle" align="center" width="60%"><b>Vakgebied</b></td>
				<td class="subTitle" align="center" width="40%"><b>Crimineel</b></td>
			</tr>
			<tr onMouseOver="this.style.backgroundColor='#6F5E4A';" onMouseOut="this.style.backgroundColor='#4B3D32';" style="background-color: #4B3D32;">
				<td align="center" class="justborderS" width="60%">Meeste moorden</td>
				<td align="center" class="justborderS" width="40%"><a href="speler-profiel.php?x=<?php echo $moorden->login; ?>"><?php echo $moorden->login; ?></a></td>
			</tr>
			<tr onMouseOver="this.style.backgroundColor='#6F5E4A';" onMouseOut="this.style.backgroundColor='#4B3D32';" style="background-color: #4B3D32;">
				<td align="center" class="justborderS" width="60%">Meeste geld ( cash + bank )</td>
				<td align="center" class="justborderS" width="40%"><a href="speler-profiel.php?x=<?php echo $geld->login; ?>"><?php echo $geld->login; ?></a></td>
			</tr>
			<tr onMouseOver="this.style.backgroundColor='#6F5E4A';" onMouseOut="this.style.backgroundColor='#4B3D32';" style="background-color: #4B3D32;">
				<td align="center" class="justborderS" width="60%">Meeste ammo clips</td>
				<td align="center" class="justborderS" width="40%"><a href="speler-profiel.php?x=<?php echo $kogels->login; ?>"><?php echo $kogels->login; ?></a></td>
			</tr>
			<tr onMouseOver="this.style.backgroundColor='#6F5E4A';" onMouseOut="this.style.backgroundColor='#4B3D32';" style="background-color: #4B3D32;">
				<td align="center" class="justborderS" width="60%">Meeste route 66 overvallen</td>
				<td align="center" class="justborderS" width="40%"><a href="speler-profiel.php?x=<?php echo $heist->login; ?>"><?php echo $heist->login; ?></a></td>
			</tr>
			<tr onMouseOver="this.style.backgroundColor='#6F5E4A';" onMouseOut="this.style.backgroundColor='#4B3D32';" style="background-color: #4B3D32;">
				<td align="center" class="justborderS" width="60%">Meeste georganiseerde overvallen</td>
				<td align="center" class="justborderS" width="40%"><a href="speler-profiel.php?x=<?php echo $orgcrime->login; ?>"><?php echo $orgcrime->login; ?></a></td>
			</tr>
			<tr onMouseOver="this.style.backgroundColor='#6F5E4A';" onMouseOut="this.style.backgroundColor='#4B3D32';" style="background-color: #4B3D32;">
				<td align="center" class="justborderS" width="60%">Meeste steels</td>
				<td align="center" class="justborderS" width="40%"><a href="speler-profiel.php?x=<?php echo $misdaden->login; ?>"><?php echo $misdaden->login; ?></a></td>
			</tr>
			<tr onMouseOver="this.style.backgroundColor='#6F5E4A';" onMouseOut="this.style.backgroundColor='#4B3D32';" style="background-color: #4B3D32;">
				<td align="center" class="justborderS" width="60%">Meeste auto jat pogingen</td>
				<td align="center" class="justborderS" width="40%"><a href="speler-profiel.php?x=<?php echo $autos->login; ?>"><?php echo $autos->login; ?></a></td>
			</tr>
			<tr onMouseOver="this.style.backgroundColor='#6F5E4A';" onMouseOut="this.style.backgroundColor='#4B3D32';" style="background-color: #4B3D32;">
				<td align="center" class="justborderS" width="60%">Meeste personen uit gevangenis gebroken</td>
				<td align="center" class="justborderS" width="40%"><a href="speler-profiel.php?x=<?php echo $uitbraken->login; ?>"><?php echo $uitbraken->login; ?></a></td>
			</tr>
		</table>
		</td>	
	</tr>
</table>
<br>
<table align="center" width="600">
	<tr>
		<td class="subTitle" colspan="2">
		<b>TOP 10 beste netwerken in Ultimatecrime</b>
		</td>
	</tr>
	<tr>
		<td>
		<table width=100%>
			<tr>
				<td class="subTitle" style="letter-spacing: normal;" align="center" width="20%">
				<b>Naam</b>
				</td>
				<td class="subTitle" style="letter-spacing: normal;" align="center" width="40%">
				<b>Leader</b>
				</td>
				<td class="subTitle" style="letter-spacing: normal;" align="center" width="40%">
				<b>Grond</b>
				</td>
			</tr>

<?php

$dbres = mysql_query("SELECT * FROM `familie` ORDER BY `oppervlakte` DESC LIMIT 10");
	while($select = mysql_fetch_object($dbres)){
?>

			<tr onMouseOver="this.style.backgroundColor='#6F5E4A';" onMouseOut="this.style.backgroundColor='#4B3D32';" style="background-color: #4B3D32;">
				<td align="center" class="justborderS" width="40%"><a href="famprofiel.php?x=<?php echo $select->naam; ?>"><?php echo $select->naam; ?></a></td>
				<td align="center" class="justborderS" width="20%"><a href="speler-profiel.php?x=<?php echo $select->leader; ?>"><?php echo $select->leader; ?></a></td>
				<td align="center" class="justborderS" width="40%"><?php echo $select->oppervlakte; ?> mē</td>
			</tr>

<?php

	}

?>

		</table>
		</td>
	</tr>
</table>
<br>
<table align="center" width="600">
	<tr>
		<td class="subTitle" colspan="2">
		<b>TOP 10 beste criminelen in Ultimatecrime</b>
		</td>
	</tr>
	<tr>
		<td>
		<table width=100%>
			<tr>
				<td class="subTitle" style="letter-spacing: normal;" align="center" width="50%">
				<b>Crimineel</b>
				</td>
				<td class="subTitle" style="letter-spacing: normal;" align="center" width="50%">
				<b>Punten</b>
				</td>
			</tr>

<?php

$dbres		=	mysql_query("SELECT * FROM `gebruiker` WHERE `level`!='-2' AND `level`!='-1' AND `level`!='0' ORDER BY `uitbraken`+`misdaden`+`autostelen`+`heist`+`gmisdaad`+`gekilled`+`respect` DESC LIMIT 10");
	while($user = mysql_fetch_object($dbres)){
	$punten		=	$user->uitbraken+$user->misdaden+$user->autostelen+$user->heist+$user->gmisdaad+$user->gekilled+$user->respect;

?>

			<tr onMouseOver="this.style.backgroundColor='#6F5E4A';" onMouseOut="this.style.backgroundColor='#4B3D32';" style="background-color: #4B3D32;">
				<td align="center" class="justborderS" width="50%"><a href="speler-profiel.php?x=<?php echo $user->login; ?>"><?php echo $user->login; ?></a></td>
				<td align="center" class="justborderS" width="50%"><?php echo $punten; ?></td>
			</tr>

<?php

	}

?>

		</table>
		</td>
	</tr>
</table>
<br>
<table align="center" width="600">
	<tr>
		<td class="subTitle" colspan="2">
		<b>10 meest gerespecteerde criminelen</b>
		</td>
	</tr>
	<tr>
		<td>
		<table width=100%>
			<tr>
				<td class="subTitle" style="letter-spacing: normal;" align="center" width="50%">
				<b>Crimineel</b>
				</td>
				<td class="subTitle" style="letter-spacing: normal;" align="center" width="50%">
				<b>Respect Credits</b>
				</td>
			</tr>

<?php

$dbres		=	mysql_query("SELECT * FROM `gebruiker` WHERE `level`!='-2' AND `level`!='-1' AND `level`!='0' AND `respect`>'0' ORDER BY `respect` DESC LIMIT 10");
	while($user = mysql_fetch_object($dbres)){
?>

			<tr onMouseOver="this.style.backgroundColor='#6F5E4A';" onMouseOut="this.style.backgroundColor='#4B3D32';" style="background-color: #4B3D32;">
				<td align="center" class="justborderS" width="50%"><a href="speler-profiel.php?x=<?php echo $user->login; ?>"><?php echo $user->login; ?></a></td>
				<td align="center" class="justborderS" width="50%"><?php echo $user->respect; ?></td>
			</tr>

<?php

	}

?>

		</table>
		</td>
	</tr>
</table>
<br>
<table align="center" width="600">
	<tr>
		<td class="subTitle" colspan="2">
		<b>10 minst gerespecteerde criminelen</b>
		</td>
	</tr>
	<tr>
		<td>
		<table width=100%>
			<tr>
				<td class="subTitle" style="letter-spacing: normal;" align="center" width="50%">
				<b>Crimineel</b>
				</td>
				<td class="subTitle" style="letter-spacing: normal;" align="center" width="50%">
				<b>Respect Credits</b>
				</td>
			</tr>

<?php

$dbres		=	mysql_query("SELECT * FROM `gebruiker` WHERE `level`!='-2' AND `level`!='-1' AND `level`!='0' AND `respect`<'0' ORDER BY `respect` LIMIT 10");
	while($user = mysql_fetch_object($dbres)){
?>

			<tr onMouseOver="this.style.backgroundColor='#6F5E4A';" onMouseOut="this.style.backgroundColor='#4B3D32';" style="background-color: #4B3D32;">
				<td align="center" class="justborderS" width="50%"><a href="speler-profiel.php?x=<?php echo $user->login; ?>"><?php echo $user->login; ?></a></td>
				<td align="center" class="justborderS" width="50%"><?php echo $user->respect; ?></td>
			</tr>

<?php

	}

?>

		</table>
		</td>
	</tr>
</table>
<br>
<table align="center" width="600">
	<tr>
		<td class="subTitle" colspan="2">
		<b>10 nieuwste criminelen</b>
		</td>
	</tr>
	<tr>
		<td>
		<table width=100%>
			<tr>
				<td class="subTitle" style="letter-spacing: normal;" align="center" width="50%">
				<b>Crimineel</b>
				</td>
				<td class="subTitle" style="letter-spacing: normal;" align="center" width="50%">
				<b>Startdatum</b>
				</td>
			</tr>

<?php

$dbres		=	mysql_query("SELECT * FROM `gebruiker` WHERE `level`!='-2' AND `level`!='-1' AND `level`!='0' ORDER BY `signup` DESC LIMIT 10");
	while($user = mysql_fetch_object($dbres)){
?>

			<tr onMouseOver="this.style.backgroundColor='#6F5E4A';" onMouseOut="this.style.backgroundColor='#4B3D32';" style="background-color: #4B3D32;">
				<td align="center" class="justborderS" width="50%"><a href="speler-profiel.php?x=<?php echo $user->login; ?>"><?php echo $user->login; ?></a></td>
				<td align="center" class="justborderS" width="50%"><?php echo $user->signup; ?></td>
			</tr>

<?php

	}

?>

		</table>
		</td>
	</tr>
</table>
<br>
<table align="center" width="600">
	<tr>
		<td class="subTitle" colspan="2">
		<b>10 laatst gekillde criminelen</b>
		</td>
	</tr>
	<tr>
		<td>
		<table width=100%>
			<tr>
				<td class="subTitle" style="letter-spacing: normal;" align="center" width="50%"><b>Crimineel</b></td>
				<td class="subTitle" style="letter-spacing: normal;" align="center" width="50%"><b>Datum</b></td>
			</tr>

<?php

$dbres		=	mysql_query("SELECT * FROM `gebruiker` WHERE `level`='-2' ORDER BY `online` DESC LIMIT 10");
	while($user = mysql_fetch_object($dbres)){
?>

			<tr onMouseOver="this.style.backgroundColor='#6F5E4A';" onMouseOut="this.style.backgroundColor='#4B3D32';" style="background-color: #4B3D32;">
				<td align="center" class="justborderS" width="50%"><a href="speler-profiel.php?x=<?php echo $user->login; ?>"><?php echo $user->login; ?></a></td>
				<td align="center" class="justborderS" width="50%"><?php echo $user->online; ?></td>
			</tr>

<?php

	}

?>

		</table>
		</td>
	</tr>
</table>
<br>
</body>
</html>