				<div class="postui post-title">	
	<h2>COMUNICAT JUCATORILOR</h2>
</div>
<div class="postui post-con">
	<div class="con-wrap">		
		<center><b>Suntem conştienţi că acest metin nu este singurul server de pe internet, dar suntem recunoscători ca ne-aţi ales pe noi.<br>
		Vom face tot posibilul pentru a ne asigura că sunteţi mulţumit de alegerea făcută şi vom fi alături de dv. pe toata durata şederii alături de noi.</b></center>
	</div>                
</div>
<div class='postui post-end'></div>

<?php
if(!isset($_SESSION['user']) && !isset($_SESSION['pass'])) 
{
?>

<div class="postui post-title">	
	<h2>CREAZĂ CONT</h2>
</div>
<div class="postui post-con">
	<div class="con-wrap">	

<?php
if(isset($_POST['register']))
{
			$usern = replace($_POST['utilizator']);
			$pass = replace($_POST['parola']);
			$email = replace($_POST['email']);
			//$referal = $_POST['ref'];
			$idcard = replace($_POST['idcard']);
			$ques=$_POST["question"];
			$answ=$_POST["answer"];
			$ques2=$_POST["question2"];
			$answ2=$_POST["answer2"];
			$birthyear=$_POST["BirthYear"];
			$birthmonth=$_POST["BirthMonth"];
			$birthday=$_POST["BirthDay"];
			$addr=$_POST["Addr"];
			$postcode=$_POST["PostCode"];
			$mobile=$_POST["Mobile"];
			$telephone=$_POST["Telephone"];
			$ip = getenv("REMOTE_ADDR");
			$referal = replace($_POST['referal']);
			$create_time = date("Y-m-d H:i:s");
			if (md5($_POST['norobot']) == $_SESSION['randomnr2'])	
			{ 
				if((strlen($usern) >= 5) && (strlen($pass) >= 5)&&(strlen($email) >= 12)&&(strlen($idcard)==7))
				{
					$usr = mysql_query("Select * from account.account where login='$usern'");
					$ema = mysql_query("Select * from account.account where email='$email'");
					if((mysql_num_rows($usr)==1))
					{
						echo error("Cont sau email utilizate.Incercati altele sau click <a href='index.php?page=recuperare-pw'>aici</a> pentru recuperare parola.");
					}
					else
					{	
						if($_POST['read'] == "checked")
						{
							$rand = rand(99999,9999999999);
							$cod_activ = md5($rand);
							//$cod_activ= "1";
							mysql_query("Insert into account.account (Login,Password,Real_name,Social_id,Email,status,create_time,gold_expire,silver_expire,safebox_expire,autoloot_expire,fish_mind_expire,marriage_fast_expire,money_drop_rate_expire,coins,web_aktiviert)  
							values('$usern',password('$pass'),'$name','$idcard','$email','OK','$create_time','2022-12-31 12:00:00','2022-12-31 12:00:00','2022-12-31 12:00:00','2022-12-31 12:00:00','2022-12-31 12:00:00','2022-12-31 12:00:00','2022-12-31 12:00:00','0','$cod_activ')") or die(mysql_error());
						echo succes('Cont creat cu succes.Va puteti loga acum!');
						$to      = $email;
						$subject = 'Activare cont!';
						$message = "
						
		Salut ".$usern. "\r\n" ."
		Pentru a activa contul tau acceseaza linkul de mai jos ". "\r\n" ."
		http://metin2roa.ro/index.php?page=activare-cont&cont=".$usern."&cod=".$cod_activ."
						";
						$headers = 'Acest mesaj a fost generat automat.Va rugam nu raspundeti.';
						//new mail($to, $subject, $message, $headers);
							if($referal!=NULL)
							{
								$cx = mysql_query("Select * from account.account where login='$referal'");
								
								if(mysql_num_rows($cx)==0)
								{
									echo error("Referalul nu exista");	
								}
								else
								{
									mysql_query("Insert into web.referals (owner,referal,colected) values ('$referal','$usern','0')") or die(mysql_error());
								}
							}
						}
						else { echo error('Trebuie sa citesti regulamentul si sa fii de acord cu el.');}
						}}		
				else
				{
						echo error('Minim 5 caractere.');
				}
			}
			else
			{
				echo error('SPAM!Introduceti corect codul din imagine');	
			}
}
?>


<h4>INREGISTRARE</h4>

  Va rugam sa folositi un email valid.


<form name="sign_up_frm" method="post" action="" id="registerForm">
<table border="0" cellspacing="10" cellpadding="0" width="100%" style="margin-top: 10px;" align="center">
<tr>
<td colspan="3" align="left" class="table_head">Informatii generale :</td>
</tr>
<tr>
<td align="left" style="padding-left: 24px;" width="173"><label for="username"><b><a>Nume de utilizator: *</a></b></label></td>
<td width="470" align="left" class="fui txt"><input name="utilizator" type="text" class="fui txt" id="username1" onblur="return check_username();" maxlength="14" required="required"/><div id="info"></div></td>
<td width="293" align="left" ><span class="fui txt">
<div id="c_uss">6-14 caractere , litere/cifre</div></span></td>
</tr>
<tr>
<td align="left" style="padding-left: 24px;" width="173"><label for="password"><b><a>Parolă: * </a></b></label></td>
<td width="470" align="left" class="fui txt"><input name="parola" type="password" id="parola" maxlength="14" required="required"  class="fui txt"/>  <div id="info"></div></td>
<td width="293" align="left" ><span class="fui txt">
<div id="c_uss">6-14 caractere , litere/cifre</div></span></td>
</tr>
<tr>
<td align="left" style="padding-left: 24px;"><label for="code"><b><a>Cod stergere caractere: * </a></b></label></td>
<td align="left"><span class="fui txt">
  <input name="idcard" type="text" class="fui txt" id="username2" onblur="return check_username();" maxlength="7" required="required"/>
</span></td>
<td align="left"><span class="fui txt">
<div id="c_uss">7 cifre</div></span></td>
</tr>

</tr>
<tr>
<td colspan="3" align="left" class="table_head">Furnizati o adresa de email valida :</td>
</tr>
<tr>
<td align="left"  style="padding-left: 24px;"><label for="email"><b><a>Email Address: * </a></b></label></td>
<td align="left" class="fui txt"><input name="email" type="text" id="email1" maxlength="35" required="required" onblur="return check_email();" class="fui txt"/></td>
<td align="left"><span class="fui txt">
<div id="c_mss">ex: somebody@gmail.com</div></span></td>
</tr><?php if(isset($_GET['referal']) && $_GET['referal']!=NULL)
	{
		$ref = replace($_GET['referal']);
		?>
<tr>
<td colspan="3" align="left" class="table_head">Invitat :</td>
</tr>
<tr>
<td align="left" style="padding-left: 24px;" width="173">Nume referal</td>
<td align="left" class="fui txt"><input name="referal" type="text" id="referal" disabled="disabled" value="<?=$ref?>" class="fui txt"/></td>
<td align="left" ><span class="fui txt">
<div id="c_uss">numele celui care te-a invitat</div></span></td>
</tr>
<?php } ?>

<tr>
<td colspan="3" align="left" class="table_head">Anti-spam :</td>
</tr>
<tr>
<td align="left"><label for="verificare"><b><a>Introdu codul din imagine: * </a></b></label></td>
<td>
  <input type="text"  name="norobot" maxlength="4" title="" value=""  required="required" id="norobot" class="fui txt"/></td>
  <td><img src="inc/spam.php" alt="captcha"/></td>
</tr>
  <tr>
    <td colspan="3" align="center">
   Am citit regulamentul * <input type="checkbox" name="read"  value="checked" style="margin-top:-20px; margin-left:48px;"  /></a>
    
    </td>
  </tr>
    <tr>
    <td colspan="3" align="center"><input type="submit" id="register" name="register" value="&Icirc;nregistrare" class="fui btn log" /></td>
  </tr>
</table></form>

	</div>                
</div>
<div class='postui post-end'></div>	

<?php } else {echo error("<div class='postui post-title'>	
	<h2>CREAZĂ CONT</h2>
</div>
<div class='postui post-con'>
	<div class='con-wrap'>	

Esti deja logat.


	</div>                
</div>
<div class='postui post-end'></div>	");}?>


