<?php
ob_start();
include("config.php");
	if(! check_login()){
	header("Location: login.php");
	exit;
	}

?>

<html>
<head>
<title>Ultimatecrime - Email systeem</title>
<meta name="description" content="Ultimatecrime - Nieuwe email versturen naar je collega criminelen!">
<meta name="keywords" content="world, gangster, crimineel, email, sturen, post, mail">
<meta name="Robots" CONTENT="follow">
<meta name="REVISIT-AFTER" CONTENT="1 days">
<link rel="stylesheet" type="text/css" href="style_general.css">
<script language="javascript">

var checked = 0;
	function checkAll() {
	checked = !checked;
	for(i=0; i<document.form2.elements.length; i++)
	document.form2.elements[i].checked = checked;
	}

</script>
</head>
<body background="layout/images/layout_12.gif" bgproperties="fixed">
<br>
<br>
<br>

<?php

	if($_GET['p'] == "new"){
	$link1	=	"<font color=\"#00FF00\">=> </font>";
	} else if($_GET['p'] == "outbox"){
	$link3	=	"<font color=\"#00FF00\">=> </font>";
	} else {
	$link0	=	"<font color=\"#00FF00\">=> </font>";
	}

	if($data->level == 1){
	$max1	=	10;
	} else if($data->level == 2){
	$max1	=	25;
	} else if($data->level == 3){
	$max1	=	100;
	}

	if($data->level == 1){
	$max2		=	0;
	$aantal2	=	0;
	} else if($data->level == 2){
	$dbres		=	mysql_query("SELECT `id` FROM `berichten` WHERE `van`='{$data->login}' AND `delete2`='0' ORDER BY `id` LIMIT 10");
	$aantal2	=	mysql_num_rows($dbres);
	$max2		=	10;
	} else if($data->level == 3){
	$dbres		=	mysql_query("SELECT `id` FROM `berichten` WHERE `van`='{$data->login}' AND `delete2`='0' ORDER BY `id` LIMIT 50");
	$aantal2	=	mysql_num_rows($dbres);
	$max2		=	50;
	}

$dbres		=	mysql_query("SELECT `id` FROM `berichten` WHERE `naar`='{$data->login}' AND `delete1`='0'");
$aantal1	=	mysql_num_rows($dbres);

?>


<table align="center" width="600">
	<tr>
		<td class="subtitle" colspan="2">
		<b>Ultimatecrime - Nieuwe Email</b>
		</td>
	</tr>
	<tr>
		<td class="maintxts" width="50%" align="center">
		<a href="internet-email.php"><b><?php echo $link0; ?><font color="red">Inbox</font> <font color="red">( <?php echo $aantal1; ?> / <?php echo $max1; ?> )</font></b></a>
		</td>
		<td class="maintxts" width="50%" align="center">
		<a href="internet-email.php?p=new"><?php echo $link1; ?><b><font color="red">Email - Versturen</font></b></a>
		</td>
	</tr>
	<tr>
		<td class="maintxts" width="50%" align="center" colspan="2">
		<a href="internet-email.php?p=outbox"><?php echo $link3; ?><b><font color="red">Verzonden items</font> <font color="red">( <?php echo $aantal2; ?> / <?php echo $max2; ?> )</font></b></a>
		</td>
	</tr>
</table>

