include_once("files/db.php");
include_once("files/zagindex.php");
include_once("files/lib/lang_location.php");
$login = htmlspecialchars(stripslashes(addslashes($_POST['login'])));
$pass = htmlspecialchars(stripslashes(addslashes($_POST['pass'])));
$topas = htmlspecialchars(stripslashes(addslashes($_POST['topas'])));
$pol = htmlspecialchars(stripslashes(addslashes($_POST['pol'])));
$email = htmlspecialchars(stripslashes(addslashes($_POST['email'])));
$vopr = htmlspecialchars(stripslashes(addslashes($_POST['vopr'])));
if ((preg_match("/[^A-z0-9]/", $login)) or (strlen($login)<3) or (strlen($login)>10)){echo"
Ник может быть не более 10 и не менее3 символов латинского алфавита
"; exit;}
if(empty($login)){header ("Location: reg.php?errorloginpust"); exit;}
if(empty($pass)){header ("Location: reg.php?errorpaspust"); exit;}
if(eregi("[^A-zA-Za-z0-9-]",$login)){ header ("Location: reg.php?errorlogin"); exit;}
if(eregi("[^a-z0-9-]",$pass)){ header ("Location: reg.php?errorpass"); exit;}
if(empty($vopr)){header ("Location: reg.php?errorvopr"); exit;}
if($pass!==$topas){ header ("Location: reg.php?pass"); exit;}
if($kod!==$reff){ header ("Location: reg.php?kod"); exit;}
$brow=htmlspecialchars(stripslashes(getenv('HTTP_USER_AGENT')));
$ip=htmlspecialchars(stripslashes($_SERVER['REMOTE_ADDR']));
if(empty($login) || empty($pass) || empty($pol) || empty($email) || empty($vopr)) {echo'Данные необходимые для регистрации введены некорректно!
';
echo'Назад
';
include_once"files/down.php";
exit;}
if($rassa==gnom){
if($klas==wizard){
echo"Гномы не могут быть магами.
Вернуться к регистрации
";
echo'