<?php
ob_start();
include("config.php");
	if(! check_login()) { 
	exit;
	}
?>

<html>
<head>
<title>ultimatecrime</title>
<link rel="stylesheet" type="text/css" href="style_general.css">
</head>
<body background="layout/images/layout_12.gif" bgproperties="fixed">
<br>
<br>
<br>
<base target="content">
<table width="600" border="0" align="center" cellpadding="0">
	<tr>
		<td colspan="2" class="subtitle">
		<p>Bezoek onderstaande locaties in <?php echo $data->land; ?></p>
		</td>
	</tr>
	<tr>
		<td colspan="2" class="maintxt">
		<table width="560" border="0" align="center" cellpadding="0" cellspacing="0">
			<tr>
				<td width="290" valign="middle">
				<table width="285" border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td width="25"><div align="center"><img src="layout/images/icons/light_world.jpg" width="16" height="16"></div></td>
						<td valign="middle"><a href="speler-reis.php" target="content"><strong>Vliegveld</strong></a></td>
						<td valign="middle">&nbsp;</td>
					</tr>
					<tr>
						<td>&nbsp;</td>
						<td colspan="2" valign="middle" class="forum_subtitle">Reis door de wereld van ultimatecrime!</td>
					</tr>
				</table>
				</td>
				<td width="290">
				<table width="285" border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td width="25"><div align="center"><img src="layout/images/icons/light_world.jpg" width="16" height="16"></div></td>
						<td valign="middle"><a href="netwerken-detective.php" target="content"><strong>Detective bureau</strong></a></td>
						<td valign="middle">&nbsp;</td>
					</tr>
					<tr>
						<td>&nbsp;</td>
						<td colspan="2" valign="middle"><span class="forum_subtitle">Iemand vermoorden? Zoek diegene hier! </span></td>
					</tr>
				</table>
				</td>
			</tr>
			<tr>
				<td valign="middle">
				<table width="285" border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td>&nbsp;</td>
						<td colspan="2" valign="middle">&nbsp;</td>
					</tr>
					<tr>
						<td width="25"><div align="center"><img src="layout/images/icons/light_world.jpg" width="16" height="16"></div></td>
						<td valign="middle"><a href="netwerken-gevangenis.php" target="content"><strong>Gevangenis</strong></a></td>
						<td valign="middle">&nbsp;</td>
					</tr>
					<tr>
						<td>&nbsp;</td>
						<td colspan="2" valign="middle"><span class="forum_subtitle">Help je collega's ontsnappen!</span></td>
					</tr>
					<tr>
						<td>&nbsp;</td>
						<td colspan="2" valign="middle">&nbsp;</td>
					</tr>
				</table>
				</td>
				<td>
				<table width="285" border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td>&nbsp;</td>
						<td colspan="2" valign="middle">&nbsp;</td>
					</tr>
					<tr>
						<td width="25"><div align="center"><img src="layout/images/icons/light_world.jpg" width="16" height="16"></div></td>
						<td valign="middle"><a href="netwerken-hitlist.php" target="content"><strong>Hitlist &amp; Bountyhunter bureau </strong></a></td>
						<td valign="middle">&nbsp;</td>
					</tr>
					<tr>
						<td>&nbsp;</td>
						<td colspan="2" valign="middle">Plaats iemand of ga zelf op jacht! </td>
					</tr>
					<tr>
						<td>&nbsp;</td>
						<td colspan="2" valign="middle">&nbsp;</td>
					</tr>
				</table>
				</td>
			</tr>
			<tr>
				<td width="290" valign="middle">
				<table width="285" border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td width="25"><div align="center"><img src="layout/images/icons/light_world.jpg" width="16" height="16"></div></td>
						<td valign="middle"><a href="netwerken-ziekenhuis.php" target="content"><strong>Ziekenhuis</strong></a></td>
						<td valign="middle">&nbsp;</td>
					</tr>
					<tr>
						<td>&nbsp;</td>
						<td colspan="2" valign="middle"><span class="forum_subtitle">Laat je opereren als je gewond bent !</span></td>
					</tr>
				</table>
				</td>
				<td width="290">
				</td>
			</tr>
		</table>
		</td>
	</tr>

<?php

$dbres		=	mysql_query("SELECT * FROM `gebruiker` WHERE `land`='{$data->land}'");
$totaalmensen	=	mysql_num_rows($dbres);

