
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru">
<head><meta http-equiv='content-type' content='application/xhtml+xml; charset=windows-1251'/>
<link rel="shortcut icon" href="../ico1.ico" type="image/x-icon" />
<title>Регистрация</title>
<link rel="stylesheet" href="../styleN.css" type="text/css" />
</head>
<div class='main' style='word-wrap:break-word;'>
<div class="center"><div class='top'>
<b><font color="white">«Регистрация»</font></b>
</div></div>
<div class="line"></div>
<div style="padding:5px">
<b>
<?

//айпи игрока
$ip=$_SERVER['REMOTE_ADDR'];
$reg = $_GET['reg'];
$login = $_POST['login'];
$pass = $_POST['pass'];
$age = $_POST['age'];
$sex = $_POST['sex'];
$rasa = $_POST['rasa'];
$class = $_POST['class'];
$mail = $_POST['mail'];
$ses = $_POST['ses'];
$kod = $_POST['kod'];
$podtv = $_POST['podtv'];
$secret = $_POST['secret'];
$sex = str_replace("муж.", "1", $sex);
$sex = str_replace("жен.", "2", $sex);
$t = time();
$tY=date("Y");
$tM=date("m");	
$tD=date("d");
$tH=date("H");
$tI=date("i");
$tS=date("s");
$email_pass = rand(0000000000, 9999999999);
$session = mt_rand(10000000, 99999999);
include ("../db.php");

$db->openDB();
   //тут обрезаем опасные символы
   if (!$login AND isset($login)) {
        echo "<center><div class = \"main_title\" ><img src=\"../img/bad.png\" width=\"16\" height=\"16\"> <font color=\"red\">заполните все поля!</font><br/><a href=\"reg.php\">на главную</a></div></center>";die;
    }
    if($podtv=="" AND isset($podtv) AND !isset($class)){echo"<center><div class = \"main_title\" ><img src=\"../img/bad.png\" width=\"16\" height=\"16\"> <font color=\"red\">вы не подтвердили согласия с правилами игры!</font><br/><a href=\"reg.php\">на главную</a></div></center>";
	die;
	}
	$query = mysql_query("SET NAMES cp1251");
    $query = mysql_query("SELECT * FROM users WHERE NICK='$login'");
    @$row = mysql_fetch_assoc($query);
	   if(substr($login,0,4)=="n_c_"){echo"недопустимое имя игрока!<br/><a href=\"reg.php\">на главную</a>";die;}
    if (isset($row['NICK'])) {
        echo $login."<center><div class = \"main_title\" ><img src=\"../img/bad.png\" width=\"16\" height=\"16\"> <font color=\"red\">Такой пользователь уже зарегестрирован!</font><br/><a href=\"reg.php\">на главную</a></div></center>";
    die;}
	?>
<?
$ipBN=$_SERVER['REMOTE_ADDR'];

$ww=mysql_query("SELECT * FROM  BAN_IP WHERE IP_BAN=\"$ipBN\"");
while($ww2=mysql_fetch_assoc($ww)){
$rows = explode('|', $ww2[IP_BAN]); 
foreach($rows as $row) 
{ 
$fields = explode('.', $row); 
$a1=$fields[0];
$a2=$fields[1];

}

}

$rows = explode('|', $ipBN); 
foreach($rows as $row) 
{ 
$fields = explode('.', $row); 
$b1=$fields[0];
$b2=$fields[1];
}


if($a1==$b1 AND $a2==$b2){echo"<b><div class=\"heads\">«БАН!»</div></b>";echo'<center><img src="../banned.png"><br/><div class="foot">причина:нарушение правил игры</div></center>';die;}

?>
<?

if (!$reg) {
$p=array("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","v","w","x","y","z");
$r=rand(0,34);
$r1=rand(0,24);
$r2=rand(0,34);
$r3=rand(0,34);
$r4=rand(0,34);
$r5=rand(0,34);
$r6=rand(0,34);
$r7=rand(0,34);
$r8=rand(0,34);
$r9=rand(0,34);
$r10=rand(0,34);
$r11=rand(0,34);
$r12=rand(0,34);
$r13=rand(0,34);
$r14=rand(0,34);
$r15=rand(0,34);
$r16=rand(0,34);
$r17=rand(0,34);
$r18=rand(0,34);
$r19=rand(0,34);
?>
<?    
    echo "<form action=\"reg.php?reg=2\" method=\"post\">";
?>

<div class = "up" >
</div>
<div class="body">


<div style="padding-bottom:10px">
<br/>логин<br/>
<font color="red">(25 симв. a-Z_0-9)</font><br/>
<input name="login" size="15" maxlength="25" class="text long" placeholder="Пример:Tester">
</div>





пароль<br/>
<font color="red">(25 симв. a-Z_0-9)</font><br/>
<?
echo"<div style=\"padding-bottom:10px\"><input name=\"pass\" size=\"15\" maxlength=\"25\" class=\"text long\" placeholder=\"Пример:Tester2025\"/> 
</div>";
?>
<div style="padding-bottom:10px">
возраст
<br/>
<select name="age">
<?
for($age = 1;$age < 141; $age++){
echo "<option value=\"$age\">$age</option>";
}
?>



</select>
</div>
<div style="padding-bottom:10px">
Пол<br/>
<select name="sex">
<option value="1">муж.</option>
<option value="2">жен.</option>
</select>
</div>
<a href="../rasa/">Раса:[?]</a>
<br/>



<select name="rasa">

<option value="1">Эльфийды</option>
<option value="2">Имперцы</option>
<option value="3">Инсенты</option>
<option value="4">Нежить</option>
</select>


<br/>
<div style="padding-top:10px">проверочный код:
<b>
<small>
<?
    $ses = rand(10000, 99999);
    echo ''.$ses.'';
?>
</small>
</b>
</div>
<font color="red">(5 цифр. 0-9)</font>
<br/>
<input name="kod" maxlength="5" size="5" class="text long">
<div style="padding-top:10px">
<font color="red">(30 симв. a-Z_0-9)</font>
<br/>
введите секретное слово:<font>

</div>
<input name="secret" maxlength="30" size="15" class="text long">
<br/>
<font color="red"> 
<div style="padding-top:10px;padding-bottom:10px">
нажимая согласен вы автоматически соглашаетесь с <a href="../prav">правилами игры</a>

<input type="checkbox" name="podtv" value="1" >
</div>
<?
    echo "<input name='ses' value='$ses' maxlength='10' type='hidden'>";
?>

</div>
</div><div class='line'></div><div class='main_foot'><div class=center><div class=grey><div class=small><div class=foot>

<center><input type="submit" value="зарегистрироваться " class="button"></center>
<br>
<div class="menu">
<li><a href="../menu.php"><img src="../img/al.png" width="16" height="16"> на главную</a></li>
</div>
</form>
</body>
</html>
<?
   
}
?>
<?
//подключаем файл обработки регистрации

