Просмотр файла dsgame_1303/123.php

Размер файла: 21.91Kb
<?session_start();?>
<!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>
<body>

<?
$d=date("H:i");
?>
<div class='main' style='word-wrap:break-word;padding-bottom:0px'>
<div class="center" style="padding-top:10px;padding-bottom:10px"><div class='main_title'>
<strong>Характеристика</strong>
</div></div>
<div style="padding-left:10px;padding-right:10px">
<b>
<?
######################################
#   Made by Astorix                  #
#      2011 г.                       #
#    все права защищенны             #
#      Мрак Подземелья               #
######################################
echo "<link href=\"styleN.css\" type=\"text/css\" rel=\"stylesheet\">";
/*
принимаем параметры:
p,key,no,to,NICK,pass,menu,use,c,d,p
*/
$p = $_GET['p'];
$key = $_GET['key'];
$no = $_GET['no'];
$to = $_GET['to'];
$NICK = $_GET['NICK'];
$pass = $_GET['pass'];
$menu = $_GET['menu'];
$use = $_GET['use'];
$c = $_GET['c'];
$d = $_GET['d'];
$p = @intval($_GET['p']);
$idT = $_GET['idT'];
$all=$_GET['all'];
$t = time();
//айпи игроков
$ip = $_SERVER['REMOTE_ADDR'];
echo "<title>Рюкзак персонажа $_SESSION[s]</title>";
//подключаем файл базы db.php
include("db.php");
$db->openDB();
@include('IP_BN/index.php');
if(strlen($_SESSION[s])==0 OR strlen($_SESSION[p])==0){echo"логин или пароль пустой!<br/><a href=\"menu.php\">на главную</a>";die;}
$PR_NICK = mysql_query("SET NAMES cp1251");
$PR_NICK=mysql_query("SELECT * FROM users WHERE NICK=\"$_SESSION[s]\" AND pass=\"$_SESSION[p]\"");
if(mysql_num_rows($PR_NICK)<1){echo"пользователя с таким логином или паролем не существует<br/><a href=\"menu.php\">на главную</a>";die;}

$upTIME=mysql_query("UPDATE users SET gametime=\"$t\" WHERE NICK=\"$_SESSION[s]\"");//обновляем время в онлайне
$zapLG = mysql_query("SET NAMES cp1251");
$zapLG=mysql_query("INSERT INTO logs_game (LOGS) VALUES('$_SERVER[REQUEST_URI]')");
$query2 = mysql_query("SET NAMES cp1251");
$query2 = mysql_query("SELECT * FROM users WHERE NICK=\"$_SESSION[s]\"");
include("login_correct.php");
    while ($query3 = mysql_fetch_assoc($query2)) {
if($query3[ip]==$ip2 AND $t-$query3[gametime]>300){
            
//подключаем главную страницу_2 игры
include("site_main.php");            
        }        

$qu_ip=strlen($query3[ip]);
if($qu_ip==7){$q_ip=(substr($query3[ip],0,4));$ip2=(substr($ip,0,4));}//7
if($qu_ip==8){$q_ip=(substr($query3[ip],0,5));$ip2=(substr($ip,0,5));}//8
if($qu_ip==9){$q_ip=(substr($query3[ip],0,6));$ip2=(substr($ip,0,6));}//9
if($qu_ip==10){$q_ip=(substr($query3[ip],0,7));$ip2=(substr($ip,0,7));}//10
if($qu_ip==11){$q_ip=(substr($query3[ip],0,8));$ip2=(substr($ip,0,8));}//11
if($qu_ip==12){$q_ip=(substr($query3[ip],0,9));$ip2=(substr($ip,0,9));}//12
if($qu_ip==13){$q_ip=(substr($query3[ip],0,10));$ip2=(substr($ip,0,10));}//13
if($qu_ip==14){$q_ip=(substr($query3[ip],0,11));$ip2=(substr($ip,0,11));}//14
if($qu_ip==15){$q_ip=(substr($query3[ip],0,12));$ip2=(substr($ip,0,12));}//15
   
}
/*
тут будет проверка есть ли такой предмет вообще в базе,если нету
ваводим ошибку
*/
$tmp = '';
          ?>
