<?php
if (!isset($_SESSION))
{
	session_start();
}
require_once ('header.php');
if ($aangemeld == "ja")
{
	if ($member_status == "manager")
	{
		echo "<h1>Volledige Consolegeschiedenis</h1>";
		$sql = mysql_query("SELECT * FROM berichten ORDER BY id;");
		if(mysql_num_rows($sql) >= 1)
		{
			echo "<tt>";
			while($row = mysql_fetch_array($sql))
    		{
		    	echo "van <b>".$row['van']."</b> voor <b>".$row['voor']."</b><br>";
	    		echo "op ".$row['datum']."<br>";
		    	echo "id: ".$row['id']."<br>";
	    		echo "gelezen: ".$row['read']."<br><br>";
	    		echo $row['bericht']."<hr>";
	   		}
    		echo "</tt>";
		}
		action("bekijkt de volledige consolegeschiedenis");
	}
}
else
{
	echo "Oeps! Hiervoor moet je aangemeld zijn!";
}
require_once('footer.php');
?>