Файл: inv.php
Строк: 269
<?
define('PROTECTOR', 1);
include('files/db.php');
include($path.'files/auth.php');
if ($user_id==0){
header('location: index.php');exit;
}
$textl='Инвентарь';
include($path.'files/core.php');
if(isset($_GET['sn']))
{
$mobs=mysql_query("SELECT * FROM `item` WHERE `id`='".$_GET['id']."' and `status`='on' and `usr`='".$udata['id']."'");
$rows=mysql_num_rows($mobs);
if($rows==0)
{
header('location: ?');exit;
}
else
{
$sfer=mysql_fetch_array($mobs);
if($sfer['tip']!='idol' and $sfer['tip']!='idol2')
{
mysql_query("UPDATE `item` SET `status`='off' WHERE `id`='".$sfer['id']."'");
}
else
{
mysql_query("UPDATE `item` SET `status`='off', `tip`='idol' WHERE `id`='".$sfer['id']."'");
}
mysql_query("UPDATE `users_runes` SET `status`='1' WHERE `item`='".$sfer['id']."' and `usr`='".$udata['id']."'");
header('location: ?');exit;
}
}
include($path.'files/head.php');
include($path.'files/zag.php');
echo '<table width=100%>
<tr>
<td width=35%>
<a href=game.php><div style="background: #882222; border-radius: 7px 0 0 7px" class="m p bts bbs brs bls" align=center>Главная</div></a>
</td><td>';
echo '<a href=?><div class="line bts brs bls bbs p m" style="border-radius: 0 7px 7px 0">
<font color=#ffffff>Амуниция
</font>
</div></a></td></tr></table>';
echo '<div class="bat bts brs bls bbs p">';
echo '<table width=100%><tr>';
$mobs=mysql_query("SELECT * FROM `item` WHERE `tip`='zarad' and `status`='on' and `usr`='".$udata['id']."'");
$rows=mysql_num_rows($mobs);
if($rows==0)
{
echo '<td width=36px><img src=img/arm/empty.jpg></td>
<td>Пусто<br><font color=#999999>украшение</font></td>
';
}
else
{
$avto=mysql_fetch_array($mobs);
echo '<td width=36px><img src=img/arm/zarad/'.$avto['img'].'.jpg></td>';
$kac='p28';
echo '<td><img src=img/main/'.$kac.'.png> <a href=info_arm.php?id='.$avto['id'].'>'.$avto['name'].'</a>
<img src=img/main/p10.png>'.$avto['lvl'].'';
if($avto['rang']>0)
{
echo'<img src=img/main/p36.png>'.$avto['rang'].'';
}
echo'
<br>
<a href=?sn&id='.$avto['id'].'><font color=#ff0000>снять</font></a>
</td>';
}
$mobs=mysql_query("SELECT * FROM `item` WHERE `tip`='golova' and `status`='on' and `usr`='".$udata['id']."'");
$rows=mysql_num_rows($mobs);
if($rows==0)
{
echo '<td width=36px><img src=img/arm/empty.jpg></td>
<td>Пусто<br><font color=#999999>шлем</font></td>
';
}
else
{
$avto=mysql_fetch_array($mobs);
if($avto['up']>0)
{
$up="<font color=#ffffff>+".$avto['up']."</font>";
}
else
{
$up='';
}
echo '<td width=36px><img src=img/arm/golova/'.$avto['img'].'.jpg></td>';
$kac='p28';
echo '<td><img src=img/main/'.$kac.'.png> <a href=info_arm.php?id='.$avto['id'].'>'.$avto['name'].'</a>'.$up.'
<img src=img/main/p10.png>'.$avto['lvl'].'';
if($avto['rang']>0)
{
echo'<img src=img/main/p36.png>'.$avto['rang'].'';
}
echo'<br>
<a href=?sn&id='.$avto['id'].'><font color=#ff0000>снять</font></a>
</td>';
}
echo '</tr>
<tr>';
$mobs=mysql_query("SELECT * FROM `item` WHERE `tip`='amylet' and `status`='on' and `usr`='".$udata['id']."'");
$rows=mysql_num_rows($mobs);
if($rows==0)
{
echo '<td><img src=img/arm/empty.jpg></td>
<td>Пусто<br><font color=#999999>амулет</font></td>
';
}
else
{
$avto=mysql_fetch_array($mobs);
if($avto['up']>0)
{
$up="<font color=#ffffff>+".$avto['up']."</font>";
}
else
{
$up='';
}
echo '<td><img src=img/arm/amylet/'.$avto['img'].'.jpg></td>';
$kac='p28';
echo '<td><img src=img/main/'.$kac.'.png> <a href=info_arm.php?id='.$avto['id'].'>'.$avto['name'].'</a>'.$up.'
<img src=img/main/p10.png>'.$avto['lvl'].'';
if($avto['rang']>0)
{
echo'<img src=img/main/p36.png>'.$avto['rang'].'';
}
echo'
<br>
<a href=?sn&id='.$avto['id'].'><font color=#ff0000>снять</font></a>
</td>';
}
$mobs=mysql_query("SELECT * FROM `item` WHERE `tip`='wearop' and `status`='on' and `usr`='".$udata['id']."'");
$rows=mysql_num_rows($mobs);
if($rows==0)
{
echo '<td><img src=img/arm/empty.jpg></td>
<td>Пусто<br><font color=#999999>оружие</font></td>
';
}
else
{
$avto=mysql_fetch_array($mobs);
if($avto['up']>0)
{
$up="<font color=#ffffff>+".$avto['up']."</font>";
}
else
{
$up='';
}
echo '<td><img src=img/arm/wearop/'.$avto['img'].'.jpg></td>';
$kac='p28';
echo '<td><img src=img/main/'.$kac.'.png> <a href=info_arm.php?id='.$avto['id'].'>'.$avto['name'].'</a>'.$up.'
<img src=img/main/p10.png>'.$avto['lvl'].'';
if($avto['rang']>0)
{
echo'<img src=img/main/p36.png>'.$avto['rang'].'';
}
echo'
<br>
<a href=?sn&id='.$avto['id'].'><font color=#ff0000>снять</font></a>
</td>';
}
echo '</tr><tr>';
$mobs=mysql_query("SELECT * FROM `item` WHERE `tip`='telo' and `status`='on' and `usr`='".$udata['id']."'");
$rows=mysql_num_rows($mobs);
if($rows==0)
{
echo '<td><img src=img/arm/empty.jpg></td>
<td>Пусто<br><font color=#999999>тело</font></td>
';
}
else
{
$avto=mysql_fetch_array($mobs);
if($avto['up']>0)
{
$up="<font color=#ffffff>+".$avto['up']."</font>";
}
else
{
$up='';
}
echo '<td><img src=img/arm/telo/'.$avto['img'].'.jpg></td>';
$kac='p28';
echo '<td><img src=img/main/'.$kac.'.png> <a href=info_arm.php?id='.$avto['id'].'>'.$avto['name'].'</a>'.$up.'
<img src=img/main/p10.png>'.$avto['lvl'].'';
if($avto['rang']>0)
{
echo'<img src=img/main/p36.png>'.$avto['rang'].'';
}
echo'
<br>
<a href=?sn&id='.$avto['id'].'><font color=#ff0000>снять</font></a>
</td>';
}
$mobs=mysql_query("SELECT * FROM `item` WHERE `tip`='boots' and `status`='on' and `usr`='".$udata['id']."'");
$rows=mysql_num_rows($mobs);
if($rows==0)
{
echo '<td><img src=img/arm/empty.jpg></td>
<td>Пусто<br><font color=#999999>ботинки</font></td>
';
}
else
{
$avto=mysql_fetch_array($mobs);
if($avto['up']>0)
{
$up="<font color=#ffffff>+".$avto['up']."</font>";
}
else
{
$up='';
}
echo '<td><img src=img/arm/boots/'.$avto['img'].'.jpg></td>';
$kac='p28';
echo '<td><img src=img/main/'.$kac.'.png> <a href=info_arm.php?id='.$avto['id'].'>'.$avto['name'].'</a>'.$up.'
<img src=img/main/p10.png>'.$avto['lvl'].'';
if($avto['rang']>0)
{
echo'<img src=img/main/p36.png>'.$avto['rang'].'';
}
echo'
<br>
<a href=?sn&id='.$avto['id'].'><font color=#ff0000>снять</font></a>
</td>';
}
echo '</tr><tr>';
$mobs=mysql_query("SELECT * FROM `item` WHERE `tip`='idol' and `status`='on' and `usr`='".$udata['id']."'");
$rows=mysql_num_rows($mobs);
if($rows==0)
{
echo '<td><img src=img/arm/empty.jpg></td>
<td>Пусто<br><font color=#999999>реликвия</font></td>
';
}
else
{
$avto=mysql_fetch_array($mobs);
echo '<td><img src=img/arm/idol/'.$avto['img'].'.jpg></td>';
$kac='p28';
echo '<td><img src=img/main/'.$kac.'.png> <a href=info_arm.php?id='.$avto['id'].'>'.$avto['name'].'</a>
<img src=img/main/p10.png>'.$avto['lvl'].'';
if($avto['rang']>0)
{
echo'<img src=img/main/p36.png>'.$avto['rang'].'';
}
echo'
<br>
<a href=?sn&id='.$avto['id'].'><font color=#ff0000>снять</font></a>
</td>';
}
$mobs=mysql_query("SELECT * FROM `item` WHERE `tip`='idol2' and `status`='on' and `usr`='".$udata['id']."'");
$rows=mysql_num_rows($mobs);
if($rows==0)
{
echo '<td><img src=img/arm/empty.jpg></td>
<td>Пусто<br><font color=#999999>реликвия</font></td>
';
}
else
{
$avto=mysql_fetch_array($mobs);
echo '<td><img src=img/arm/idol/'.$avto['img'].'.jpg></td>';
$kac='p28';
echo '<td><img src=img/main/'.$kac.'.png> <a href=info_arm.php?id='.$avto['id'].'>'.$avto['name'].'</a>
<img src=img/main/p10.png>'.$avto['lvl'].'';
if($avto['rang']>0)
{
echo'<img src=img/main/p36.png>'.$avto['rang'].'';
}
echo'
<br>
<a href=?sn&id='.$avto['id'].'><font color=#ff0000>снять</font></a>
</td>';
}
echo '</tr><tr>';
$mobs=mysql_query("SELECT * FROM `item` WHERE `tip`='medal' and `status`='on' and `usr`='".$udata['id']."'");
$rows=mysql_num_rows($mobs);
if($rows==0)
{
echo '<td><img src=img/arm/empty.jpg></td>
<td>Пусто<br><font color=#999999>медаль</font></td>
';
}
else
{
$avto=mysql_fetch_array($mobs);
echo '<td><img src=img/arm/medal/'.$avto['img'].'.jpg></td>';
$kac='p28';
echo '<td><img src=img/main/'.$kac.'.png> <a href=info_arm.php?id='.$avto['id'].'>'.$avto['name'].'</a>
<img src=img/main/p10.png>'.$avto['lvl'].'';
if($avto['rang']>0)
{
echo'<img src=img/main/p36.png>'.$avto['rang'].'';
}
echo'
<br>
<a href=?sn&id='.$avto['id'].'><font color=#ff0000>снять</font></a>
</td>';
}
$mobs=mysql_query("SELECT * FROM `item` WHERE `tip`='vital' and `status`='on' and `usr`='".$udata['id']."'");
$rows=mysql_num_rows($mobs);
if($rows==0)
{
echo '<td><img src=img/arm/empty.jpg></td>
<td>Пусто<br><font color=#999999>витал</font></td>
';
}
else
{
$avto=mysql_fetch_array($mobs);
echo '<td><img src=img/arm/vital/'.$avto['img'].'.jpg></td>';
$kac='p28';
echo '<td><img src=img/main/'.$kac.'.png> <a href=info_arm.php?id='.$avto['id'].'>'.$avto['name'].'</a>
<img src=img/main/p10.png>'.$avto['lvl'].'';
if($avto['rang']>0)
{
echo'<img src=img/main/p36.png>'.$avto['rang'].'';
}
echo'
<br>
<a href=?sn&id='.$avto['id'].'><font color=#ff0000>снять</font></a>
</td>';
}
echo '</tr><tr>';
$mobs=mysql_query("SELECT * FROM `item` WHERE `tip`='napl' and `status`='on' and `usr`='".$udata['id']."'");
$rows=mysql_num_rows($mobs);
if($rows==0)
{
echo '<td><img src=img/arm/empty.jpg></td>
<td>Пусто<br><font color=#999999>наплечник</font></td>
';
}
else
{
$avto=mysql_fetch_array($mobs);
echo '<td><img src=img/arm/napl/'.$avto['img'].'.jpg></td>';
$kac='p28';
echo '<td><img src=img/main/'.$kac.'.png> <a href=info_arm.php?id='.$avto['id'].'>'.$avto['name'].'</a>
<img src=img/main/p10.png>'.$avto['lvl'].'';
if($avto['rang']>0)
{
echo'<img src=img/main/p36.png>'.$avto['rang'].'';
}
echo'
<br>
<a href=?sn&id='.$avto['id'].'><font color=#ff0000>снять</font></a>
</td>';
}
$mobs=mysql_query("SELECT * FROM `item` WHERE `tip`='orden' and `status`='on' and `usr`='".$udata['id']."'");
$rows=mysql_num_rows($mobs);
if($rows==0)
{
echo '<td><img src=img/arm/empty.jpg></td>
<td>Пусто<br><font color=#999999>знамя</font></td>
';
}
else
{
$avto=mysql_fetch_array($mobs);
echo '<td><img src=img/arm/orden/1.jpg></td>';
$kac='p28';
echo '<td><img src=img/main/'.$kac.'.png> <a href=info_arm.php?id='.$avto['id'].'>'.$avto['name'].'</a>
<img src=img/main/p10.png>'.$avto['lvl'].'';
if($avto['rang']>0)
{
echo'<img src=img/main/p36.png>'.$avto['rang'].'';
}
echo'
<br>
<a href=?sn&id='.$avto['id'].'><font color=#ff0000>снять</font></a>
</td>';
}
echo '</tr></table>';
echo '</div></div>';
include('files/down.php');
?>