<?
echo "<a href=\"game.php\"><img src=\"img/al.png\"> в игру</a><br/><a href=\"inv.php\"><img src=\"img/stock.png\" width=\"12\" height=\"12\"> инвентарь</a><br/><a href=\"pers.php\"><img src=\"img/npc.png\" width=\"12\" height=\"12\"> персонаж</a>";
          ?>
          <font color="lime">
            <center>Экипированно:
            </center>
          </font> 
          <br/>
<?
$db->openDB();
echo "";
$weapon = mysql_query("SET NAMES cp1251");
$weapon = mysql_query("SELECT * FROM inv WHERE ID_USERS='$_SESSION[s]' AND IL_ALL_CLASS=\"weapon\"");
//$weapon_sw = mysql_query("SELECT * FROM inv WHERE ID_USERS='$_SESSION[s]' AND IL_CLASS='swords' AND IL_NO='1'");
$w_s = mysql_query("SET NAMES cp1251");
$w_s = mysql_query("SELECT * FROM inv WHERE ID_USERS='$_SESSION[s]' AND IL_NO='1' AND IL_CLASS='swords'");
$w_a = mysql_query("SET NAMES cp1251");
$w_a = mysql_query("SELECT * FROM inv WHERE ID_USERS='$_SESSION[s]' AND IL_NO='1' AND IL_CLASS='axe'");
$w_k = mysql_query("SET NAMES cp1251");
$w_k = mysql_query("SELECT * FROM inv WHERE ID_USERS='$_SESSION[s]' AND IL_NO='1' AND IL_CLASS='spear'");
$w_kn = mysql_query("SET NAMES cp1251");
$w_kn = mysql_query("SELECT * FROM inv WHERE ID_USERS='$_SESSION[s]' AND IL_NO='1' AND IL_CLASS='knife'");
$w_ka = mysql_query("SET NAMES cp1251");
$w_ka = mysql_query("SELECT * FROM inv WHERE ID_USERS='$_SESSION[s]' AND IL_NO='1' AND IL_CLASS='kast'");
$w_hu = mysql_query("SET NAMES cp1251");
$w_hu = mysql_query("SELECT * FROM inv WHERE ID_USERS='$_SESSION[s]' AND IL_NO='1' AND IL_CLASS='hummer'");
$w_bo = mysql_query("SET NAMES cp1251");
$w_bo = mysql_query("SELECT * FROM inv WHERE ID_USERS='$_SESSION[s]' AND IL_NO='1' AND IL_CLASS='bow'");
$w_po = mysql_query("SET NAMES cp1251");
$w_po = mysql_query("SELECT * FROM inv WHERE ID_USERS='$_SESSION[s]' AND IL_NO='1' AND IL_CLASS='posox'");
$w_allW = mysql_query("SET NAMES cp1251");
$w_allW = mysql_query("SELECT * FROM inv WHERE ID_USERS='$_SESSION[s]' AND IL_NO='1' AND IL_CLASS='weapon'");
$wso=mysql_num_rows($w_s);
$wao=mysql_num_rows($w_a);
$wkk=mysql_num_rows($w_k);
$wkn=mysql_num_rows($w_kn);
$wka=mysql_num_rows($w_ka);
$whu=mysql_num_rows($w_hu);
$wbo=mysql_num_rows($w_bo);
$wpo=mysql_num_rows($w_po);
$w_allW2=mysql_num_rows($w_allW);
$wss=$wso+$wao+$wkk+$wkn+$wka+$whu+$wbo+$wpo+$w_allW2;


//--------------------------ДОСПЕХ
echo"<div class=\"point-line\"></div>";
echo "";
$db->openDB();
$armor = mysql_query("SET NAMES cp1251");
$armor = mysql_query("SELECT * FROM inv WHERE ID_USERS='$_SESSION[s]' AND IL_CLASS='armor'");
$armor_s = mysql_query("SET NAMES cp1251");
$armor_s = mysql_query("SELECT * FROM inv WHERE ID_USERS='$_SESSION[s]' AND IL_NO='1' AND IL_CLASS='armor'");

