<?php
require_once("config_sql.php");
if (ISSET($_GET['jouwnaam']))
{
	mysql_query("UPDATE members SET last_online = NOW() WHERE naam = '".$_GET['jouwnaam']."'");
	$warning = halen("SELECT warning FROM members WHERE naam = '".$_GET['jouwnaam']."'");
	$ban = halen("SELECT ban FROM members WHERE naam = '".$_GET['jouwnaam']."'");
	$perm_bans = mysql_num_rows(mysql_query("SELECT ip FROM perm WHERE ip='".$_SERVER['REMOTE_ADDR']."';"));
	if ($warning != "")
	{
		$warning = str_replace ("'", "", $warning);
		$warning = str_replace ('"', "", $warning);
		$warning = str_replace ('[br]', "<br>", $warning);
		echo "start_alert('".$warning."');";
	}
	if ($perm_bans != 0)
	{
		$ban = "yes";
	}
	if (($ban == "yes") || ($hotel_status == "offline"))
	{
		echo "exit_client();";
	}
	mysql_query("UPDATE members SET warning = '' WHERE naam = '".$_GET['jouwnaam']."'");
}
?>