<?php
$notel = "durfniethe";
require_once('../config.php');
$nu = date("d F Y G:i:s");
mysql_query("DELETE FROM sessies WHERE datum <= ".(strtotime($nu)-50).";");
mysql_query("UPDATE sessies SET datum=".strtotime($nu)." WHERE random=".$_GET['sessie'].";");
//echo date('Y n d G:i:s', strtotime($nu))."\n";
//echo strtotime($nu)."\n";
echo "Jouw id: ".$_GET['sessie'];
echo "\n\n";
echo "Aanwezig:\n";
$res = mysql_query("SELECT * FROM sessies WHERE datum >= ".(strtotime($nu)-10).";");
if (mysql_num_rows($res) >= 1)
{
	while ($row = mysql_fetch_array($res))
	{
		echo $row['random']." | ".$row['jouwnaam']."\n";
	}
}
?>