Файл: shop_item.php
Строк: 89
<?php
include_once ('./core/base.php');
falseauth();
$id=fl($_GET['id']);
$item = $base -> query('SELECT * FROM `items` WHERE `id` = "'.$id.'" LIMIT 1') -> fetch_assoc();
$header = ''.$item['name'].'';
include_once ('./core/head.php');
if($item != 0 AND $item['what'] != 'resource') {
echo '<div class="b"><div class="title">'.$item['name'].'</div>';
echo ''.just_shop_item($item['id']).'';
if($item['p_att']>0) $item['p_att']='<font color="#30C530">+'.$item['p_att'].'</font>';
if($item['p_def']>0) $item['p_def']='<font color="#30C530">+'.$item['p_def'].'</font>';
if($item['m_att']>0) $item['m_att']='<font color="#30C530">+'.$item['m_att'].'</font>';
if($item['m_def']>0) $item['m_def']='<font color="#30C530">+'.$item['m_def'].'</font>';
if($item['endurance']>0) $item['endurance']='<font color="#30C530">+'.$item['endurance'].'</font>';
if($item['intellect']>0) $item['intellect']='<font color="#30C530">+'.$item['intellect'].'</font>';
if($item['agility']>0) $item['agility']='<font color="#30C530">+'.$item['agility'].'</font>';
if($item['skill']>0) $item['skill']='<font color="#30C530">+'.$item['skill'].'</font>';
echo '<div class="title">Характеристики</div>';
echo '<table class="table table-common" style="margin-top: 5px; border-collapse: collapse; text-align: left;">';
echo '<tr><td><img src="/images/icons/p_att.png"> Физ. Атака</td><td><center>'.$item['p_att'].'</center></td><td><img src="/images/icons/endurance.png"> Выносливость</td><td><center>'.$item['endurance'].'</center></td></tr>';
echo '<tr><td><img src="/images/icons/p_def.png"> Физ. Защита</td><td><center>'.$item['p_def'].'</center></td><td><img src="/images/icons/intellect.png"> Интеллект</td><td><center>'.$item['intellect'].'</center></td></tr>';
echo '<tr><td><img src="/images/icons/m_att.png"> Маг. Атака</td><td><center>'.$item['m_att'].'</center></td><td><img src="/images/icons/agility.png"> Ловкость</td><td><center>'.$item['agility'].'</center></td></tr>';
echo '<tr><td><img src="/images/icons/m_def.png"> Маг. Защита</td><td><center>'.$item['m_def'].'</center></td><td><img src="/images/icons/skill.png"> Мастерство</td><td><center>'.$item['skill'].'</center></td></tr>';
if($item['attack_type'] == 'p_att') $att_type = 'Физическая';
elseif($item['attack_type'] == 'm_att') $att_type = 'Магическая';
if($item['attack_type'] != 'none') echo '<tr><td colspan="2"><img src="/images/icons/sword.png"> Тип атаки</td><td colspan="2"><center><img src="/images/icons/'.$item['attack_type'].'.png">'.$att_type.'</center></td></tr>';
echo '</table>';
echo '<br/><a class="btn" href="javascript:history.go(-1)"><img src="/images/icons/back.png"> Назад</a>';
echo '</div>';
}else{
header('Location: /city/');
exit;
}
include_once ('./core/foot.php');
?>