<?
switch ($stat['item_type']) {
case 1: $OBJECTS_SELECT_QUERY = "objects.tip >= 1 AND objects.tip <= 11"; break;
case 2: $OBJECTS_SELECT_QUERY = "objects.tip = 12"; break;
case 3: $OBJECTS_SELECT_QUERY = "objects.tip >= 13 AND objects.tip <= 14"; break;
case 4: $OBJECTS_SELECT_QUERY = "objects.tip >= 13 AND objects.tip <= 14"; break;
case 20: $OBJECTS_SELECT_QUERY = "objects.tip = 20"; break;
case 21: $OBJECTS_SELECT_QUERY = "objects.tip = 21"; break;
default: $OBJECTS_SELECT_QUERY = "objects.tip >= 1 AND objects.tip <= 11"; break;
}
$object=mysql_query("SELECT objects.* FROM objects, slots WHERE objects.user='".$stat['user']."' AND ".$OBJECTS_SELECT_QUERY." AND slots.id=".$stat['id']." AND objects.id NOT IN (slots.1,slots.2,slots.3,slots.4,slots.5,slots.6,slots.7,slots.8,slots.9,slot
s.10,slots.11,slots.12,slots.13,slots.14,slots.15,slots.16,slots.17,slots.18,slo
t
s.19,slots.20,slots.21) ORDER BY time DESC");
if (mysql_num_rows($object)) {
for ($i=0; $i<mysql_num_rows($object); $i++) {
$objects=mysql_fetch_array($object);
$obj_inf=explode("|",$objects['inf']);
$obj_min=explode("|",$objects['min']);
include('inc/main/min_tr.php');
include('inc/main/add.php');
include('inc/main/classes.php');
echo"<table cellspacing=0 cellpadding=3 style='border-style: outset; border-width: 2' border=1 width=100% bgcolor=e2e0e0>
<tr>
<td colspan=2 bgcolor=white style='BORDER-RIGHT: 0px solid'>[b]» ".$obj_inf['1']."[/b]
</td>
<td bgcolor=white align=right style='BORDER-LEFT: 0px solid'>[<img src='i/drop.gif' style='CURSOR: Hand' onclick=\"drop('".$obj_inf['1']."', '".$objects['id']."');\">]";
if (($stat['level'] < $obj_min['0'] || $stat['strength'] < $obj_min['1'] || $stat['dex'] < $obj_min['2'] || $stat['agility'] < $obj_min['3'] || $stat['vitality'] < $obj_min['4'] || $stat['razum'] < $obj_min['5'] || ($stat['rase'] != $obj_min['6'] && $obj_min['6'] != 0 AND $stat['rase'] != 100) || ($obj_min['7'] != 0 && $stat['proff'] != $obj_min['7'])) || $objects['tip'] == 13)
echo"";
else {
if ($objects['tip']==12)
echo"<a href=\"java script:ShowForm('".$obj_inf['1']."','','','','1','".$obj_inf['0']."','".$objects['id']."','0');\">Использовать</a>";
echo"
</td></tr>
<form name=form_".$objects['id'].">
<tr>
<td colspan=3 align=center>
<input name='butt_".$objects['id']."' type=button onclick='window.location=\"main.php?set=edit&onset=".$objects['id']."\"; form_".$objects['id'].".butt_".$objects['id'].".disabled = true' value='Надеть предмет' class=input style='WIDTH: 200px'>";
}
print"</td>
</tr>
</form>
<tr>
<td width=42% align=center valign=center>
[b]Гос. цена: ".$obj_inf['2']." зм.[/b]
";
if ($objects['tip'] != 13) echo"Долговечность: ".$obj_inf['6']." [".$obj_inf['7']."]
";
echo"
Тип предмета: [i]".$tip."[/i]
</td>
<td align=center width=80><img src='i/items/".$obj_inf['0'].".gif' alt='".$obj_inf['1']."' style='CURSOR: Hand' onclick=\"iteminfo('".$objects['id']."');\"></td>
<td width=42% valign=top>
[b][u]Минимальные требования:[/u][/b]
$min_rase$min_level$min_str$min_dex$min_ag$min_vit$min_razum$min_proff
";
if ($hp or $energy or $min or $max or $strength or $dex or $agility or $vitality or $razum or $br1 or $br2 or $br5 or $br3 or $br4 or $krit or $unkrit or $uv or $unuv) echo"[b][u]Действие предмета:[/u][/b]
$hp$energy$min$max$strength$dex$agility$vitality$razum$br1$br2$br3$br4$br5$krit$unkrit$uv$unuv
";
if ($about or $dotime) echo"[b][i]Дополнительная информация:[/i][/b]
$about$dotime";
if (!empty($objects['tribe']))
echo"
<small>[i]Предмет могут одеть только состоящие в клане [/i][b]".$objects['tribe']."[/b]";
if ($obj_inf['3']) echo"[b][i]Выгравирована надпись:[/i][/b]
".$obj_inf['3'];
echo"</td></tr>";
print"</table>
";
}
}
else
echo"<table cellspacing=0 cellpadding=5 style='border-style: outset; border-width: 2' border=1 width=100% bgcolor=e2e0e0>
<TR>
<TD align=center>
<a class=agree>Отдел рюкзака пуст!</a>
</TD>
</TR>
</TABLE>";
?>