<!-- center column -->
<div id="register" class="col-2">

	<div class="content content-last">

		<div class="content-bg">

			<div class="content-bg-bottom">

				<h2><?PHP echo $serverSettings['titel']; ?> - Contul t&#259;u</h2>

				<div class="inner-form-border">

					<div class="inner-form-box">

	<h3><a id="toLogin" href="index.php?s=profil" title="Datele utilizatorului">Datele utilizatorului</a>Deblocare caractere</h3>

 <div class="trenner"></div><br/>
<?php
session_start ();
	include('dbsettings.php');
	$dbname = "account";
		mysql_connect($dbhost, $dbuser, $dbpw) OR
		die("Eroare de conectare la baza de date: ".mysql_error());	
		mysql_select_db($dbname) OR
		die("Eroare de conectare la baza de date: ".mysql_error());
	if(isset($_POST['submit']) && $_POST['submit']) {
		$map = $_POST['map'];
if($map == "1") {
$x = "488774";
$y = "955480";
}
elseif($map == "21") {
$x = "64305";
$y = "186753";
}
elseif($map == "41") {
$x = "963684";
$y = "285235";
}

		$username = $_SESSION['id'];
		$password = mysql_real_escape_string($_POST['password']);

		if($username != "" and $password != "" and $map != "")
		{
		$sql1 = "SELECT id FROM account WHERE login = '$username' AND password =  PASSWORD('".$password."')";
		$result1 = mysql_query($sql1);
 		$data = mysql_fetch_array ($result1); 
   		$accid = $data["id"]; 
		mysql_close();
		$dbname = "player";
		mysql_connect($dbhost, $dbuser, $dbpw) OR
		die("Eroare de conectare la baza de date: ".mysql_error());	
		mysql_select_db($dbname) OR
		die("Eroare de conectare la baza de date: ".mysql_error());
		$sql = "UPDATE player Set map_index = '$map', x = '$x', y = '$y' WHERE account_id = '$accid'";
		$result = mysql_query($sql);
		
		if($result) { echo "<center><h1>Ai fost deblocat , toate characterele sunt &#238;n prima hart&#259;.<br/>V&#259; rug&#259;m s&#259; a&#351;tepta&#355;i 5,10,15 minute, deblocarea nu se face instant!<br/>Dac&#259; deblocarea nu a mers v&#259; rug&#259;m s&#259; &#238;ncerca&#355;i din nou!</h1></center><br/><div class=\"trenner\"></div><br/>"; } else { echo 'NOT'; }
		} else {
		echo "<center>Parola introdus&#259; este gre&#351;it&#259;.</center><br/><div class=\"trenner\"></div><br/>";
		}
	}
?>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>