if ($reg == 2) {
  
    //убираем пробелы с начала и конца в логине и пароле
    $login = trim($login);
    $pass = trim($pass);
    $mail = trim($mail);
    $kod = trim($kod);
    $secret = trim($secret);
    $login=strtolower($login);
    $pass=strtolower($pass);
    $mail=strtolower($mail);
    $secret=strtolower($secret);
    $login=addslashes($login);
    $pass=addslashes($pass);
    $mail=addslashes($mail);
    $kod=addslashes($kod);
    $secret=addslashes($secret);
    //если логин или пароль больше 25 символов обрезаем остальное
    $login = substr($login, 0, 25);
    $pass = substr($pass, 0, 25);
    //если секрет больше 30 символов остальное обрезаем
    $secret = substr($secret, 0, 30);
    //проверочный код не больше 10 символов
    $kod = substr($kod, 0, 5);
 
    
    
   
    if (strlen($login) < 5) {
        echo "<div class = \"up\" >
</div>
<div class=\"body\"><a href=\"../reg/\">назад</a><br>Логин слишком короткий</div><div class = \"foot\">";
        die;
    }
    if (!preg_match('|^[0-9]+$|i', $kod) and !isset($class)) {
        echo "<div class = \"up\" >
</div>
<div class=\"body\"><a href=\"../reg/\">назад</a><br>Код может состоять только из цифр!</div><div class = \"foot\">";
        die;
    }

    if ($ses != $kod and !isset($class)) {
        echo "<div class = \"up\" >
</div>
<div class=\"body\"><a href=\"../reg/\">назад</a><br>Проверочный код не совпадает с введеным!<br/><font color=\"blue\">вы ввели $kod<br/><font color=\"red\">код был:$ses</div><div class = \"foot\">";
        die;
    }
 if (strlen($secret) < 5 and !isset($class)) {
        echo "<div class = \"up\" >
</div>
<div class=\"body\"><a href=\"../reg/\">назад</a><br>секрет слишком короткий.<a href=\"reg.php\"><br/>&lsaquo;&lsaquo;</a></div><div class = \"foot\">";
        die;
     }
if (!preg_match('|^[0-9a-z_]+$|i', $secret) and !isset($class)) {
        echo "<div class = \"up\" >
</div>
<div class=\"body\"><a href=\"../reg/\">назад</a><br>недопустимые символы в секрете<a href=\"reg.php\"><br/>&lsaquo;&lsaquo;</a></div><div class = \"foot\">";
        die;
    }
    
    if (strlen($pass) < 5) {
        echo "<div class = \"up\" >
</div>
<div class=\"body\"><a href=\"../reg/\">назад</a><br>Пароль слишком короткий</div><div class = \"foot\">";
        die;
    }
	//Нужно сделать проверку на определенные символы,все кроме этих символов будут удаляться
	if (!preg_match('|^[0-9a-z_]+$|i', $login)){
        echo "<div class = \"up\" >
</div>
<div class=\"body\"><a href=\"../reg/\">назад</a><br>недопустимые символы в логине<a href=\"reg.php\"><font color=\"green\">&lsaquo;&lsaquo;</a></div><div class = \"foot\">";
        die;
    }
	
    if (!preg_match('|^[0-9a-z_]+$|i', $pass)) {
        echo "<div class = \"up\" >
</div>
<div class=\"body\"><a href=\"../reg/\">назад</a><br>недопустимые символы в пароле<a href=\"$PHP_SELF?reg=1\"><font color=\"green\">&lsaquo;&lsaquo;</a></div><div class = \"foot\">";
        die;
    }
    if (!preg_match('|^[0-9a-z]+$|i', $age)) {
        echo "<div class = \"up\" >
</div>
<div class=\"body\"><a href=\"../reg/\">назад</a><br>недопустимые символы в возрасте<a href=\"$PHP_SELF?reg=1\"><font color=\"green\"><br/>&lsaquo;&lsaquo;</a></div><div class = \"foot\">";
        die;
    }
    if (!preg_match('|^[0-9]+$|i', $sex)) {
        echo "<div class = \"up\" >
</div>
<div class=\"body\"><a href=\"../reg/\">назад</a><br>недопустимые символы в поле<a href=\"$PHP_SELF?reg=1\"><font color=\"green\"><br/>&lsaquo;&lsaquo;</a></div><div class = \"foot\">";
        die;
    }
    if (!preg_match('|^[0-9]+$|i', $rasa)) {
        echo "<div class = \"up\" >
</div>
<div class=\"body\"><a href=\"../reg/\">назад</a><br>недопустимые символы в расе<a href=\"$PHP_SELF?reg=1\"><br/>&lsaquo;&lsaquo;</a></div><div class = \"foot\">";
        die;
    }
  
	$query_ts = mysql_query("SET NAMES cp1251");
$query_ts = mysql_query("SELECT * FROM last_reg");
while($query_ts2=mysql_fetch_assoc($query_ts))
{
$tsr=$query_ts2[LAST_REG];
}
    if ($rasa == '1') {
	if(!isset($class)){
        echo "<div class = \"up\" >
</div>
<div class=\"body\">вы выбрали Эльфийдов<br/>
<form action=\"reg.php?reg=2&class=1\" method=\"POST\">
<input name=\"login\" value=\"$login\" type=\"hidden\">
<input name=\"pass\" value=\"$pass\"  type=\"hidden\">
<input name=\"age\" value=\"$age\"  type=\"hidden\">
<input name=\"sex\" value=\"$sex\"  type=\"hidden\">
<input name=\"rasa\" value=\"$rasa\"  type=\"hidden\">
<input name=\"mail\" value=\"$mail\"  type=\"hidden\">
<input name=\"secret\" value=\"$secret\"  type=\"hidden\">
<select name=\"class\">
<option name=\"1\">лучник</option>
<option name=\"2\">жрец</option>
</select><br/>
<input type=\"submit\" value=\"готово\" class=\"button\"></form>";
}
        $rasa = str_replace("Эльфийды", "1", $rasa);
        if (isset($class)) {
            $class = str_replace("лучник", "1", $class);
            $class = str_replace("жрец", "2", $class);
            echo "
<center>вы успешно зарегестрировались!<br/>
теперь вы можете войти в игру<br/><br/>
<form action='../login.php' method='POST'>
<input name='NICK' value='$login' maxlength='25' type='hidden'>
<input name='pass' value='$pass' maxlength='25' type='hidden'>
<input type='submit' value='войти' class='button'/>
</form></div><div class = \"foot\">
";

            //здесь принимаем данные от почты
           echo"<div class=\"main_title\"><center><img src=\"../img/success.png\"> сохраните ваши данные и не кому не сообщайте!</center>";
$r1=array('0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','x','v','w','y','z');
$r2=array(0,1,2,3,4,5,6,7,8,9,'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','x','v','w','y','z');
$r3=array(0,1,2,3,4,5,6,7,8,9,'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','x','v','w','y','z');
$r4=array(0,1,2,3,4,5,6,7,8,9,'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','x','v','w','y','z');
$r5=array(0,1,2,3,4,5,6,7,8,9,'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','x','v','w','y','z');
$r6=array(0,1,2,3,4,5,6,7,8,9,'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','x','v','w','y','z');
$r7=array(0,1,2,3,4,5,6,7,8,9,'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','x','v','w','y','z');
$r8=array(0,1,2,3,4,5,6,7,8,9,'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','x','v','w','y','z');
$r9=array(0,1,2,3,4,5,6,7,8,9,'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','x','v','w','y','z');
$r10=array(0,1,2,3,4,5,6,7,8,9,'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','x','v','w','y','z');  
$rr1=rand(0,35);
$rr2=rand(0,35);
$rr3=rand(0,35);
$rr4=rand(0,35);
$rr5=rand(0,35);
$rr6=rand(0,35);
$rr7=rand(0,35);
$rr8=rand(0,35);
$rr9=rand(0,35);
$rr10=rand(0,35);
echo"
<div style=\"padding-left:15px\">Логин:$login<br/>
Пароль:$r1[$rr1]$r2[$rr2]$r3[$rr3]$r4[$rr4]$r5[$rr5]$r6[$rr6]$r7[$rr7]$r8[$rr8]$r9[$rr9]$r10[$rr10]
</center></div></div>";
if($class)
{
if($class==1){$health_min=15;$mana_min=10;}
if($class==2){$health_min=10;$mana_min=30;}
}
if($class==1){
$query = mysql_query("SET NAMES cp1251");
$query = mysql_query("
INSERT INTO users (NICK,MAX_VES,sex,pass,age,rasa,class_pers,
heroism,MINhp,MAXhp,MINmp,MAXmp,LVL_USERS,SKILL_POINTS,EXPnow,EXPend,
DAMAGEmin,DAMAGEmax,DEFENCE,SKILL_STR,SKILL_DEX,SKILL_INT,
SKILL_COLD_WEAPON,SKILL_LAUNCH_BOW,SKILL_LAUNCH_CROSSBOW,SKILL_MAGIC_WEAPON,
SKILL_HEALER,SKILL_RUDAKOP,SKILL_KUZNEC,SKILL_PORTNOY,SHANS_KRIT,U_TOCH,email,email_act,
email_pass,loc,ip,TP_ATTCK,secret,ses,time_otdix) 
VALUES('$login','15','$sex','$pass','$age','$rasa','$class',0,'$health_min',
'$health_min','$mana_min','$mana_min',0,5,0,50,0,2,0,1,1,1,0,0,0,0,0,0,0,0,1,25,'$mail',1,
'$email_pass','begin','$ip','кулаками','$secret','$session',5)");
$naIN = mysql_query("SET NAMES cp1251");
$naIN=mysql_query("INSERT INTO nasUSERS (NICK_US,mobM,logM,userM) VALUES ('$login','5','10','5')");
$stats=mysql_query("INSERT INTO stats (NICK,death_monsters,death_users,death) VALUES ('$login','0','0','0')");
$ttsy=time()+2419200;
$accaunts=mysql_query("INSERT INTO accaunts (NICK_AC,DATE_AC) VALUES ('$login','$ttsy')");
$qUs = mysql_query("SET NAMES cp1251");
$qUs=mysql_query("INSERT INTO quests (quests_users,quests_name,quests_FullName,quests_description,Q_money,Q_exp) VALUES ('$login','sunduk','снаряжение','получите сундук со снаряжением у начальника новобранцев','50','70')");
$luk = mysql_query("SET NAMES cp1251");
$luk=mysql_query("INSERT INTO inv (IL_CLASS,IL_ALL_CLASS,IL_NAME,IL_COST,IL_KEY,IL_MIN_DMG,IL_MAX_DMG,IL_STR,IL_DEX,IL_INT,IL_SPD,IL_MIN_PROCH,IL_MAX_PROCH,IL_TREBUET,IL_IMAGE,IL_SRC,IL_NO,ID_USERS,IL_COUNT) VALUES('bow','weapon','лук новичка','0','i.w.r.b.new','4','8','1','1','1','5','5000','5000','i.arrow','img_items/archer/weapon/gray_bnew_lv_0.gif','i.w.r.b.new','0','$login','1')");//добавляем лук
$arrow = mysql_query("SET NAMES cp1251");
$arrow=mysql_query("INSERT INTO inv (IL_CLASS,IL_ALL_CLASS,IL_SUBCLASS,IL_NAME,IL_COST,IL_KEY,IL_MIN_DMG,IL_MAX_DMG,IL_STR,IL_DEX,IL_INT,IL_SPD,IL_MIN_PROCH,IL_MAX_PROCH,IL_TREBUET,IL_IMAGE,IL_SRC,IL_NO,ID_USERS,IL_COUNT) VALUES('rasxodnoe','rasxodnoe','streli','стрелы','0','i.arrow','0','0','0','0','0','0','0','0','i.arrow','img_items/rasxodnoe/arrow.gif','i.arrow','0','$login','5000')");//добавляем стрелы

}

if($class==2){
$query = mysql_query("SET NAMES cp1251");
$query = mysql_query("
INSERT INTO users (NICK,MAX_VES,sex,pass,age,rasa,class_pers,
heroism,MINhp,MAXhp,MINmp,MAXmp,LVL_USERS,SKILL_POINTS,EXPnow,EXPend,
DAMAGEmin,DAMAGEmax,DEFENCE,SKILL_STR,SKILL_DEX,SKILL_INT,
SKILL_COLD_WEAPON,SKILL_LAUNCH_BOW,SKILL_LAUNCH_CROSSBOW,SKILL_MAGIC_WEAPON,
SKILL_HEALER,SKILL_RUDAKOP,SKILL_KUZNEC,SKILL_PORTNOY,SHANS_KRIT,U_TOCH,email,email_act,
email_pass,loc,ip,TP_ATTCK,secret,ses,time_otdix) 
VALUES('$login','15','$sex','$pass','$age','$rasa','$class',0,'$health_min',
'$health_min','$mana_min','$mana_min',0,5,0,50,0,2,0,1,1,1,0,0,0,0,0,0,0,0,1,25,'$mail',1,
'$email_pass','begin','$ip','кулаками','$secret','$session',5)");$naIN = mysql_query("SET NAMES cp1251");
$naIN=mysql_query("INSERT INTO nasUSERS (NICK_US,mobM,logM,userM) VALUES ('$login','5','10','5')");
$stats=mysql_query("INSERT INTO stats (NICK,death_monsters,death_users,death) VALUES ('$login','0','0','0')");
$ttsy=time()+2419200;
$accaunts=mysql_query("INSERT INTO accaunts (NICK_AC,DATE_AC) VALUES ('$login','$ttsy')");
$qUs = mysql_query("SET NAMES cp1251");
$qUs=mysql_query("INSERT INTO quests (quests_users,quests_name,quests_FullName,quests_description,Q_money,Q_exp) VALUES ('$login','sunduk','снаряжение','получите сундук со снаряжением у начальника новобранцев','50','70')");
$ponew = mysql_query("SET NAMES cp1251");
$ponew=mysql_query("INSERT INTO inv (IL_CLASS,IL_ALL_CLASS,IL_NAME,IL_COST,IL_KEY,IL_MAGD_MIN,IL_MAGD_MAX,IL_STR,IL_DEX,IL_INT,IL_SPD,IL_MIN_PROCH,IL_MAX_PROCH,IL_TREBUET,IL_IMAGE,IL_SRC,IL_NO,ID_USERS,IL_COUNT) VALUES('posox','weapon','посох новичка','0','i.w.j.ponew','4','8','1','1','1','5','5000','5000','','img_items/ponew.png','i.w.j.ponew','0','$login','1')");//добавляем лук
$magic=mysql_query("INSERT INTO magic_list (m_key,magic_name,m_users,need_mana,lvl_magic,min_dmg,max_dmg,reload,class,ML_IMAGE) VALUES ('m.heal','лечение','$login','5','1','15','0','20','WIND','magic_icons/heal.png')");
$magic_slots=mysql_query("INSERT INTO magic_slots (S_CLASS_MAGIC,S_KEY_MAGIC,S_NAME_MAGIC,S_COST_MANNA,S_RESSURECTION,S_LVL_MAGIC,S_NICK) VALUES ('WIND','m.heal','лечение','5','20','1','$login')");

}
   } else
            echo "<font color=\"red\">выберите пожалуйста класс!</div><div class = \"foot\">";


        
    }

    if ($rasa == '3') {
	if(!isset($class)){
        echo "вы выбрали инсентов<br/>
<form action=\"reg.php?reg=2&class=3\" method=\"POST\">
<input name=\"login\" value=\"$login\" type=\"hidden\">
<input name=\"pass\" value=\"$pass\"  type=\"hidden\">
<input name=\"age\" value=\"$age\"  type=\"hidden\">
<input name=\"sex\" value=\"$sex\"  type=\"hidden\">
<input name=\"rasa\" value=\"$rasa\"  type=\"hidden\">
<input name=\"mail\" value=\"$mail\"  type=\"hidden\">
<input name=\"secret\" value=\"$secret\"  type=\"hidden\">
<select name=\"class\">
<option name=\"3\">ассасин</option>
<option name=\"4\">защитник</option>
</select><br/>
<input type=\"submit\" value=\"готово\" class=\"button\"></form>";
}
        $rasa = str_replace("инсенты", "3", $rasa);
        if (isset($class)) {
            $class = str_replace("ассасин", "3", $class);
            $class = str_replace("защитник", "4", $class);
            echo "
<center>вы успешно зарегестрировались!<br/>
теперь вы можете войти в игру<br/><br/>
<form action='../login.php' method='POST'>
<input name='NICK' value='$login' maxlength='25' type='hidden'>
<input name='pass' value='$pass' maxlength='25' type='hidden'>
<input type='submit' value='войти' class='button'/>
</form>
";
            //здесь принимаем данные от почты
       echo"<div class=\"main_title\"><center><img src=\"../img/success.png\"> сохраните ваши данные и не кому не сообщайте!</center>";
$r1=array('0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','x','v','w','y','z');
$r2=array(0,1,2,3,4,5,6,7,8,9,'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','x','v','w','y','z');
$r3=array(0,1,2,3,4,5,6,7,8,9,'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','x','v','w','y','z');
$r4=array(0,1,2,3,4,5,6,7,8,9,'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','x','v','w','y','z');
$r5=array(0,1,2,3,4,5,6,7,8,9,'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','x','v','w','y','z');
$r6=array(0,1,2,3,4,5,6,7,8,9,'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','x','v','w','y','z');
$r7=array(0,1,2,3,4,5,6,7,8,9,'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','x','v','w','y','z');
$r8=array(0,1,2,3,4,5,6,7,8,9,'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','x','v','w','y','z');
$r9=array(0,1,2,3,4,5,6,7,8,9,'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','x','v','w','y','z');
$r10=array(0,1,2,3,4,5,6,7,8,9,'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','x','v','w','y','z');  
$rr1=rand(0,35);
$rr2=rand(0,35);
$rr3=rand(0,35);
$rr4=rand(0,35);
$rr5=rand(0,35);
$rr6=rand(0,35);
$rr7=rand(0,35);
$rr8=rand(0,35);
$rr9=rand(0,35);
$rr10=rand(0,35);
echo"<div style=\"padding-left:15px\">
Логин:$login<br/>
Пароль:$r1[$rr1]$r2[$rr2]$r3[$rr3]$r4[$rr4]$r5[$rr5]$r6[$rr6]$r7[$rr7]$r8[$rr8]$r9[$rr9]$r10[$rr10]
</center></div></div>";
if($class)
{
if($class==3){$health_min=15;$mana_min=10;}
if($class==4){$health_min=50;$mana_min=3;}
}
$query = mysql_query("SET NAMES cp1251");
$query = mysql_query("
INSERT INTO users (NICK,MAX_VES,sex,pass,age,rasa,class_pers,
heroism,MINhp,MAXhp,MINmp,MAXmp,LVL_USERS,SKILL_POINTS,EXPnow,EXPend,
DAMAGEmin,DAMAGEmax,DEFENCE,SKILL_STR,SKILL_DEX,SKILL_INT,
SKILL_COLD_WEAPON,SKILL_LAUNCH_BOW,SKILL_LAUNCH_CROSSBOW,SKILL_MAGIC_WEAPON,
SKILL_HEALER,SKILL_RUDAKOP,SKILL_KUZNEC,SKILL_PORTNOY,SHANS_KRIT,U_TOCH,email,email_act,
email_pass,loc,ip,TP_ATTCK,secret,ses,time_otdix) 
VALUES('$login','15','$sex','$pass','$age','$rasa','$class',0,'$health_min',
'$health_min','$mana_min','$mana_min',0,5,0,50,0,2,0,1,1,1,0,0,0,0,0,0,0,0,1,25,'$mail',1,
'$email_pass','begin','$ip','кулаками','$secret','$session',5)");
$naIN = mysql_query("SET NAMES cp1251");
$naIN=mysql_query("INSERT INTO nasUSERS (NICK_US,mobM,logM,userM) VALUES ('$login','5','10','5')");
$stats=mysql_query("INSERT INTO stats (NICK,death_monsters,death_users,death) VALUES ('$login','0','0','0')");
$ttsy=time()+2419200;
$accaunts=mysql_query("INSERT INTO accaunts (NICK_AC,DATE_AC) VALUES ('$login','$ttsy')");
$qUs = mysql_query("SET NAMES cp1251");
$qUs=mysql_query("INSERT INTO quests (quests_users,quests_name,quests_FullName,quests_description,Q_money,Q_exp) VALUES ('$login','sunduk','снаряжение','получите сундук со снаряжением у начальника новобранцев','50','70')");
$swordd = mysql_query("SET NAMES cp1251");
$swordd=mysql_query("INSERT INTO inv (IL_CLASS,IL_ALL_CLASS,IL_NAME,IL_COST,IL_KEY,IL_MIN_DMG,IL_MAX_DMG,IL_STR,IL_DEX,IL_INT,IL_SPD,IL_MIN_PROCH,IL_MAX_PROCH,IL_TREBUET,IL_IMAGE,IL_SRC,IL_NO,ID_USERS,IL_COUNT) VALUES('swords','weapon','меч новичка','0','i.w.s.new','4','8','1','1','1','5','5000','5000','','img_items/snew.png','i.w.s.new','0','$login','1')");//добавляем лук
   
   } else
            echo "<font color=\"red\">выберите пожалуйста класс!";


        die;
    }

    if ($rasa == '2') {
	if(!isset($class)){
        echo "вы выбрали имперцев<br/>
<form action=\"reg.php?reg=2&class=5\" method=\"POST\">
<input name=\"login\" value=\"$login\" type=\"hidden\">
<input name=\"pass\" value=\"$pass\"  type=\"hidden\">
<input name=\"age\" value=\"$age\"  type=\"hidden\">
<input name=\"sex\" value=\"$sex\"  type=\"hidden\">
<input name=\"rasa\" value=\"$rasa\"  type=\"hidden\">
<input name=\"mail\" value=\"$mail\"  type=\"hidden\">
<input name=\"secret\" value=\"$secret\"  type=\"hidden\">
<select name=\"class\">
<option name=\"5\">воин</option>
<option name=\"6\">маг</option>
</select><br/>
<input type=\"submit\" value=\"готово\" class=\"button\"></form>";
}
        $rasa = str_replace("имперцы", "2", $rasa);
        if (isset($class)) {
            $class = str_replace("воин", "5", $class);
            $class = str_replace("маг", "6", $class);
            echo "<center>
вы успешно зарегестрировались!<br/>
теперь вы можете войти в игру<br/><br/>
<form action='../login.php' method='POST'>
<input name='NICK' value='$login' maxlength='25' type='hidden'>
<input name='pass' value='$pass' maxlength='25' type='hidden'>
<input type='submit' value='войти' class='button'/>
</form>
";
            //здесь принимаем данные от почты       
			echo"<div class=\"main_title\"><center><img src=\"../img/success.png\"> сохраните ваши данные и не кому не сообщайте!</center>";
$r1=array('0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','x','v','w','y','z');
$r2=array(0,1,2,3,4,5,6,7,8,9,'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','x','v','w','y','z');
$r3=array(0,1,2,3,4,5,6,7,8,9,'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','x','v','w','y','z');
$r4=array(0,1,2,3,4,5,6,7,8,9,'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','x','v','w','y','z');
$r5=array(0,1,2,3,4,5,6,7,8,9,'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','x','v','w','y','z');
$r6=array(0,1,2,3,4,5,6,7,8,9,'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','x','v','w','y','z');
$r7=array(0,1,2,3,4,5,6,7,8,9,'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','x','v','w','y','z');
$r8=array(0,1,2,3,4,5,6,7,8,9,'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','x','v','w','y','z');
$r9=array(0,1,2,3,4,5,6,7,8,9,'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','x','v','w','y','z');
$r10=array(0,1,2,3,4,5,6,7,8,9,'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','x','v','w','y','z');  
$rr1=rand(0,35);
$rr2=rand(0,35);
$rr3=rand(0,35);
$rr4=rand(0,35);
$rr5=rand(0,35);
$rr6=rand(0,35);
$rr7=rand(0,35);
$rr8=rand(0,35);
$rr9=rand(0,35);
$rr10=rand(0,35);
echo"<div style=\"padding-left:15px\">
Логин:$login<br/>
Пароль:$r1[$rr1]$r2[$rr2]$r3[$rr3]$r4[$rr4]$r5[$rr5]$r6[$rr6]$r7[$rr7]$r8[$rr8]$r9[$rr9]$r10[$rr10]
</center></div></div>";
if($class)
{
if($class==5){$health_min=35;$mana_min=10;}
if($class==6){$health_min=10;$mana_min=35;}
}if($class==5){
$query = mysql_query("SET NAMES cp1251");
$query = mysql_query("
INSERT INTO users (NICK,MAX_VES,sex,pass,age,rasa,class_pers,
heroism,MINhp,MAXhp,MINmp,MAXmp,LVL_USERS,SKILL_POINTS,EXPnow,EXPend,
DAMAGEmin,DAMAGEmax,DEFENCE,SKILL_STR,SKILL_DEX,SKILL_INT,
SKILL_COLD_WEAPON,SKILL_LAUNCH_BOW,SKILL_LAUNCH_CROSSBOW,SKILL_MAGIC_WEAPON,
SKILL_HEALER,SKILL_RUDAKOP,SKILL_KUZNEC,SKILL_PORTNOY,SHANS_KRIT,U_TOCH,email,email_act,
email_pass,loc,ip,TP_ATTCK,secret,ses,time_otdix) 
VALUES('$login','15','$sex','$pass','$age','$rasa','$class',0,'$health_min',
'$health_min','$mana_min','$mana_min',0,5,0,50,0,2,0,1,1,1,0,0,0,0,0,0,0,0,1,25,'$mail',1,
'$email_pass','begin','$ip','кулаками','$secret','$session',5)");
$naIN = mysql_query("SET NAMES cp1251");
$naIN=mysql_query("INSERT INTO nasUSERS (NICK_US,mobM,logM,userM) VALUES ('$login','5','10','5')");
$stats=mysql_query("INSERT INTO stats (NICK,death_monsters,death_users,death) VALUES ('$login','0','0','0')");
$ttsy=time()+2419200;
$accaunts=mysql_query("INSERT INTO accaunts (NICK_AC,DATE_AC) VALUES ('$login','$ttsy')");
$qUs = mysql_query("SET NAMES cp1251");
$qUs=mysql_query("INSERT INTO quests (quests_users,quests_name,quests_FullName,quests_description,Q_money,Q_exp) VALUES ('$login','sunduk','снаряжение','получите сундук со снаряжением у начальника новобранцев','50','70')");
$sword = mysql_query("SET NAMES cp1251");
$sword=mysql_query("INSERT INTO inv (IL_CLASS,IL_ALL_CLASS,IL_NAME,IL_COST,IL_KEY,IL_MIN_DMG,IL_MAX_DMG,IL_STR,IL_DEX,IL_INT,IL_SPD,IL_MIN_PROCH,IL_MAX_PROCH,IL_TREBUET,IL_IMAGE,IL_SRC,IL_NO,ID_USERS,IL_COUNT) VALUES('swords','weapon','меч новичка','0','i.w.s.new','4','8','1','1','1','5','5000','5000','','img_items/snew.png','i.w.s.new','0','$login','1')");//добавляем лук

}
if($class==6){
$query = mysql_query("SET NAMES cp1251");
$query = mysql_query("
INSERT INTO users (NICK,MAX_VES,sex,pass,age,rasa,class_pers,
heroism,MINhp,MAXhp,MINmp,MAXmp,LVL_USERS,SKILL_POINTS,EXPnow,EXPend,
MG_DMGmin,MG_DMGmax,DEFENCE,SKILL_STR,SKILL_DEX,SKILL_INT,
SKILL_COLD_WEAPON,SKILL_LAUNCH_BOW,SKILL_LAUNCH_CROSSBOW,SKILL_MAGIC_WEAPON,
SKILL_HEALER,SKILL_RUDAKOP,SKILL_KUZNEC,SKILL_PORTNOY,SHANS_KRIT,U_TOCH,email,email_act,
email_pass,loc,ip,TP_ATTCK,secret,ses,time_otdix) 
VALUES('$login','15','$sex','$pass','$age','$rasa','$class',0,'$health_min',
'$health_min','$mana_min','$mana_min',0,5,0,50,0,2,0,1,1,1,0,0,0,0,0,0,0,0,1,25,'$mail',1,
'$email_pass','begin','$ip','кулаками','$secret','$session',5)");
$naIN = mysql_query("SET NAMES cp1251");
$naIN=mysql_query("INSERT INTO nasUSERS (NICK_US,mobM,logM,userM) VALUES ('$login','5','10','5')");
$stats=mysql_query("INSERT INTO stats (NICK,death_monsters,death_users,death) VALUES ('$login','0','0','0')");
$ttsy=time()+2419200;
$accaunts=mysql_query("INSERT INTO accaunts (NICK_AC,DATE_AC) VALUES ('$login','$ttsy')");
$qUs = mysql_query("SET NAMES cp1251");
$qUs=mysql_query("INSERT INTO quests (quests_users,quests_name,quests_FullName,quests_description,Q_money,Q_exp) VALUES ('$login','sunduk','снаряжение','получите сундук со снаряжением у начальника новобранцев','50','70')");
$ponewd = mysql_query("SET NAMES cp1251");
$ponewd=mysql_query("INSERT INTO inv (IL_CLASS,IL_ALL_CLASS,IL_NAME,IL_COST,IL_KEY,IL_MAGD_MIN,IL_MAGD_MAX,IL_STR,IL_DEX,IL_INT,IL_SPD,IL_MIN_PROCH,IL_MAX_PROCH,IL_TREBUET,IL_IMAGE,IL_SRC,IL_NO,ID_USERS,IL_COUNT) VALUES('posox','weapon','посох новичка','0','i.w.j.ponew','2','3','1','1','1','5','5000','5000','','img_items/mage/weapon/gray_ponew_lv_0.gif','i.w.j.ponew','0','$login','1')");//добавляем лук
$magic=mysql_query("INSERT INTO magic_list (m_key,magic_name,m_users,need_mana,lvl_magic,min_dmg,max_dmg,reload,class,m_toch,ML_IMAGE) VALUES ('m.fireklem','огненное клеймо','$login','6','1','5','12','4','FIRE','85','magic_icons/ognklem.png')");
$magic_slots=mysql_query("INSERT INTO magic_slots (S_CLASS_MAGIC,S_KEY_MAGIC,S_NAME_MAGIC,S_COST_MANNA,S_RESSURECTION,S_LVL_MAGIC,S_NICK) VALUES ('FIRE','m.fireklem','огненное клеймо','6','4','1','$login')");

}
} else
            echo "<font color=\"red\">выберите пожалуйста класс!";

        die;
    }

    if ($rasa == '4') {
	if(!isset($class)){
        echo "вы выбрали нежить<br/>
<form action=\"reg.php?reg=2&class=7\" method=\"POST\">
<input name=\"login\" value=\"$login\" type=\"hidden\">
<input name=\"pass\" value=\"$pass\"  type=\"hidden\">
<input name=\"age\" value=\"$age\"  type=\"hidden\">
<input name=\"sex\" value=\"$sex\"  type=\"hidden\">
<input name=\"rasa\" value=\"$rasa\"  type=\"hidden\">
<input name=\"mail\" value=\"$mail\"  type=\"hidden\">
<input name=\"secret\" value=\"$secret\"  type=\"hidden\">

<select name=\"class\">
<option name=\"7\">рыцарь тьмы</option>
<option name=\"8\">некромант</option>
</select><br/>
<input type=\"submit\" value=\"готово\" class=\"button\"></form>";
}
        $rasa = str_replace("нежить", "4", $rasa);
        if (isset($class)) {
            $class = str_replace("рыцарь тьмы", "7", $class);
            $class = str_replace("некромант", "8", $class);
            echo "
вы успешно зарегестрировались!<br/>
теперь вы можете войти в игру<br/><br/>
<form action='../login.php' method='POST'>
<input name='NICK' value='$login' maxlength='25' type='hidden'>
<input name='pass' value='$pass' maxlength='25' type='hidden'>
<input type='submit' value='войти' class='button'/>
</form>
";
            //здесь принимаем данные от почты
       echo"<div class=\"main_title\"><center><img src=\"../img/success.png\"> сохраните ваши данные и не кому не сообщайте!</center>";
$r1=array('0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','x','v','w','y','z');
$r2=array(0,1,2,3,4,5,6,7,8,9,'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','x','v','w','y','z');
$r3=array(0,1,2,3,4,5,6,7,8,9,'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','x','v','w','y','z');
$r4=array(0,1,2,3,4,5,6,7,8,9,'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','x','v','w','y','z');
$r5=array(0,1,2,3,4,5,6,7,8,9,'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','x','v','w','y','z');
$r6=array(0,1,2,3,4,5,6,7,8,9,'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','x','v','w','y','z');
$r7=array(0,1,2,3,4,5,6,7,8,9,'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','x','v','w','y','z');
$r8=array(0,1,2,3,4,5,6,7,8,9,'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','x','v','w','y','z');
$r9=array(0,1,2,3,4,5,6,7,8,9,'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','x','v','w','y','z');
$r10=array(0,1,2,3,4,5,6,7,8,9,'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','x','v','w','y','z');  
$rr1=rand(0,35);
$rr2=rand(0,35);
$rr3=rand(0,35);
$rr4=rand(0,35);
$rr5=rand(0,35);
$rr6=rand(0,35);
$rr7=rand(0,35);
$rr8=rand(0,35);
$rr9=rand(0,35);
$rr10=rand(0,35);
echo"<div style=\"padding-left:15px\">
Логин:$login<br/>
Пароль:$r1[$rr1]$r2[$rr2]$r3[$rr3]$r4[$rr4]$r5[$rr5]$r6[$rr6]$r7[$rr7]$r8[$rr8]$r9[$rr9]$r10[$rr10]
</center></div></div>";
if($class)
{
if($class==7){$health_min=35;$mana_min=10;}
if($class==8){$health_min=10;$mana_min=35;}
}
if($class==7){
$query = mysql_query("SET NAMES cp1251");
$query = mysql_query("
INSERT INTO users (NICK,MAX_VES,sex,pass,age,rasa,class_pers,
heroism,MINhp,MAXhp,MINmp,MAXmp,LVL_USERS,SKILL_POINTS,EXPnow,EXPend,
DAMAGEmin,DAMAGEmax,DEFENCE,SKILL_STR,SKILL_DEX,SKILL_INT,
SKILL_COLD_WEAPON,SKILL_LAUNCH_BOW,SKILL_LAUNCH_CROSSBOW,SKILL_MAGIC_WEAPON,
SKILL_HEALER,SKILL_RUDAKOP,SKILL_KUZNEC,SKILL_PORTNOY,SHANS_KRIT,U_TOCH,email,email_act,
email_pass,loc,ip,TP_ATTCK,secret,ses,time_otdix) 
VALUES('$login','15','$sex','$pass','$age','$rasa','$class',0,'$health_min',
'$health_min','$mana_min','$mana_min',0,5,0,50,0,2,0,1,1,1,0,0,0,0,0,0,0,0,1,25,'$mail',1,
'$email_pass','begin','$ip','кулаками','$secret','$session',5)");
$naIN = mysql_query("SET NAMES cp1251");
$naIN=mysql_query("INSERT INTO nasUSERS (NICK_US,mobM,logM,userM) VALUES ('$login','5','10','5')");
$stats=mysql_query("INSERT INTO stats (NICK,death_monsters,death_users,death) VALUES ('$login','0','0','0')");
$ttsy=time()+2419200;
$accaunts=mysql_query("INSERT INTO accaunts (NICK_AC,DATE_AC) VALUES ('$login','$ttsy')");
$qUs = mysql_query("SET NAMES cp1251");
$qUs=mysql_query("INSERT INTO quests (quests_users,quests_name,quests_FullName,quests_description,Q_money,Q_exp) VALUES ('$login','sunduk','снаряжение','получите сундук со снаряжением у начальника новобранцев','50','70')");
$swordt = mysql_query("SET NAMES cp1251");
$swordt=mysql_query("INSERT INTO inv (IL_CLASS,IL_ALL_CLASS,IL_NAME,IL_COST,IL_KEY,IL_MIN_DMG,IL_MAX_DMG,IL_STR,IL_DEX,IL_INT,IL_SPD,IL_MIN_PROCH,IL_MAX_PROCH,IL_TREBUET,IL_IMAGE,IL_SRC,IL_NO,ID_USERS,IL_COUNT) VALUES('swords','weapon','меч новичка','0','i.w.s.new','4','8','1','1','1','5','5000','5000','','img_items/snew.png','i.w.s.new','0','$login','1')");//добавляем лук

}
if($class==8){
$query = mysql_query("SET NAMES cp1251");
$query = mysql_query("
INSERT INTO users (NICK,MAX_VES,sex,pass,age,rasa,class_pers,
heroism,MINhp,MAXhp,MINmp,MAXmp,LVL_USERS,SKILL_POINTS,EXPnow,EXPend,
MG_DMGmin,MG_DMGmax,DEFENCE,SKILL_STR,SKILL_DEX,SKILL_INT,
SKILL_COLD_WEAPON,SKILL_LAUNCH_BOW,SKILL_LAUNCH_CROSSBOW,SKILL_MAGIC_WEAPON,
SKILL_HEALER,SKILL_RUDAKOP,SKILL_KUZNEC,SKILL_PORTNOY,SHANS_KRIT,U_TOCH,email,email_act,
email_pass,loc,ip,TP_ATTCK,secret,ses,time_otdix) 
VALUES('$login','15','$sex','$pass','$age','$rasa','$class',0,'$health_min',
'$health_min','$mana_min','$mana_min',0,5,0,50,0,2,0,1,1,1,0,0,0,0,0,0,0,0,1,25,'$mail',1,
'$email_pass','begin','$ip','кулаками','$secret','$session',5)");
$naIN = mysql_query("SET NAMES cp1251");
$naIN=mysql_query("INSERT INTO nasUSERS (NICK_US,mobM,logM,userM) VALUES ('$login','5','10','5')");
$stats=mysql_query("INSERT INTO stats (NICK,death_monsters,death_users,death) VALUES ('$login','0','0','0')");
$ttsy=time()+2419200;
$accaunts=mysql_query("INSERT INTO accaunts (NICK_AC,DATE_AC) VALUES ('$login','$ttsy')");

$qUs = mysql_query("SET NAMES cp1251");
$qUs=mysql_query("INSERT INTO quests (quests_users,quests_name,quests_FullName,quests_description,Q_money,Q_exp) VALUES ('$login','sunduk','снаряжение','получите сундук со снаряжением у начальника новобранцев','50','70')");
$ponewd = mysql_query("SET NAMES cp1251");
$ponewd=mysql_query("INSERT INTO inv (IL_CLASS,IL_ALL_CLASS,IL_NAME,IL_COST,IL_KEY,IL_MAGD_MIN,IL_MAGD_MAX,IL_STR,IL_DEX,IL_INT,IL_SPD,IL_MIN_PROCH,IL_MAX_PROCH,IL_TREBUET,IL_IMAGE,IL_SRC,IL_NO,ID_USERS,IL_COUNT) VALUES('posox','weapon','посох новичка','0','i.w.j.ponew','4','8','1','1','1','5','5000','5000','','img_items/ponew.png','i.w.j.ponew','0','$login','1')");//добавляем лук

}
 } else
            echo "<font color=\"red\">выберите пожалуйста класс!";

        die;
    }
}

?>


