<?php
ob_start();
include("config.php");

?>

<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>
<form action="algemeen-login.php" method="post" name="login">
<table align="center" width="600">
	<tr>
		<td colspan="2" class="subTitle">
		<strong>ultimatecrime</strong>
		</td>
	</tr>
	<tr>
		<td colspan="2" class="mainTxt">
		<div align="center"><img src="layout/images/home_logo.jpg" alt="Welkom op ultimatecrime!" width="560" height="82"></div>
		</td>
	</tr>
	<tr>
		<td colspan="2" class="subTitle">&nbsp;</td>
	</tr>
	<tr>
		<td class="mainTxt" colspan="2">

<?php

	if($_GET['x'] == "logout"){

	unset($_SESSION['login']);
	echo "<span class=\"tekstheader\">Je bent succesvol uitgelogd!</span><br />Adios!<br /><br /><a href=\"http://www.ultimatecrime.nl\" target=\"_top\">Klik hier om in te loggen!</a>";

	} else if(isset($_POST['login'],$_POST['pass'])){
	$login	=	strip_tags($_POST['login']);
	$login	=	strtolower($login);
	$pass	=	strip_tags($_POST['pass']);
	$dbres	=	mysql_query("SELECT * FROM `gebruiker` WHERE `login`='$login' AND `pass`=MD5('$pass')");

		if($data = mysql_fetch_object($dbres)){
		$_SESSION['login']     = $data->login;

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

			unset($_SESSION['login']);
			echo "<span class=\"header_rood\">Je account is gebanned.</span><br />";

			} else if(($data) && $data->level == -2){

			unset($_SESSION['login']);
			echo "<span class=\"header_rood\">Je account is dood.</span><br />";

			} else if(($data) && $data->level == 0){

			unset($_SESSION['login']);
			echo "<span class=\"header_rood\">Je account is nog niet actief.</span><br />";

			} else {

			echo "<span class=\"tekstheader\">Welkom {$data->login}! Je bent succesvol ingelogd!</span><br /><a href=\"http://www.ultimatecrime.nl\" target=\"_top\">Klik hier om te beginnen...</a>";

			}

		} else {

		echo "<span class=\"header_rood\">Verkeerde gebruikersnaam & wachtwoord combinatie!</span><br />";

		}

	}

?>

		</td>
	</tr>
	<tr>
		<td colspan="2" class="subtitle">&nbsp;</td>
	</tr>
</table>
</form>
</body>
</html>











