<?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");
include("db.php");
$db->openDB();
$vremya = time();
$nnick=mysql_query("SELECT * FROM users WHERE NICK=\"$_SESSION[s]\"");
$nnick2=mysql_fetch_assoc($nnick);
?>
<div class='main' style='word-wrap:break-word;padding-bottom:0px'>
<?
if($vremya-$nnick2[gametime]<600){
?>
<div class="center" ><div class="top" style="text-align:center;color:#FFE7BA">
<strong>Снаряжение</strong>
</div>
<div class="line"></div></div>
<div style="padding: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
if($vremya-$nnick2[gametime]>600){
echo"</div>";
include ("accaunt.php");
$AC->ACCAUNT();//Проверка Аккаунта
}
$climg = mysql_query("SELECT * FROM users WHERE NICK=\"$_SESSION[s]\"");
$climg2 = mysql_fetch_assoc($climg);
@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
}
$weapon = mysql_query("SET NAMES cp1251");
$weapon = mysql_query("SELECT * FROM inv WHERE ID_USERS='$_SESSION[s]' AND IL_ALL_CLASS=\"weapon\"");
$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'");
$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'");
$ponoji = mysql_query("SET NAMES cp1251");
$ponoji = mysql_query("SELECT * FROM inv WHERE ID_USERS='$_SESSION[s]' AND IL_CLASS='legs'");
$ponoji_s = mysql_query("SET NAMES cp1251");
$ponoji_s = mysql_query("SELECT * FROM inv WHERE ID_USERS='$_SESSION[s]' AND IL_NO='1' AND IL_CLASS='legs'");
$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'");
$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'");
$shield = mysql_query("SET NAMES cp1251");
$shield = mysql_query("SELECT * FROM inv WHERE ID_USERS='$_SESSION[s]' AND IL_CLASS='shield'");
$shield_s = mysql_query("SET NAMES cp1251");
$shield_s = mysql_query("SELECT * FROM inv WHERE ID_USERS='$_SESSION[s]' AND IL_NO='1' AND IL_CLASS='shield'");
$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'");
$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'");
$arro = mysql_query("SET NAMES cp1251");
$arro = mysql_query("SELECT * FROM inv WHERE ID_USERS='$_SESSION[s]' AND IL_SUBCLASS='streli'");
$arro_s = mysql_query("SET NAMES cp1251");
$arro_s = mysql_query("SELECT * FROM inv WHERE ID_USERS='$_SESSION[s]' AND IL_NO='1' AND IL_SUBCLASS='streli'");
$arroc=mysql_num_rows($arro_s);
$sum=mysql_num_rows($sumka_s);
$helmetc=mysql_num_rows($helmet_s);
$ringrc=mysql_num_rows($ringr_s);
$shieldc=mysql_num_rows($shield_s);
$ponojic=mysql_num_rows($ponoji_s);
$sapogic=mysql_num_rows($sapogi_s);
$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);
$arm=mysql_num_rows($armor_s);
//$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;
/*
тут будет проверка есть ли такой предмет вообще в базе,если нету
ваводим ошибку
*/
$tmp = '';
?>
<?
echo "<div class=\"menu\">
<li><a href=\"game.php\"><img src=\"img/attck.png\"> в игру</a></li>
<li><a href=\"inv.php\"><img src=\"img/inv.png\" width=\"24\" height=\"24\"> инвентарь</a></li>
<li><a href=\"pers.php\"><img src=\"img/grup.png\" width=\"24\" height=\"24\"> персонаж</a></li>
</div>";
?>
<table>
<tr>
<td width="115" bgcolor="#A23232" style="text-align:left"><font color="#FFE7BA">
<?if($climg2[class_pers]=='1'){echo "Лучник";}
if($climg2[class_pers]=='2'){echo "Жрец";}
if($climg2[class_pers]=='3'){echo "Ассасин";}
if($climg2[class_pers]=='4'){echo "Страж";}
if($climg2[class_pers]=='5'){echo "Воин";}
if($climg2[class_pers]=='6'){echo "Маг";}
if($climg2[class_pers]=='7'){echo "Рыцарь тьмы";}
if($climg2[class_pers]=='8'){echo "Некромант";}
?></font></p></td>
<td width="215" bgcolor="#A23232" style="text-align:center"><font color="#FFE7BA">Снаряжение</font></td>
<td width="100" bgcolor="#A23232" style="text-align:right"><font color="#FFE7BA">Уровень <?echo $climg2[LVL_USERS];?></font></td>
</tr>
<tr>
<td valign="middle" style="text-align:left">
<?$amu=mysql_num_rows($amulet_s);
if($amu<1){echo"<img src=\"img/amulet.png\" height=\"42\" width=\"42\" style=\"border: 3px solid #A23232\">";}
while ($aAmulet = mysql_fetch_assoc($amulet)) {
$AmuletName = $aAmulet['IL_NAME'];
$AmuletNo = $aAmulet['IL_NO'];
$AmuletKey = $aAmulet['IL_KEY'];
if ($AmuletNo == 1) {
echo "<br/><a href=\"equip.php?menu=2&use=$aAmulet[IL_KEY]&d=$aAmulet[IL_CLASS]\"><img src=\"$aAmulet[IL_IMAGE]\" height=\"42\" width=\"42\" style=\"border: 3px solid #A23232\"></a>";
}
}?><br/>
<?if($arm<1){echo"<img src=\"img/arm.gif\" width=\"42\" height=\"42\" style=\"border: 3px solid #A23232\"><br/>";}
while ($aArmor = mysql_fetch_assoc($armor)) {
$ArmorName = $aArmor['IL_NAME'];
$ArmorNo = $aArmor['IL_NO'];
$ArmorKey = $aArmor['IL_KEY'];
if ($ArmorNo == 1) {
echo "<a href=\"equip.php?menu=2&use=$aArmor[IL_KEY]&d=$aArmor[IL_CLASS]\">
<img src=\"$aArmor[IL_IMAGE]\" height=\"42\" width=\"42\" style=\"border: 3px solid #A23232\"></a><br/>";
}
}
?>
<?
if($nrc<1){echo"<img src=\"img/nar.gif\" width=\"42\" height=\"42\" style=\"border: 3px solid #A23232\">";}
while ($aNaruc = mysql_fetch_assoc($naruc)) {
$NarucName = $aNaruc['IL_NAME'];
$NarucNo = $aNaruc['IL_NO'];
$NarucKey = $aNaruc['IL_KEY'];
if ($NarucNo == 1) {
echo "<a href=\"equip.php?menu=2&use=$aNaruc[IL_KEY]&d=$aNaruc[IL_CLASS]\"><img src=\"$aNaruc[IL_IMAGE]\" width=\"42\" height=\"42\" style=\"border: 3px solid #A23232\"></a>";
}
}
?><br/>
<?
$ring1 = mysql_query("SET NAMES cp1251");
$ring1 = mysql_query("SELECT * FROM inv WHERE ID_USERS='$_SESSION[s]' AND IL_CLASS='ringl'");
$ring1_s = mysql_query("SET NAMES cp1251");
$ring1_s = mysql_query("SELECT * FROM inv WHERE ID_USERS='$_SESSION[s]' AND IL_NO='1' AND IL_CLASS='ringl'");
$rng1=mysql_num_rows($ring1_s);
if($rng1<1){
echo"<img src=\"img/ring.png\" width=\"42\" height=\"42\" style=\"border: 3px solid #A23232\">";
}
while ($aRingl = mysql_fetch_assoc($ring1)) {
$RinglName = $aRingl['IL_NAME'];
$RinglNo = $aRingl['IL_NO'];
$RinglKey = $aRingl['IL_KEY'];
if ($RinglNo == 1) {
echo "<a href=\"equip.php?menu=2&use=$aRingl[IL_KEY]&d=$aRingl[IL_CLASS]\"><img src=\"$aRingl[IL_IMAGE]\" height=\"42\" width=\"42\" style=\"border: 3px solid #A23232\"></a>";
}
}?>
<?if($wss<1){echo"<img src=\"img/weap.gif\" width=\"42\" height=\"42\" style=\"border: 3px solid #A23232\"><br/>";}
while ($aWeapon = mysql_fetch_assoc($weapon)) {
$WeaponName = $aWeapon['IL_NAME'];
$WeaponNo = $aWeapon['IL_NO'];
$WeaponKey = $aWeapon['IL_KEY'];
$MIN_DMGA = $aWeapon['MIN_DMG'];
$MAX_DMGA = $aWeapon['MAX_DMG'];
if ($WeaponNo == 1) {
echo "<a href=\"equip.php?menu=2&use=$aWeapon[IL_KEY]&d=$aWeapon[IL_CLASS]\"><a href=\"equip.php?menu=2&use=$aWeapon[IL_KEY]&d=$aWeapon[IL_CLASS]\"><img src=\"$aWeapon[IL_IMAGE]\" width=\"42\" height=\"42\" style=\"border: 3px solid #A23232\"></a><br/>";
}
}?>
<?if($sum<1){echo"<img src=\"img/bag.png\" width=\"42\" height=\"42\" style=\"border: 3px solid #A23232\">";}
while ($aSUM = mysql_fetch_assoc($sumka)) {
$sumkaName = $aSUM['IL_NAME'];
$sumkaNo = $aSUM['IL_NO'];
$sumkaKey = $aSUM['IL_KEY'];
if ($sumkaNo == 1) {
echo "<a href=\"equip.php?menu=2&use=$aSUM[IL_KEY]&d=$aSUM[IL_CLASS]\"><img src=\"$aSUM[IL_IMAGE]\" width=\"42\" height=\"42\" style=\"border: 3px solid #A23232\"></a><br/>";
}
}?><br/>
</td>
<?
if($climg2[class_pers]=='1' AND $climg2[sex]=='1'){$a ="<img src=\"class_img/elf/elfm.png\" width=\"215\" height=\"320\">";}
if($climg2[class_pers]=='1' AND $climg2[sex]=='2'){$a ="<img src=\"class_img/elf/elfw.png\" width=\"215\" height=\"320\">";}
if($climg2[class_pers]=='2' AND $climg2[sex]=='1'){$a ="<img src=\"class_img/elf/hillerm.png\" width=\"215\" height=\"320\">";}
if($climg2[class_pers]=='2' AND $climg2[sex]=='2'){$a ="<img src=\"class_img/elf/hillerw.png\" width=\"215\" height=\"320\">";}
if($climg2[class_pers]=='3' AND $climg2[sex]=='1'){$a ="<img src=\"class_img/insents/assm.png\" width=\"215\" height=\"320\">";}
if($climg2[class_pers]=='3' AND $climg2[sex]=='2'){$a ="<img src=\"class_img/insents/assw.png\" width=\"215\" height=\"320\">";}
if($climg2[class_pers]=='4' AND $climg2[sex]=='1'){$a ="<img src=\"class_img/insents/defm.png\" width=\"215\" height=\"320\">";}
if($climg2[class_pers]=='4' AND $climg2[sex]=='2'){$a ="<img src=\"class_img/insents/defw.png\" width=\"215\" height=\"320\">";}
if($climg2[class_pers]=='5' AND $climg2[sex]=='1'){$a ="<img src=\"class_img/empire/war.png\" width=\"215\" height=\"320\">";}
if($climg2[class_pers]=='5' AND $climg2[sex]=='2'){$a ="<img src=\"class_img/empire/warw.png\" width=\"215\" height=\"320\">";}
if($climg2[class_pers]=='6' AND $climg2[sex]=='1'){$a ="<img src=\"class_img/empire/magm.png\" width=\"215\" height=\"320\">";}
if($climg2[class_pers]=='6' AND $climg2[sex]=='2'){$a ="<img src=\"class_img/empire/magw.png\" width=\"215\" height=\"320\">";}
if($climg2[class_pers]=='7' AND $climg2[sex]=='1'){$a ="<img src=\"class_img/undead/dem.png\" width=\"215\" height=\"320\">";}
if($climg2[class_pers]=='7' AND $climg2[sex]=='2'){$a ="<img src=\"class_img/undead/dew.png\" width=\"215\" height=\"320\">";}
if($climg2[class_pers]=='8' AND $climg2[sex]=='1'){$a ="<img src=\"class_img/undead/necm.png\" width=\"215\" height=\"320\">";}
if($climg2[class_pers]=='8' AND $climg2[sex]=='2'){$a ="<img src=\"class_img/undead/necw.png\" width=\"215\" height=\"320\">";}
?>
<td valign="top" style="text-align:center"><?echo $a?></td>
<td valign="middle" style="text-align:right">
<?if($helmetc<1){echo"<img src=\"img/head.gif\" width=\"42\" height=\"42\" style=\"border: 3px solid #A23232\"><br/>";}
while ($aHelmet = mysql_fetch_assoc($helmet)) {
$HelmetName = $aHelmet['IL_NAME'];
$HelmetNo = $aHelmet['IL_NO'];
$HelmetKey = $aHelmet['IL_KEY'];
if ($HelmetNo == 1) {
echo "<br/><a href=\"equip.php?menu=2&use=$aHelmet[IL_KEY]&d=$aHelmet[IL_CLASS]&idT=$aHelmet[ID_IL]\">
<img src=\"$aHelmet[IL_IMAGE]\" width=\"42\" height=\"42\" style=\"border: 3px solid #A23232\"></a><br/>";
}
}
if($ponojic<1){echo"<img src=\"img/pon.png\" width=\"42\" height=\"42\" style=\"border: 3px solid #A23232\"><br/>";}
while ($aPonoji = mysql_fetch_assoc($ponoji)) {
$PonojiName = $aPonoji['IL_NAME'];
$PonojiNo = $aPonoji['IL_NO'];
$PonojiKey = $aPonoji['IL_KEY'];
if ($PonojiNo == 1) {
echo "<a href=\"equip.php?menu=2&use=$aPonoji[IL_KEY]&d=$aPonoji[IL_CLASS]&idT=$aPonoji[ID_IL]\">
<img src=\"$aPonoji[IL_IMAGE]\" width=\"42\" height=\"42\" style=\"border: 3px solid #A23232\"></a><br/>";
}
}?>
<?if($sapogic<1){echo"<img src=\"img/sap.png\" width=\"42\" height=\"42\" style=\"border: 3px solid #A23232\"><br/>";}
while ($aSapogi = mysql_fetch_assoc($sapogi)) {
$SapogiName = $aSapogi['IL_NAME'];
$SapogiNo = $aSapogi['IL_NO'];
$SapogiKey = $aSapogi['IL_KEY'];
if ($SapogiNo == 1) {
echo "<a href=\"equip.php?menu=2&use=$aSapogi[IL_KEY]&d=$aSapogi[IL_CLASS]&idT=$aSapogi[ID_IL]\">
<img src=\"$aSapogi[IL_IMAGE]\" width=\"42\" height=\"42\" style=\"border: 3px solid #A23232\"></a><br/>";
}
}?>
<?if($shieldc<1){echo"<img src=\"img/weap.gif\" width=\"42\" height=\"42\" style=\"border: 3px solid #A23232\">";}
while ($aSHLD = mysql_fetch_assoc($shield)) {
$SHLDName = $aSHLD['IL_NAME'];
$SHLDNo = $aSHLD['IL_NO'];
$SHLDKey = $aSHLD['IL_KEY'];
if ($SHLDNo == 1) {
echo "<a href=\"equip.php?menu=2&use=$aSHLD[IL_KEY]&d=$aSHLD[IL_CLASS]&idT=$aSHLD[ID_IL]\"><img src=\"$aSHLD[IL_IMAGE]\" width=\"42\" height=\"42\" style=\"border: 3px solid #A23232\"></a>";
}
}?>
<?if($ringrc<1){echo"<img src=\"img/ring.png\" width=\"42\" height=\"42\" style=\"border: 3px solid #A23232\">";}
while ($aringr = mysql_fetch_assoc($ringr)) {
$ringrName = $aringr['IL_NAME'];
$ringrNo = $aringr['IL_NO'];
$ringrKey = $aringr['IL_KEY'];
if ($ringrNo == 1) {
echo "<a href=\"equip.php?menu=2&use=$aringr[IL_KEY]&d=$aringr[IL_CLASS]&idT=$aringr[ID_IL]\"><img src=\"$aringr[IL_IMAGE]\" width=\"42\" height=\"42\" style=\"border: 3px solid #A23232\"></a>";
}
}?>
<?if($arroc<1){echo"<img src=\"img/arr.png\" width=\"42\" height=\"42\" style=\"border: 3px solid #A23232\"><br/>";}
while ($aARRO = mysql_fetch_assoc($arro)) {
$arroName = $aARRO['IL_NAME'];
$arroNo = $aARRO['IL_NO'];
$arroKey = $aARRO['IL_KEY'];
if ($arroNo == 1) {
echo "<a href=\"equip.php?menu=2&use=$aARRO[IL_KEY]&d=$aARRO[IL_CLASS]&idT=$aARRO[ID_IL]\">
<img src=\"$aARRO[IL_IMAGE]\" width=\"42\" height=\"42\" style=\"border: 3px solid #A23232\"></a><br/>";
}
}?></td>
</tr>
</table>
<?
$pr_eqi=mysql_query("SELECT * FROM inv WHERE IL_NO=\"1\" AND ID_USERS=\"$_SESSION[s]\"");
if(mysql_num_rows($pr_eqi)>0){echo"<div class=\"menu\"><li><a href=\"equip.php?all=Is\"><font color=><img src=\"img/bad.png\"> снять все</font></a></li></div>";}
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 ID_USERS=\"$_SESSION[s]\"");
$us_de=mysql_query("UPDATE users SET DEFENCE=\"0\" WHERE NICK=\"$_SESSION[s]\"");
print('<SCRIPT>location.href="equip.php";</SCRIPT>');
}
?>
</div>
<?
include("footer.php");
//одевание вещей
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=='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=='ringl')
{
//создаем запрос на одевание кольцо
$ring_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")
{
//создаем запрос на снятие амулета
$users=mysql_query("SELECT * FROM users WHERE NICK=\"$_SESSION[s]\"");
$users2=mysql_fetch_assoc($users);
$defHmin=mysql_query("SELECT * FROM inv WHERE IL_CLASS='amulet' 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=="rasxodnoe")
{
//создаем запрос на снятие расходного
$armor_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=='ringl')
{
//создаем запрос на снятие кольцо(Л)
$users=mysql_query("SELECT * FROM users WHERE NICK=\"$_SESSION[s]\"");
$users2=mysql_fetch_assoc($users);
$defHmin=mysql_query("SELECT * FROM inv WHERE IL_CLASS='ring1' 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=='ringr')
{
//создаем запрос на снятие кольцо(Л)
$users=mysql_query("SELECT * FROM users WHERE NICK=\"$_SESSION[s]\"");
$users2=mysql_fetch_assoc($users);
$defHmin=mysql_query("SELECT * FROM inv WHERE IL_CLASS='ringr' 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=='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");
include("refresh.php");
?>
</b>
</font>
</body>
</html>