$arm=mysql_num_rows($armor_s);
if($arm<1){echo"<img src=\"img/arm.gif\">";}
while ($aArmor = mysql_fetch_assoc($armor)) {
    $ArmorName = $aArmor['IL_NAME'];
    $ArmorNo = $aArmor['IL_NO'];
    $ArmorKey = $aArmor['IL_KEY'];
    if ($ArmorNo == 1) {
        echo "<br/><b><font color=\"orange\">$ArmorName</font></b><br/><a href=\"equip.php?menu=2&use=$aArmor[IL_KEY]&d=$aArmor[IL_CLASS]\"><img src=\"$aArmor[IL_IMAGE]\" height=\"50\" width=\"50\" alt=\"s\"/></a><br/>";
    }
    if ($ArmorNo == 1 and $ArmorKey)
        echo " <small><a href=\"equip.php?menu=2&use=$aArmor[IL_KEY]&d=$aArmor[IL_CLASS]\"><font color=\"red\">[снять]</font></a></small>";
}
echo"<div class=\"point-line\"></div>";
echo "<font color=\"black\"></font>";
$db->openDB();
$helmet = mysql_query("SET NAMES cp1251");
$helmet = mysql_query("SELECT * FROM inv WHERE ID_USERS='$_SESSION[s]' AND IL_CLASS='helmet'");
$helmet_s = mysql_query("SET NAMES cp1251");
$helmet_s = mysql_query("SELECT * FROM inv WHERE ID_USERS='$_SESSION[s]' AND IL_NO='1' AND IL_CLASS='helmet'");


echo"<div class=\"point-line\"></div>";
$db->openDB();
$plash = mysql_query("SET NAMES cp1251");
$plash = mysql_query("SELECT * FROM inv WHERE ID_USERS='$_SESSION[s]' AND IL_CLASS='plash'");
$plash_s = mysql_query("SET NAMES cp1251");
$plash_s = mysql_query("SELECT * FROM inv WHERE ID_USERS='$_SESSION[s]' AND IL_NO='1' AND IL_CLASS='plash'");


echo"<div class=\"point-line\"></div>";
$db->openDB();
$naruc = mysql_query("SET NAMES cp1251");
$naruc = mysql_query("SELECT * FROM inv WHERE ID_USERS='$_SESSION[s]' AND IL_CLASS='naruchi'");
$baruc_s = mysql_query("SET NAMES cp1251");
$naruc_s = mysql_query("SELECT * FROM inv WHERE ID_USERS='$_SESSION[s]' AND IL_NO='1' AND IL_CLASS='naruchi'");

$nrc=mysql_num_rows($naruc_s);
if($nrc<1){echo"<img src=\"img/nar.gif\">";}
while ($aNaruc = mysql_fetch_assoc($naruc)) {
    $NarucName = $aNaruc['IL_NAME'];
    $NarucNo = $aNaruc['IL_NO'];
    $NarucKey = $aNaruc['IL_KEY'];
    if ($NarucNo == 1) {
        echo "<br/><b><font color=\"orange\">$NarucName</font></b><br/><a href=\"equip.php?menu=2&use=$aNaruc[IL_KEY]&d=$aNaruc[IL_CLASS]\"><img src=\"$aNaruc[IL_IMAGE]\" height=\"50\" width=\"50\" alt=\"s\"/></a><br/>";
    }
    if ($NarucNo == 1 and $NarucKey)
        echo " <small><a href=\"equip.php?menu=2&use=$aNaruc[IL_KEY]&d=$aNaruc[IL_CLASS]\"><font color=\"red\">[снять]</font></a></small>";
}
echo"<div class=\"point-line\"></div>";
$db->openDB();
$amulet = mysql_query("SET NAMES cp1251");
$amulet = mysql_query("SELECT * FROM inv WHERE ID_USERS='$_SESSION[s]' AND IL_CLASS='amulet'");
$amulet_s = mysql_query("SET NAMES cp1251");
$amulet_s = mysql_query("SELECT * FROM inv WHERE ID_USERS='$_SESSION[s]' AND IL_NO='1' AND IL_CLASS='amulet'");