<?php

	if($_GET['p'] == "new"){

		if(isset($_POST['SEND'])){
		$_POST['to']	=	$_POST['to'];

			if(strlen($_POST['subject']) < 3){
			echo "<br><table align=\"center\" width=\"600\"><tr><td class=\"subTitle\" colspan=\"3\"><b>Email - Nieuwe email verzenden</b></td></tr><tr><td class=\"mainTxt\" colspan=\"3\"><table><tr><td width=\"20\" valign=\"top\"><img src=\"layout/images/icons/light_comment.jpg\" height=\"16\" width=\"16\" alt=\"Opmerking\" /></td><td>Niet spammen! Voer in ieder geval een titel van 3 tekens in.<meta http-equiv=\"refresh\" content=\"3\"></td></tr></td></tr></table></td></tr><tr><td class=\"subtitle\" colspan=\"3\">&nbsp;</td></tr></table>";
			} else if($_POST['to'] == "Ultimatecrime"){
			echo "<br><table align=\"center\" width=\"600\"><tr><td class=\"subTitle\" colspan=\"3\"><b>Email - Nieuwe email verzenden</b></td></tr><tr><td class=\"mainTxt\" colspan=\"3\"><table><tr><td width=\"20\" valign=\"top\"><img src=\"layout/images/icons/light_comment.jpg\" height=\"16\" width=\"16\" alt=\"Opmerking\" /></td><td>De grote raad van Ultimatecrime wil liever geen e-mails ontvangen.<meta http-equiv=\"refresh\" content=\"3\"></td></tr></td></tr></table></td></tr><tr><td class=\"subtitle\" colspan=\"3\">&nbsp;</td></tr></table>";
			} else if($_POST['to'] == $data->login){
			echo "<br><table align=\"center\" width=\"600\"><tr><td class=\"subTitle\" colspan=\"3\"><b>Email - Nieuwe email verzenden</b></td></tr><tr><td class=\"mainTxt\" colspan=\"3\"><table><tr><td width=\"20\" valign=\"top\"><img src=\"layout/images/icons/light_comment.jpg\" height=\"16\" width=\"16\" alt=\"Opmerking\" /></td><td>Je kan geen bericht naar jezelf sturen.<meta http-equiv=\"refresh\" content=\"3\"></td></tr></td></tr></table></td></tr><tr><td class=\"subtitle\" colspan=\"3\">&nbsp;</td></tr></table>";
			} else if(strlen($_POST['message']) < 3){
			echo "<br><table align=\"center\" width=\"600\"><tr><td class=\"subTitle\" colspan=\"3\"><b>Email - Nieuwe email verzenden</b></td></tr><tr><td class=\"mainTxt\" colspan=\"3\"><table><tr><td width=\"20\" valign=\"top\"><img src=\"layout/images/icons/light_comment.jpg\" height=\"16\" width=\"16\" alt=\"Opmerking\" /></td><td>Niet spammen! Voer een geldig bericht van minimaal 3 teken in.<meta http-equiv=\"refresh\" content=\"3\"></td></tr></td></tr></table></td></tr><tr><td class=\"subtitle\" colspan=\"3\">&nbsp;</td></tr></table>";
			} else {

			$dbres	=	mysql_query("SELECT `login`,`level` FROM `gebruiker` WHERE `login`='{$_POST['to']}' AND `level`!='-2' AND `level`!='-1' AND `level`!='0'");

				if($user = mysql_fetch_object($dbres)){
				$dbres	=	mysql_query("SELECT `id` FROM `berichten` WHERE `naar`='{$user->login}' AND `delete1`='0'");
				$rijen	=	mysql_num_rows($dbres);

					if(($user->level == 1 && $rijen == 10) || ($user->level == 2 && $rijen == 25)){
					echo "<br><table align=\"center\" width=\"600\"><tr><td class=\"subTitle\" colspan=\"3\"><b>Email - Nieuwe email verzenden</b></td></tr><tr><td class=\"mainTxt\" colspan=\"3\"><table><tr><td width=\"20\" valign=\"top\"><img src=\"layout/images/icons/light_comment.jpg\" height=\"16\" width=\"16\" alt=\"Opmerking\" /></td><td>$to kan op het moment niet meer e-mails ontvangen zijn inbox is vol.</td></tr></td></tr></table></td></tr><tr><td class=\"subtitle\" colspan=\"3\">&nbsp;</td></tr></table>";
					} else {
					mysql_query("INSERT INTO `berichten`(`tijd`,`ip`,`van`,`naar`,`titel`,`bericht`) values(NOW(),'{$_SERVER['REMOTE_ADDR']}','{$data->login}','{$user->login}','{$_POST['subject']}','{$_POST['message']}')");
					echo "<br><table align=\"center\" width=\"600\"><tr><td class=\"subTitle\" colspan=\"3\"><b>Email - Nieuwe email verzenden</b></td></tr><tr><td class=\"mainTxt\" colspan=\"3\"><table><tr><td width=\"20\" valign=\"top\"><img src=\"layout/images/icons/light_comment.jpg\" height=\"16\" width=\"16\" alt=\"Opmerking\" /></td><td>Bericht verzonden.</td></tr></td></tr></table></td></tr><tr><td class=\"subtitle\" colspan=\"3\">&nbsp;</td></tr></table>";
					}

				} else {
				echo "<br><table align=\"center\" width=\"600\"><tr><td class=\"subTitle\" colspan=\"3\"><b>Email - Nieuwe email verzenden</b></td></tr><tr><td class=\"mainTxt\" colspan=\"3\"><table><tr><td width=\"20\" valign=\"top\"><img src=\"layout/images/icons/light_comment.jpg\" height=\"16\" width=\"16\" alt=\"Opmerking\" /></td><td>Gebruiker: '$to' bestaat niet is verbannen of is dood.</td></tr></td></tr></table></td></tr><tr><td class=\"subtitle\" colspan=\"3\">&nbsp;</td></tr></table>";
				}

			}

		} else {

?>

<form name="form1" method="POST" action="internet-email.php?p=new" onsubmit="return submitForm(this.SEND);">
<table align="center" width="600">
	<tr>
		<td class="subtitle" colspan="2">
		<b>Email - Nieuwe email verzenden</b>
		</td>
	</tr>
	<tr>
		<td class="maintxts" width="50%">Naar</td>
		<td class="maintxts" width="50%"><input type="text" name="to" value="<?php echo $_GET['to']; ?>" maxlength=16 size="40"></td>
	</tr>
	<tr>
		<td class="maintxts" width="50%">Onderwerp</td>
		<td class="maintxts" width="50%"><input type="text" name="subject" value="<?php echo $_GET['subject']; ?>" maxlength=25 size="40"></td>
	</tr>
	<tr>
		<td class="maintxt" colspan="2" align="center">
		<table width="360">
			<tr>
				<td align="center">
				<a href="javascript://" onClick="document.form1.message.value += ':grin:'"><img src=images/smiles/icon_biggrin.gif border=0></a>
				<a href="javascript://" onClick="document.form1.message.value += ':S'"><img src=images/smiles/icon_confused.gif border=0></a>
				<a href="javascript://" onClick="document.form1.message.value += '8)'"><img src=images/smiles/icon_cool.gif border=0></a>
				<a href="javascript://" onClick="document.form1.message.value += ':.('"><img src=images/smiles/icon_cry.gif border=0></a>
				<a href="javascript://" onClick="document.form1.message.value += ':eek:'"><img src=images/smiles/icon_eek.gif border=0></a>
				<a href="javascript://" onClick="document.form1.message.value += ':evil:'"><img src=images/smiles/icon_evil.gif border=0></a>
				<a href="javascript://" onClick="document.form1.message.value += ':lol:'"><img src=images/smiles/icon_lol.gif border=0></a>
				<a href="javascript://" onClick="document.form1.message.value += ':@'"><img src=images/smiles/icon_mad.gif border=0></a>
				<a href="javascript://" onClick="document.form1.message.value += ':D'"><img src=images/smiles/icon_mrgreen.gif border=0></a>
				<a href="javascript://" onClick="document.form1.message.value += ':|'"><img src=images/smiles/icon_neutral.gif border=0></a>
				<a href="javascript://" onClick="document.form1.message.value += ':P'"><img src=images/smiles/icon_razz.gif border=0></a>
				<a href="javascript://" onClick="document.form1.message.value += ':$'"><img src=images/smiles/icon_redface.gif border=0></a>
				<a href="javascript://" onClick="document.form1.message.value += ':roll:'"><img src=images/smiles/icon_rolleyes.gif border=0></a>
				<a href="javascript://" onClick="document.form1.message.value += ':('"><img src=images/smiles/icon_sad.gif border=0></a>
				<a href="javascript://" onClick="document.form1.message.value += ':)'"><img src=images/smiles/icon_smile.gif border=0></a>
				<a href="javascript://" onClick="document.form1.message.value += ':o'"><img src=images/smiles/icon_surprised.gif border=0></a>
				<a href="javascript://" onClick="document.form1.message.value += ':twisted:'"><img src=images/smiles/icon_twisted.gif border=0></a>
				<a href="javascript://" onClick="document.form1.message.value += ';)'"><img src=images/smiles/icon_wink.gif border=0></a>
				<a href="javascript://" onClick="document.form1.message.value += ':{'"><img src=images/smiles/icon_dracula.gif border=0></a>
				<a href="javascript://" onClick="document.form1.message.value += ':sick:'"><img src=images/smiles/icon_sick.gif border=0></a>
				<a href="javascript://" onClick="document.form1.message.value += ':uhm:'"><img src=images/smiles/icon_uhm.gif border=0></a>
				<a href="javascript://" onClick="document.form1.message.value += ':clap:'"><img src=images/smiles/icon_clap.gif border=0></a>
				<a href="javascript://" onClick="document.form1.message.value += ':dance:'"><img src=images/smiles/icon_dance.gif border=0></a>
				<a href="javascript://" onClick="document.form1.message.value += ':stop:'"><img src=images/smiles/icon_stop.gif border=0></a>
				<a href="javascript://" onClick="document.form1.message.value += ':doh:'"><img src=images/smiles/icon_doh.gif border=0></a>
				<a href="javascript://" onClick="document.form1.message.value += ':nono:'"><img src=images/smiles/icon_nono.gif border=0></a>
				<a href="javascript://" onClick="document.form1.message.value += ':think:'"><img src=images/smiles/icon_think.gif border=0></a>
				<a href="javascript://" onClick="document.form1.message.value += ':ssht:'"><img src=images/smiles/icon_ssht.gif border=0></a>
				<a href="javascript://" onClick="document.form1.message.value += ':nope:'"><img src=images/smiles/icon_nope.gif border=0></a>
				<a href="javascript://" onClick="document.form1.message.value += ':salut:'"><img src=images/smiles/icon_salut.gif border=0></a>
				<a href="javascript://" onClick="document.form1.message.value += ':wall:'"><img src=images/smiles/icon_wall.gif border=0></a>
				</td>
			</tr>
		</table>
		</td>
	</tr>
	<tr>
		<td class="maintxt" align="center" colspan="2"><textarea name="message" cols=65 rows=10></textarea></td>
	</tr>
	<tr>
		<td class="maintxt" width="100%" colspan="2" align="center"><input type="submit" name="SEND" value="Email verzenden!" style="width: 200;"></td>
	</tr>
</table>

<?php


		}

	} else if($_GET['p'] == "outbox"){

		if(isset($_POST['verwijder']) && $_POST['id'] != ""){
		$_POST['to']	=	$_POST['to'];
			foreach($_POST['id'] as $msgid){
			$dbres	=	mysql_query("SELECT `id` FROM `berichten` WHERE `id`='$msgid'");

				if($message = mysql_fetch_object($dbres)){
				mysql_query("UPDATE `berichten` SET `delete2`='1' WHERE `id`='$msgid'");
				}
			}

		echo "<br><table align=\"center\" width=\"600\"><tr><td class=\"subTitle\" colspan=\"3\"><b>Jouw postvak uit - Alle emails</b></td></tr><tr><td class=\"mainTxt\" colspan=\"3\"><table><tr><td width=\"20\" valign=\"top\"><img src=\"layout/images/icons/light_comment.jpg\" height=\"16\" width=\"16\" alt=\"Opmerking\" /></td><td>Geselecteerde berichten verwijdert.</td></tr></td></tr></table></td></tr><tr><td class=\"subtitle\" colspan=\"3\">&nbsp;</td></tr></table>";

		} else {

			if($data->level == 1){

?>

<br />
<table align="center" width="600">  
	<tr>
		<td class="subtitle" colspan="2">
		<b>Verzonden items - Jij hebt geen toegang tot je verzonden items!</b>
		</td>
	</tr>
	<tr>
		<td class="maintxt" width="100%" colspan="2">
		<span class="tekstheader">Wat is verzonden items?</span><br>Bij 'verzonden items' kan je je laatste 10+ verzonden emails bekijken...<br /><br />
		<span class="tekstheader">Hoe krijg ik toegang tot verzonden items?</span><br>Alle VIP Criminelen hebben toegang tot verzonden items...
		</td>
	</tr>
</table>

<?php

	} else {

?>

<form name="form2" method="post" action="internet-email.php?p=outbox" onsubmit="return submitForm(this.VERWIJDER);">
<table align="center" width="600">
	<tr>
		<td class="subtitle" colspan="4">
		<b>Jouw postvak uit - Alle emails</b>
		</td>
	</tr>
	<tr>
		<td class="subtitle" align="center"><input type="checkbox" class="form_checkbox" onClick="checkAll()"></td>
		<td class="subtitle" width="240"><b><div align="left">&nbsp;Onderwerp</div></b></td>
		<td class="subtitle" align="center" width="150"><b>Ontvanger</b></td>
		<td class="subtitle" align="center" width="200"><b>Datum</b></td>
	</tr>

<?php

			$dbres	=	mysql_query("SELECT `id`,`read`,`tijd`,`naar`,`titel` FROM `berichten` WHERE `van`='{$data->login}' AND `delete2`='0' ORDER BY `id` DESC");

				while($bericht = mysql_fetch_object($dbres)){

?>

	<tr>
		<td width="10" class="maintxts"><input type="checkbox" class="form_checkbox" name="id[]" value="<?php echo $bericht->id; ?>"></td>
		<td class="maintxts" width="240"><a href="internet-email.php?p=read&id=<?php echo $bericht->id; ?>"><?php if($bericht->read == 0){ echo "<b>"; } ?><?php echo $bericht->titel; ?></a></td>
		<td class="maintxts" align="center" width="150"><a href="speler-profiel.php?x=<?php echo $bericht->naar; ?>"><?php echo $bericht->naar; ?></a></td>
		<td class="maintxts" align="center" width="200"><?php echo $bericht->tijd; ?></td>
	</tr>

<?php

				}

?>

	<tr>
		<td colspan="4" class="subtitle">&nbsp;</td>
	</tr>		
	<tr>
		<td align="left" width="100" colspan="4"><br><input type="submit" name="verwijder" value="Verwijder" style="width: 100; background: #4B3D32;"></td>
	</tr>
</table>

<?php
			}
		}
	} else if($_GET['p'] == "read"){

		if(isset($_POST['Verwijder'])){
		$_POST['id']	=	$_POST['id'];
		$dbres		=	mysql_query("SELECT `naar`,`titel` FROM `berichten` WHERE `id`='{$_POST['id']}' AND (`van`='{$data->login}' OR `naar`='{$data->login}')");
			if($message = mysql_fetch_object($dbres)){
				if($message->naar == $data->login){
				mysql_query("UPDATE `berichten` SET `delete1`='1' WHERE `id`='{$_POST['id']}'");
				} else {
				mysql_query("UPDATE `berichten` SET `delete2`='1' WHERE `id`='{$_POST['id']}'");
				}
			}
		echo "<br><table align=\"center\" width=\"600\"><tr><td class=\"subTitle\" colspan=\"3\"><b>Email - {$message->titel}</b></td></tr><tr><td class=\"mainTxt\" colspan=\"3\"><table><tr><td width=\"20\" valign=\"top\"><img src=\"layout/images/icons/light_comment.jpg\" height=\"16\" width=\"16\" alt=\"Opmerking\" /></td><td>Het bericht is succesvol verwijdert.</td></tr></td></tr></table></td></tr><tr><td class=\"subtitle\" colspan=\"3\">&nbsp;</td></tr></table>";
		} else {
		$_GET['id']	=	$_GET['id'];
		$dbres	=	mysql_query("SELECT * FROM `berichten` WHERE `id`='{$_GET['id']}' AND (`van`='{$data->login}' OR `naar`='{$data->login}' OR '3'='{$data->level}')");
			if($message = mysql_fetch_object($dbres)){

				if($message->naar == $data->login){
				mysql_query("UPDATE `berichten` SET `read`='1' WHERE `id`='{$_GET['id']}'");
				}

				if($message->read == 1){
				$read	=	"Ja";
				} else {
				$read	=	"Nee";
				}

?>

<br>
<table align="center" width="600">
	<tr>
		<td class="subtitle" colspan="2" width="600">
		<b>Email - <?php echo $message->titel; ?></b>
		</td>
	</tr>
	<tr>
		<td class="maintxts" width="300">Van</td>
		<td class="maintxts" width="300"><a href="speler-profiel.php?x=<?php echo $message->van; ?>"><?php echo $message->van; ?></a></td>
	</tr>
	<tr>
		<td class="maintxts" width="300">Naar</td>
		<td class="maintxts" width="300"><a href="speler-profiel.php?x=<?php echo $message->naar; ?>"><?php echo $message->naar; ?></a></td>
	</tr>

<?php 

				if($message->van == $data->login){ 

?>

	<tr>
		<td class="maintxts" width="300">Gelezen</td>
		<td class="maintxts" width="300"><?php echo $read; ?></td>
	</tr>

<?php 

				} 

?>

	<tr>
		<td class="maintxts" width="300">Onderwerp</td>
		<td class="maintxts" width="300"><?php echo $message->titel; ?></td>
	</tr>
	<tr>
		<td class="maintxts" width="300">Datum</td>
		<td class="maintxts" width="300"><?php echo $message->tijd; ?></td>
	</tr>
	<tr>
		<td class="maintxt" colspan="2" width="600"><?php echo ubb($message->bericht); ?><br></td>
	</tr>
	<tr>
		<td align="left" colspan="2">
		<table>
			<tr>

<?php 

				if($message->van != $data->login){

?>

				<td align="left">
				<form action="internet-email.php?p=new" onsubmit="return submitForm(this.Antwoord);">
				<input type="hidden" name="p" value="new">
				<input type="hidden" name="to" value="<?php echo $message->van; ?>">
				<input type="hidden" name="subject" value="<?php $message->titel = str_replace("Re:","", $message->titel); ?>Re: <?php echo $message->titel; ?>">
				<input type="submit" name="Antwoord" value="Antwoord" style="width: 100; background: #4B3D32;">
				</form>
				</td> 

<?php 

				} 

?>

				<td align="left" width="100">
				<form action="internet-email.php?p=read" method="post" onsubmit="return submitForm(this.Verwijder);">
				<input type="hidden" name="id" value="<?php echo $_GET['id']; ?>">
				<input type="submit" name="Verwijder" value="Verwijder" style="width: 100; background: #4B3D32;">
				</form>
				</td>
			</tr>
		</table>
		</td>
	</tr>
</table>

<?php

			}
		}
	} else {

		if(isset($_POST['verwijder']) && $_POST['id'] != ""){
		$_POST['id']	=	$_POST['id'];
			foreach($_POST['id'] as $msgid){
			$dbres	=	mysql_query("SELECT `id` FROM `berichten` WHERE `id`='$msgid'");

				if($message = mysql_fetch_object($dbres)){
				mysql_query("UPDATE `berichten` SET `delete1`='1' WHERE `id`='$msgid'");
				}
			}

		echo "<br><table align=\"center\" width=\"600\"><tr><td class=\"subTitle\" colspan=\"3\"><b>Jouw postvak in - Alle emails</b></td></tr><tr><td class=\"mainTxt\" colspan=\"3\"><table><tr><td width=\"20\" valign=\"top\"><img src=\"layout/images/icons/light_comment.jpg\" height=\"16\" width=\"16\" alt=\"Opmerking\" /></td><td>Geselecteerde berichten verwijdert.</td></tr></td></tr></table></td></tr><tr><td class=\"subtitle\" colspan=\"3\">&nbsp;</td></tr></table>";

		} else {

?>

<form name="form2" method="post" action="internet-email.php?p=del" onsubmit="return submitForm(this.VERWIJDER);">
<table align="center" width="600">
	<tr>
		<td class="subtitle" colspan="4">
		<b>Jouw postvak in - Alle emails</b>
		</td>
	</tr>
	<tr>
		<td class="subtitle" align="center"><input type="checkbox" class="form_checkbox" onClick="checkAll()"></td>
		<td class="subtitle" width="240"><b><div align="left">&nbsp;Onderwerp</div></b></td>
		<td class="subtitle" align="center" width="150"><b>Afzender</b></td>
		<td class="subtitle" align="center" width="200"><b>Datum</b></td>
	</tr>

<?php

		$dbres	=	mysql_query("SELECT `id`,`tijd`,`read`,`van`,`titel` FROM `berichten` WHERE `naar`='{$data->login}' AND `delete1`='0' ORDER BY `id` DESC");

			while($bericht = mysql_fetch_object($dbres)){

?>

	<tr>
		<td width="10" class="maintxts"><input type="checkbox" class="form_checkbox" name="id[]" value="<?php echo $bericht->id; ?>"></td>
		<td class="maintxts" width="240"><a href="internet-email.php?p=read&id=<?php echo $bericht->id; ?>"><?php if($bericht->read == 0){ echo "<b>"; } ?><?php echo $bericht->titel; ?></a></td>
		<td class="maintxts" align="center" width="150"><a href="speler-profiel.php?x=<?php echo $bericht->van; ?>"><?php echo $bericht->van; ?></a></td>
		<td class="maintxts" align="center" width="200"><?php echo $bericht->tijd; ?></td>
	</tr>

<?php

			}

?>

	<tr>
		<td colspan="4" class="subtitle">&nbsp;</td>
	</tr>		
	<tr>
		<td align="left" width="100" colspan="4"><br><input type="submit" name="verwijder" value="Verwijder" style="width: 100; background: #4B3D32;"></td>
	</tr>
</table>

<?php

		}

	}

?>

</form>
</body>
</html>