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

?>

<html>
<head>
<title>ultimatecrime - Aanmelden!</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="description" content="Meld je hier aan en speel gratis mee met duizenden andere fanatieke criminelen!">
<meta name="keywords" content="world, gangster, criminal, mafia, games, game, multiplayer, rpg, mmorpg, online game, online multiplayer">
<meta name="Robots" CONTENT="follow">
<meta name="REVISIT-AFTER" CONTENT="7 days">
<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-activate.php" method="post" name="signup">
<table width="600" border="0" align="center">
	<tr>
		<td colspan="2" class="subtitle">&nbsp;</td>
	</tr>
	<tr>
		<td width="170" class="maintxtS" style="padding: 0;"><div align="center"><img src="layout/images/logo_signup.jpg" width="146" height="62" /></div></td>
		<td width="430" valign="top" class="maintxt"><p><span class="tekstheader">Account activeren na aanmelding </span><br />Je hebt na aanmelding een email ontvangen met daarin een activatiecode. Op deze manier valideren wij je emailadres.</p></td>
	</tr>

<?php
	if(isset($_POST['submit'])){
	$dbres	=	mysql_query("SELECT * FROM `gebruiker` WHERE `level`='0' AND `activatiecode`='{$_POST['activatiecode']}'");
		if($user = mysql_fetch_object($dbres)){
		mysql_query("UPDATE `gebruiker` SET `level`='2',`dagen`='3',`memberdays`=NOW(),`activatiecode`='' WHERE `login`='{$user->login}'");
		mysql_query("INSERT INTO `berichten`(`tijd`,`ip`,`van`,`naar`,`titel`,`bericht`) VALUES(NOW(),'{$_SERVER['REMOTE_ADDR']}','ultimatecrime','{$def->owner}','ultimatecrime','Welkom op ultimatecrime\n De ultimatecrime crew wenst je een prettig verblijf aan op ultimatecrime.nl en natuurlijk veel speelplezier.\n\n Omdat je je net hebt aangemeld heb je voor 3 dagen een proef abbonoment op het VIP account.\n\nGreatz goodman')");

?>

	<tr>
		<td colspan="2" class="maintxt">
		<table width="550" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td width="25" valign="top"><img src="layout/images/icons/light_vink.jpg"></td><td><?php echo $user->login; ?> is succesvol geactiveerd!</td>
			</tr>
		</table>
		</td>
	</tr>

<?php


		} else {

?>

	<tr>
		<td colspan="2" class="maintxt">
		<table width="550" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td width="25" valign="top"><img src="layout/images/icons/light_uitroepteken.jpg"></td><td>Ongeldige activatie code!</td>
			</tr>
		</table>
		</td>
	</tr>

<?php

		}
	}

?>

	<tr>
		<td colspan="2" class="subtitle">&nbsp;</td>
	</tr>
	<tr>
		<td colspan="2" class="maintxt">
		<table width="560" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td width="30"><img src="layout/images/icons/light_lock.jpg" width="16" height="16"></td>
				<td width="530" class="tekstheader">Vul de activatie code in die je hebt ontvangen per email </td>
			</tr>
			<tr>
				<td width="30">&nbsp;</td>
				<td width="530"><br /><input name="activatiecode" type="text" style="width: 100;" value="" maxlength="10" /></td>
			</tr>
		</table>
		</td>
	</tr>
	<tr>
		<td colspan="2" class="maintxt">
		<table width="560" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td width="30" valign="middle"><img src="layout/images/icons/light_vink.jpg" width="16" height="16" /></td>
				<td width="530" valign="middle"><input name="submit" type="submit" id="submit" value="&nbsp;&nbsp;&nbsp; Account activeren! &nbsp;&nbsp;&nbsp;" /></td>
			</tr>
		</table>
		</td>
	</tr>
	<tr>
		<td colspan="2" class="subtitle">&nbsp;</td>
	</tr>
</table>
</form>
</body>
</html>