echo"<div class=\"point-line\"></div>";
$db->openDB();
$pon = mysql_query("SET NAMES cp1251");
$pon = mysql_query("SELECT * FROM inv WHERE ID_USERS='$_SESSION[s]' AND IL_CLASS='legs'");
$pon_s = mysql_query("SET NAMES cp1251");
$pon_s = mysql_query("SELECT * FROM inv WHERE ID_USERS='$_SESSION[s]' AND IL_NO='1' AND IL_CLASS='legs'");

$pns=mysql_num_rows($pon_s);
if($pns<1){echo"<img src=\"img/pon.png\">";}
while ($aLegs = mysql_fetch_assoc($pon)) {
    $LegsName = $aLegs['IL_NAME'];
    $LegsNo = $aLegs['IL_NO'];
    $LegsKey = $aLegs['IL_KEY'];
    if ($LegsNo == 1) {
        echo "<br/><b>$LegsName</b><br/><a href=\"equip.php?menu=2&use=$aLegs[IL_KEY]&d=$aLegs[IL_CLASS]\"><img src=\"$aLegs[IL_IMAGE]\" height=\"50\" width=\"50\" alt=\"s\"/></a><br/>";
    }
    if ($LegsNo == 1 and $LegsKey)
        echo " <small><a href=\"equip.php?menu=2&use=$aLegs[IL_KEY]&d=$aLegs[IL_CLASS]\"><font color=\"red\">[снять]</font></a></small>";
}
echo"<div class=\"point-line\"></div>";

$db->openDB();
$sapogi = mysql_query("SET NAMES cp1251");
$sapogi = mysql_query("SELECT * FROM inv WHERE ID_USERS='$_SESSION[s]' AND IL_CLASS='sapogi'");
$sapogi_s = mysql_query("SET NAMES cp1251");
$sapogi_s = mysql_query("SELECT * FROM inv WHERE ID_USERS='$_SESSION[s]' AND IL_NO='1' AND IL_CLASS='sapogi'");

$sap=mysql_num_rows($sapogi_s);
if($sap<1){echo"<img src=\"img/sap.png\">";}
while ($aSapogi = mysql_fetch_assoc($sapogi)) {
    $SapogiName = $aSapogi['IL_NAME'];
    $SapogiNo = $aSapogi['IL_NO'];
    $SapogiKey = $aSapogi['IL_KEY'];
    if ($SapogiNo == 1) {
        echo "<br/><b>$SapogiName</b><br/><a href=\"equip.php?menu=2&use=$aSapogi[IL_KEY]&d=$aSapogi[IL_CLASS]\"><img src=\"$aSapogi[IL_IMAGE]\" height=\"50\" width=\"50\" alt=\"s\"/></a><br/>";
    }
    if ($SapogiNo == 1 and $SapogiKey)
        echo " <small><a href=\"equip.php?menu=2&use=$aSapogi[IL_KEY]&d=$aSapogi[IL_CLASS]\"><font color=\"red\">[снять]</font></a></small>";
}

echo"<div class=\"point-line\"></div>";

$db->openDB();
$ringr = mysql_query("SET NAMES cp1251");
$ringr = mysql_query("SELECT * FROM inv WHERE ID_USERS='$_SESSION[s]' AND IL_CLASS='ringr'");
$ringr_s = mysql_query("SET NAMES cp1251");
$ringr_s = mysql_query("SELECT * FROM inv WHERE ID_USERS='$_SESSION[s]' AND IL_NO='1' AND IL_CLASS='ringr'");