$dbres		=	mysql_query("SELECT * FROM `gebruiker` WHERE `land`='{$data->land}' AND `sex`='Man'");
$mannen		=	mysql_num_rows($dbres);

$dbres		=	mysql_query("SELECT * FROM `gebruiker` WHERE `land`='{$data->land}' AND `sex`='Vrouw'");
$vrouwen	=	mysql_num_rows($dbres);

$dbres		=	mysql_query("SELECT * FROM `gebruiker` WHERE `land`='{$data->land}'");
$totaalgelda	=	0;

	while($geld = mysql_fetch_object($dbres)){
	$totaalgelda	=	$geld->cash+$totaalgelda;
	$totaalgelda	=	$geld->bank+$totaalgelda;
	}

$totaalgeld	=	geld($totaalgelda);
$dbres		=	mysql_query("SELECT * FROM `gebruiker` WHERE `land`='{$data->land}' ORDER BY `cash`+`bank` DESC LIMIT 1");
$login		=	mysql_fetch_object($dbres);
$rijkste	=	$login->login;
$perstukgeld	=	geld($totaalgelda/$totaalmensen);

	if($data->land == "Mexico"){
	$landkaart	=	"country_s_me.jpg";
	} else if($data->land == "Nederland"){
	$landkaart	=	"country_s_nl.jpg";
	} else if($data->land == "Duitsland"){
	$landkaart	=	"country_s_du.jpg";
	} else if($data->land == "Frankrijk"){
	$landkaart	=	"country_s_fr.jpg";
	} else if($data->land == "Italië"){
	$landkaart	=	"country_s_it.jpg";
	} else if($data->land == "Irak"){
	$landkaart	=	"country_s_ir.jpg";
	} else if($data->land == "Colombia"){
	$landkaart	=	"country_s_co.jpg";
	} else if($data->land == "Cuba"){
	$landkaart	=	"country_s_cu.jpg";
	} else if($data->land == "Japan"){
	$landkaart	=	"country_s_ja.jpg";
	} else if($data->land == "Turkije"){
	$landkaart	=	"country_s_tu.jpg";
	} else if($data->land == "USA"){
	$landkaart	=	"country_s_us.jpg";
	} else if($data->land == "Zuid-Afrika"){
	$landkaart	=	"country_s_za.jpg";
	}

$dbres		=	mysql_query("SELECT * FROM `familie` WHERE `land`='$data->land' ORDER BY `oppervlakte` LIMIT 1");
	if($familie = mysql_fetch_object($dbres)){
	$familie	=	$familie->naam;
	} else {
	$familie	=	"onbekent";
	}

?>

	<tr>
		<td colspan="2" class="subtitle">&nbsp;</td>
	</tr>
	<tr>
		<td width="200"><img src="maps/images/<?php echo $landkaart; ?>" alt="<?php echo $data->land; ?>" width="200" height="200" border="0"></td>
		<td width="400" align="center" valign="middle" class="maintxt">
		<table width="370" height="100%" border="0" cellpadding="0" cellspacing="0">
			<tr>
				<td width="25" valign="top"><img src="layout/images/icons/light_user.jpg" width="16" height="16"></td>
				<td>In <?php echo $data->land; ?> bevinden zich momenteel <?php echo $totaalmensen; ?> criminelen, waarvan <?php echo $mannen; ?> mannen en <?php echo $vrouwen; ?> vrouwen.</td>
			</tr>
			<tr>
				<td colspan="2">&nbsp;</td>
			</tr>
			<tr>
				<td width="25" valign="top"><img src="layout/images/icons/light_money.jpg" width="16" height="16"></td>
				<td> Een totaal saldo van &euro;<?php echo $totaalgeld; ?>  is in <?php echo $data->land; ?> goed voor een saldo van &euro;<?php echo $perstukgeld; ?> per inwoner. <a href="speler-profiel.php?x=<?php echo $rijkste; ?>" target="content"><?php echo $rijkste; ?></a> is het rijkst.</td>
			</tr>
			<tr>
				<td colspan="2" valign="top">&nbsp;</td>
			</tr>
			<tr>
				<td valign="top"><img src="layout/images/icons/light_map.jpg" width="16" height="16"></td>
				<td>Het grootste netwerk in <?php echo $data->land; ?> is <?php echo $familie; ?>.</td>
			</tr>
		</table>
		</td>
	</tr>
	<tr>
		<td colspan="2" class="subtitle">&nbsp;</td>
	</tr>
</table>
</body>
</html>
