<?php
include 'system/bd.php';
include 'system/cook.php';
include ("system/gzip.php");
if(isset($_SESSION['auth']) && $_SESSION['auth']==1){
include 'system/head.php';

echo "<div class='title'>Снаряжение </div>";

echo'<div class="empty_block">';



$req = mysql_query("SELECT `name`,`id`,`images`,`quality`,`hone` FROM `item` WHERE `user` = '$user[id]' and `wearing`='yes' and `tip`='head'");
$avto=mysql_num_rows($req);
if($avto==1){
$mag = mysql_fetch_array($req);
$w=explode("*",$mag[name]);

if($mag[quality] == '0'){
$quality= Хлам;
$hone = 5;}
if($mag[quality] == '1'){
$quality= Обычный;
$hone = 10;}
if($mag[quality] == '2'){
$quality= Необычный;
$hone = 15;}
if($mag[quality] == '3'){
$quality= Редкий;
$hone = 25;}
if($mag[quality] == '4'){
$quality= Эпический;
$hone = 30;}
if($mag[quality] == '5'){
$quality= Легендарный;
$hone = 40;}
if($mag[quality] == '6'){
$quality= Мифический;
$hone = 50;}

echo"
 <table>
                            <tbody><tr>
                    <td class='b40px'>
<img src='/img/items/head/$mag[images].png'>
</td><td> 
<img src='img/star/$mag[quality].png'>
<a href='inventar.php?mod=info_pers&id=$mag[id]'> <font color=LightCoral>$mag[name]</font> </a> [$mag[hone]/$hone]
</br> $quality 
<a href='inventar.php?mod=wearing_no&id=$mag[id]&tip=head'> <img src='img/icon/down.png' style='float: right;'> </a>

</td></tr>
</tbody></table>";

}else{
echo" <img src='/img/items/head/0.png'> Шапка
</br>";
}
              /////////
$req = mysql_query("SELECT `id`,`name`,`images`,`quality`,`hone` FROM `item` WHERE `user` = '$user[id]' and `wearing`='yes' and `tip`='shoulder'");
$avto=mysql_num_rows($req);
if($avto==1){
$mag = mysql_fetch_array($req);
$w=explode("*",$mag[name]);

if($mag[quality] == '0'){
$quality= Хлам;
$hone = 5;}
if($mag[quality] == '1'){
$quality= Обычный;
$hone = 10;}
if($mag[quality] == '2'){
$quality= Необычный;
$hone = 15;}
if($mag[quality] == '3'){
$quality= Редкий;
$hone = 25;}
if($mag[quality] == '4'){
$quality= Эпический;
$hone = 30;}
if($mag[quality] == '5'){
$quality= Легендарный;
$hone = 40;}
if($mag[quality] == '6'){
$quality= Мифический;
$hone = 50;}

echo" <table>
                            <tbody><tr>
                    <td class='b40px'>
<img src='/img/items/shoulder/$mag[images].png'>
</td><td> 
<img src='img/star/$mag[quality].png'>
<a href='inventar.php?mod=info_pers&id=$mag[id]'><font color=LightCoral>$mag[name]</font></a> [$mag[hone]/$hone]
</br> $quality
<a href='inventar.php?mod=wearing_no&id=$mag[id]&tip=shoulder'> <img src='img/icon/down.png' style='float: right;'> </a>
</td></tr>
</tbody></table>";
}else{
echo" <img src='/img/items/shoulder/0.png'> Наплечник
</br>";
}
                  //////////
$req = mysql_query("SELECT `id`,`name`,`images`,`quality`,`hone` FROM `item` WHERE `user` = '$user[id]' and `tip`='body' and `wearing`='yes'");
$avto=mysql_num_rows($req);
if($avto==1){
$mag = mysql_fetch_array($req);
$w=explode("*",$mag[name]);

if($mag[quality] == '0'){
$quality= Хлам;
$hone = 5;}
if($mag[quality] == '1'){
$quality= Обычный;
$hone = 10;}
if($mag[quality] == '2'){
$quality= Необычный;
$hone = 15;}
if($mag[quality] == '3'){
$quality= Редкий;
$hone = 25;}
if($mag[quality] == '4'){
$quality= Эпический;
$hone = 30;}
if($mag[quality] == '5'){
$quality= Легендарный;
$hone = 40;}
if($mag[quality] == '6'){
$quality= Мифический;
$hone = 50;}

echo" <table>
                            <tbody><tr>
                    <td class='b40px'>
<img src='/img/items/body/$mag[images].png'>
</td><td> 
<img src='img/star/$mag[quality].png'>
<a href='inventar.php?mod=info_pers&id=$mag[id]'><font color=LightCoral>$mag[name]</font></a> [$mag[hone]/$hone]
</br> $quality
<a href='inventar.php?mod=wearing_no&id=$mag[id]&tip=body'> <img src='img/icon/down.png' style='float: right;'> </a>
</td></tr>
</tbody></table>";
}else{
echo" <img src='/img/items/body/0.png'> Тело
</br>";
}

$req = mysql_query("SELECT `id`,`name`,`images`,`quality`,`hone` FROM `item` WHERE `user` = '$user[id]' and `wearing`='yes' and `tip`='weapon'");
$avto=mysql_num_rows($req);
if($avto==1){
$mag = mysql_fetch_array($req);
$w=explode("*",$mag[name]);

if($mag[quality] == '0'){
$quality= Хлам;
$hone = 5;}
if($mag[quality] == '1'){
$quality= Обычный;
$hone = 10;}
if($mag[quality] == '2'){
$quality= Необычный;
$hone = 15;}
if($mag[quality] == '3'){
$quality= Редкий;
$hone = 25;}
if($mag[quality] == '4'){
$quality= Эпический;
$hone = 30;}
if($mag[quality] == '5'){
$quality= Легендарный;
$hone = 40;}
if($mag[quality] == '6'){
$quality= Мифический;
$hone = 50;}

echo" <table>
                            <tbody><tr>
                    <td class='b40px'>
<img src='/img/items/weapon/$mag[images].png'>
</td><td> 
<img src='img/star/$mag[quality].png'>
<a href='inventar.php?mod=info_pers&id=$mag[id]'><font color=LightCoral>$mag[name]</font></a> [$mag[hone]/25]
</br> $quality
<a href='inventar.php?mod=wearing_no&id=$mag[id]&tip=weapon'> <img src='img/icon/down.png' style='float: right;'> </a>
</td></tr>
</tbody></table>";

}else{
echo" <img src='/img/items/weapon/0.png'> Оружие 
</br>";
}
              ////////////
$req = mysql_query("SELECT `id`,`name`,`images`,`quality`,`hone` FROM `item` WHERE `user` = '$user[id]' and `tip`='shield' and `wearing`='yes'");
$avto=mysql_num_rows($req);
if($avto==1){
$mag = mysql_fetch_array($req);
$w=explode("*",$mag[name]);

if($mag[quality] == '0'){
$quality= Хлам;
$hone = 5;}
if($mag[quality] == '1'){
$quality= Обычный;
$hone = 10;}
if($mag[quality] == '2'){
$quality= Необычный;
$hone = 15;}
if($mag[quality] == '3'){
$quality= Редкий;
$hone = 25;}
if($mag[quality] == '4'){
$quality= Эпический;
$hone = 30;}
if($mag[quality] == '5'){
$quality= Легендарный;
$hone = 40;}
if($mag[quality] == '6'){
$quality= Мифический;
$hone = 50;}

echo" <table>
                            <tbody><tr>
                    <td class='b40px'>
<img src='/img/items/shield/$mag[images].png'>
</td><td> 
<img src='img/star/$mag[quality].png'>
<a href='inventar.php?mod=info_pers&id=$mag[id]'><font color=LightCoral>$mag[name]</font></a> [$mag[hone]/$hone]
</br> $quality
<a href='inventar.php?mod=wearing_no&id=$mag[id]&tip=shield'> <img src='img/icon/down.png' style='float: right;'> </a>
</td></tr>
</tbody></table>";
}else{
echo" <img src='/img/items/shield/0.png'> Щит";
}
echo"</div>";
              ///////////

}else{
header ("Location: index.php"); exit;
}
include 'system/foot.php';
?>