echo"<div class=\"point-line\"></div>";
$db->openDB();
$sumka = mysql_query("SET NAMES cp1251");
$sumka = mysql_query("SELECT * FROM inv WHERE ID_USERS='$_SESSION[s]' AND IL_CLASS='sumka'");
$sumka_s = mysql_query("SET NAMES cp1251");
$sumka_s = mysql_query("SELECT * FROM inv WHERE ID_USERS='$_SESSION[s]' AND IL_NO='1' AND IL_CLASS='sumka'");


echo"<div class=\"point-line\"></div>";
$db->openDB();
$arrow = mysql_query("SET NAMES cp1251");
$arrow = mysql_query("SELECT * FROM inv WHERE ID_USERS='$_SESSION[s]' AND IL_SUBCLASS='streli'");
$arrow_s = mysql_query("SET NAMES cp1251");
$arrow_s = mysql_query("SELECT * FROM inv WHERE ID_USERS='$_SESSION[s]' AND IL_NO='1' AND IL_SUBCLASS='streli'");

$arr=mysql_num_rows($arrow_s);
if($arr<1){echo"<img src=\"img/arr.png\">";}
while ($aARR = mysql_fetch_assoc($arrow)) {
    $arrowName = $aARR['IL_NAME'];
    $arrowNo = $aARR['IL_NO'];
    $arrowKey = $aRR['IL_KEY'];
    if ($arrowNo == 1) {
        echo "<br/><b>$arrowName ($aARR[IL_COUNT])</b><br/><a href=\"equip.php?menu=2&use=$aARR[IL_KEY]&d=$aARR[IL_CLASS]\"><img src=\"$aARR[IL_IMAGE]\" height=\"50\" width=\"50\" alt=\"s\"/></a> <br/>";
    }
    if ($arrowNo == 1 and $arrowKey)
        echo " <small><a href=\"equip.php?menu=2&use=$aARR[IL_KEY]&d=$aARR[IL_CLASS]\"><font color=\"red\">[снять]</font></a></small>";
}

$pr_eqi=mysql_query("SELECT * FROM inv WHERE IL_NO=\"1\" AND ID_USERS=\"$_SESSION[s]\"");
if(mysql_num_rows($pr_eqi)>0){echo"<br/><a href=\"equip.php?all=Is\"><font color=>снять все</font></a>";}
if(mysql_num_rows($pr_eqi)>0 AND isset($all) AND $all=='Is'){
$up_qu=mysql_query("UPDATE inv SET IL_NO=\"0\" WHERE IL_NO=\"1\" AND IL_ALL_CLASS!=\"weapon\" AND ID_USERS=\"$_SESSION[s]\"");
$us_de=mysql_query("UPDATE users SET DEFENCE=\"0\" WHERE NICK=\"$_SESSION[s]\"");
 print('<SCRIPT>location.href="equip.php";</SCRIPT>');
}
 
?><font color="black">
</div><div class='line'></div><div class='main_foot'><div class=center><div class=grey><div class=small><div class=foot><a href=pvp.php?r=381966>Главная</a> | <a href=forum.php>Форум</a> | <a href=lib.php?cat=rules>Правила</a> | <a href=lib.php>Помощь</a> | <a href=support.php>Поддержка</a></div></div><div class='foot_margin'></div><div class=smallest><?echo date("H:i");?>, <?echo $total_time.' с.';?><br/><div class='min_margin'></div>&copy; 2013 <u>Мрак Подземелья</u></div></div></div></div></div>
</font>
<?
//одевание вещей
if($c=='shield')
    {
//создаем запрос на одевание щита
$weapon_query_o=mysql_query("UPDATE inv SET IL_NO='1' WHERE IL_KEY='$use'");
    }
if($c=='helmet')
    {
//создаем запрос на одевание шлема
$helmet_query_o=mysql_query("UPDATE inv SET IL_NO='1' WHERE IL_KEY='$use'");
    }
if($c=='amulet')
    {
//создаем запрос на одевание амулета
$amulet_query_o=mysql_query("UPDATE inv SET IL_NO='1' WHERE IL_KEY='$use'");
    }
if($c=='plash')
    {
//создаем запрос на одевание амулета
$plash_query_o=mysql_query("UPDATE inv SET IL_NO='1' WHERE IL_KEY='$use'");
    }    
if($c=='plechi')
    {
//создаем запрос на одевание плаща
$plechi_query_o=mysql_query("UPDATE inv SET IL_NO='1' WHERE IL_KEY='$use'");
    }    
if($c=='armor')
    {
//создаем запрос на одевание доспеха
$armor_query_o=mysql_query("UPDATE inv SET IL_NO='1' WHERE IL_KEY='$use'");
    }    
if($c=='naruchi')
    {
//создаем запрос на одевание наручи
$naruchi_query_o=mysql_query("UPDATE inv SET IL_NO='1' WHERE IL_KEY='$use'");
    }    
if($c=='legs')
    {
//создаем запрос на одевание поножи
$legs_query_o=mysql_query("UPDATE inv SET IL_NO='1' WHERE IL_KEY='$use'");
    }    
if($c=='sapogi')
    {
	
//создаем запрос на одевание сапоги
$sapogi_query_o=mysql_query("UPDATE inv SET IL_NO='1' WHERE IL_KEY='$use'");
    }       
if($c=='ring')
    {
//создаем запрос на одевание кольцо
$ring_query_o=mysql_query("UPDATE inv SET IL_NO='1' WHERE IL_KEY='$use'");
    }       
if($c=='braslet')
    {
//создаем запрос на одевание браслет
$braslet_query_o=mysql_query("UPDATE inv SET IL_NO='1' WHERE IL_KEY='$use'");
    }       
//снимание вещей
if($menu==2 and !$c){
if($d=='swords' or $d=='axe' or $d=='spear' or $d=="kast" or $d=="knife" or $d=="hummer" or $d=="bow" or $d=="posox" or $d=="weapon")
    {    
   print('<SCRIPT>location.href="equip.php";</SCRIPT>');
include("skills/parametrs.php"); 
//создаем запрос на снятие оружия
echo"<br/>";
$db->openDB();
$weapon_lvl = mysql_query("SET NAMES cp1251");
$weapon_lvl=mysql_query("SELECT * FROM users,inv WHERE NICK='$_SESSION[s]' AND IL_KEY='$use'");
while($weapon_lvl2=mysql_fetch_assoc($weapon_lvl)){
 include("skills/parametrs.php"); 
    }}
if($d=="shield")
    {
//создаем запрос на одевание щит
$users=mysql_query("SELECT * FROM users WHERE NICK=\"$_SESSION[s]\"");
$users2=mysql_fetch_assoc($users);
$defHmin=mysql_query("SELECT * FROM inv WHERE IL_CLASS='shield' AND ID_USERS='$_SESSION[s]' AND IL_NO=1");
$defHmin2=mysql_fetch_assoc($defHmin);
$DEF_H=$users2[SHANS_BLOCK]-$defHmin2[IL_BLOCK];
$helmet_DEF=mysql_query("UPDATE users SET SHANS_BLOCK=\"$DEF_H\" WHERE NICK=\"$_SESSION[s]\"");
$plechi_query_o=mysql_query("UPDATE inv SET IL_NO='0' WHERE IL_KEY='$use'");
 print('<SCRIPT>location.href="equip.php";</SCRIPT>');
    }
if($d=="helmet")
    {
//создаем запрос на снятие шлема


$users=mysql_query("SELECT * FROM users WHERE NICK=\"$_SESSION[s]\"");
$users2=mysql_fetch_assoc($users);
$defHmin=mysql_query("SELECT * FROM inv WHERE IL_CLASS='helmet' AND ID_USERS='$_SESSION[s]' AND IL_NO=1");
$defHmin2=mysql_fetch_assoc($defHmin);
$DEF_H=$users2[DEFENCE]-$defHmin2[IL_DEF];
$helmet_DEF=mysql_query("UPDATE users SET DEFENCE=\"$DEF_H\" WHERE NICK=\"$_SESSION[s]\"");
$helmet_query_o=mysql_query("UPDATE inv SET IL_NO='0' WHERE IL_KEY='$use'");
 print('<SCRIPT>location.href="equip.php";</SCRIPT>');
    }
if($d=="amulet")
    {
//создаем запрос на снятие амулета
$DEF=mysql_query("SELECT * FROM inv WHERE ID_IL=\"$idT\" AND IL_KEY='$use'");
while($DEF2=mysql_fetch_assoc($DEF)){
$DDEF=$DEF2[IL_DEF];
}
$users=mysql_query("SELECT * FROM users WHERE NICK=\"$_SESSION[s]\"");
$users2=mysql_fetch_assoc($users);
$DEF_H=$users2[DEFENCE]-$DDEF;
$helmet_DEF=mysql_query("UPDATE users SET DEFENCE=\"$DEF_H\" WHERE NICK=\"$_SESSION[s]\"");
$helmet_query_o=mysql_query("UPDATE inv SET IL_NO='0' WHERE IL_KEY='$use'");
 print('<SCRIPT>location.href="inv.php";</SCRIPT>');
    }
if($d=='plash')
    {
//создаем запрос на снятие плаща
$users=mysql_query("SELECT * FROM users WHERE NICK=\"$_SESSION[s]\"");
$users2=mysql_fetch_assoc($users);
$defHmin=mysql_query("SELECT * FROM inv WHERE IL_CLASS='plash' AND ID_USERS='$_SESSION[s]' AND IL_NO=1");
$defHmin2=mysql_fetch_assoc($defHmin);
$DEF_H=$users2[DEFENCE]-$defHmin2[IL_DEF];
$helmet_DEF=mysql_query("UPDATE users SET DEFENCE=\"$DEF_H\" WHERE NICK=\"$_SESSION[s]\"");
$helmet_query_o=mysql_query("UPDATE inv SET IL_NO='0' WHERE IL_KEY='$use'");
    print('<SCRIPT>location.href="equip.php";</SCRIPT>');
    }    
if($d=='plechi')
    {
//создаем запрос на одевание наплечников
$users=mysql_query("SELECT * FROM users WHERE NICK=\"$_SESSION[s]\"");
$users2=mysql_fetch_assoc($users);
$defHmin=mysql_query("SELECT * FROM inv WHERE IL_CLASS='plechi' AND ID_USERS='$_SESSION[s]' AND IL_NO=1");
$defHmin2=mysql_fetch_assoc($defHmin);
$DEF_H=$users2[DEFENCE]-$defHmin2[IL_DEF];
$helmet_DEF=mysql_query("UPDATE users SET DEFENCE=\"$DEF_H\" WHERE NICK=\"$_SESSION[s]\"");
$plechi_query_o=mysql_query("UPDATE inv SET IL_NO='0' WHERE IL_KEY='$use'");
 print('<SCRIPT>location.href="equip.php";</SCRIPT>');
    }    
if($d=='armor')
    {
//создаем запрос на одевание доспеха
$users=mysql_query("SELECT * FROM users WHERE NICK=\"$_SESSION[s]\"");
$users2=mysql_fetch_assoc($users);
$defHmin=mysql_query("SELECT * FROM inv WHERE IL_CLASS='armor' AND ID_USERS='$_SESSION[s]' AND IL_NO=1");
$defHmin2=mysql_fetch_assoc($defHmin);
$DEF_H=$users2[DEFENCE]-$defHmin2[IL_DEF];
$armor_DEF=mysql_query("UPDATE users SET DEFENCE=\"$DEF_H\" WHERE NICK=\"$_SESSION[s]\"");
$armor_query_o=mysql_query("UPDATE inv SET IL_NO='0' WHERE IL_KEY='$use'");
 print('<SCRIPT>location.href="equip.php";</SCRIPT>');
    }    
if($d=='naruchi')
    {
//создаем запрос на одевание наручи
$users=mysql_query("SELECT * FROM users WHERE NICK=\"$_SESSION[s]\"");
$users2=mysql_fetch_assoc($users);
$defHmin=mysql_query("SELECT * FROM inv WHERE IL_CLASS='naruchi' AND ID_USERS='$_SESSION[s]' AND IL_NO=1");
$defHmin2=mysql_fetch_assoc($defHmin);
$DEF_H=$users2[DEFENCE]-$defHmin2[IL_DEF];
$naruchi_DEF=mysql_query("UPDATE users SET DEFENCE=\"$DEF_H\" WHERE NICK=\"$_SESSION[s]\"");
$naruchi_query_o=mysql_query("UPDATE inv SET IL_NO='0' WHERE IL_KEY='$use'");
print('<SCRIPT>location.href="equip.php";</SCRIPT>');
    }    
if($d=='legs')
    {
//создаем запрос на одевание поножи
$users=mysql_query("SELECT * FROM users WHERE NICK=\"$_SESSION[s]\"");
$users2=mysql_fetch_assoc($users);
$defHmin=mysql_query("SELECT * FROM inv WHERE IL_CLASS='legs' AND ID_USERS='$_SESSION[s]' AND IL_NO=1");
$defHmin2=mysql_fetch_assoc($defHmin);
$DEF_H=$users2[DEFENCE]-$defHmin2[IL_DEF];
$legs_DEF=mysql_query("UPDATE users SET DEFENCE=\"$DEF_H\" WHERE NICK=\"$_SESSION[s]\"");
$legs=mysql_query("UPDATE inv SET IL_NO='0' WHERE IL_KEY='$use'");
print('<SCRIPT>location.href="equip.php";</SCRIPT>');
    }    
if($d=='sapogi')
    {
//создаем запрос на снятие сапоги
$users=mysql_query("SELECT * FROM users WHERE NICK=\"$_SESSION[s]\"");
$users2=mysql_fetch_assoc($users);
$defHmin=mysql_query("SELECT * FROM inv WHERE IL_CLASS='sapogi' AND ID_USERS='$_SESSION[s]' AND IL_NO=1");
$defHmin2=mysql_fetch_assoc($defHmin);
$DEF_H=$users2[DEFENCE]-$defHmin2[IL_DEF];
$sapogi_DEF=mysql_query("UPDATE users SET DEFENCE=\"$DEF_H\" WHERE NICK=\"$_SESSION[s]\"");
$sapogi=mysql_query("UPDATE inv SET IL_NO='0' WHERE IL_KEY='$use'");
print('<SCRIPT>location.href="equip.php";</SCRIPT>');
    }    
if($d=='ring')
    {
//создаем запрос на снятие кольцо
$ring_query_o=mysql_query("UPDATE inv SET IL_NO='0' WHERE IL_KEY='$use'");
    }       
if($d=='braslet')
    {
//создаем запрос на снятие браслет
$braslet_query_o=mysql_query("UPDATE inv SET IL_NO='0' WHERE IL_KEY='$use'");
    }    
if($d=='sumka')
    {
//создаем запрос на снятие сумки
$sum1=mysql_query("SELECT * FROM inv WHERE IL_CLASS=\"sumka\" AND ID_USERS=\"$_SESSION[s]\"");
$sum2=mysql_fetch_assoc($sum1);
$VES=15;
$maxVES=mysql_query("UPDATE users SET MAX_VES=\"$VES\" WHERE NICK=\"$_SESSION[s]\"");

$sumka_o=mysql_query("UPDATE inv SET IL_NO='0' WHERE IL_KEY='$use'");
    }  	
 print('<SCRIPT>location.href="equip.php";</SCRIPT>');   
}
$pr = mysql_query("SET NAMES cp1251");
$pr = mysql_query("SELECT * FROM inv WHERE ID_USERS=\"$_SESSION[s]\" AND IL_NO=\"1\"");
$prC=mysql_num_rows($pr);
@include_once("LVL_table.php");
          ?>
		  


</b>
</font>
</body>
</html>