Файл: public_html/itemnagrada.php
Строк: 104
<?
include './system/common.php';
include './system/functions.php';
include './system/user.php';
if(!$user) {
header('location: /');
exit;
}
$id = _string(_num($_GET['id']));
$shop = mysql_query('SELECT * FROM `shop` WHERE `id` = "'.$id.'"');
$shop = mysql_fetch_array($shop);
if(!$shop) {
header('location: /');
exit;
}
$item = mysql_query('SELECT * FROM `items` WHERE `id` = "'.$shop['id'].'"');
$item = mysql_fetch_array($item);
$title = $item['name'];
include './system/h.php';
switch($item['quality']) {
case 0:
$bonus = 0;
$quality = 'Простой';
$quality_color = "#908060";
break;
case 1:
$bonus = 5;
$quality = 'Обычный';
$quality_color = "#60c030";
break;
case 2:
$bonus = 10;
$quality = 'Редкий';
$quality_color = "#6090c0";
break;
case 3:
$bonus = 15;
$quality = 'Эпический';
$quality_color = "#c060f0";
break;
case 4:
$bonus = 20;
$quality = 'Легенарный';
$quality_color = "#f06000";
break;
case 5:
$bonus = 50;
$quality = 'Божественный';
$quality_color = "#909090";
break;
case 6:
$bonus = 65;
$quality = 'Сверх Божественный';
$quality_color = "#909090";
break;
}
switch($item['w']) {
case 1:
$w = 'Голова';
break;
case 2:
$w = 'Плечи';
break;
case 3:
$w = 'Торс';
break;
case 4:
$w = 'Перчатки';
break;
case 5:
$w = 'Левая рука';
break;
case 6:
$w = 'Правая рука';
break;
case 7:
$w = 'Ноги';
break;
case 8:
$w = 'Обувь';
break;
}
?>
<div class="ribbon mb2"><div class="rl"><div class="rr">
<?=$title?></div></div></div>
<div class="bdr cnr bg_blue mb2"><div class="wr1"><div class="wr2"><div class="wr3"><div class="wr4"><div class="wr5"><div class="wr6"><div class="wr7"><div class="wr8">
<div class="fl ml5 mt5 mr5">
<img class="item_icon" src="/itemImage.php?id=<?=$item['id']?>" alt='*'/>
</div>
<div class="mt5 mb5 sh small"><?=$item['name']?></div>
<div class="mt5 mb5 sh small">
<img class="icon" src="/images/icon/quality/<?=$item['quality']?>.png" /><font color='<?=$quality_color?>'><?=$quality?> [<?=$shop['bonus']?>/<?=$bonus?>]</font><?=$w?><br /></div>
<div class="mt5 mb5 sh small">
Мастерство: <img class="icon" src="/images/icon/skill.png" /><font color='#<?=($item['skill'] > $user['skill'] ? 'c06060':'ffffff')?>'><?=$item['skill']?></font></div>
<div class="clb"></div>
</div></div></div></div></div></div></div></div></div>
<?
$equip_item = mysql_query('SELECT * FROM `inv` WHERE `id` = "'.$user['w_'.$item['w']].'"');
$equip_item = mysql_fetch_array($equip_item);
$diff = 0;
?>
<div class="bdr cnr mb2"><div class="wr1"><div class="wr2"><div class="wr3"><div class="wr4"><div class="wr5"><div class="wr6"><div class="wr7"><div class="wr8">
<div class="ml5 mt5 mb5 sh small">
<img class="icon" src="/images/icon/str.png" /> Сила: <font color="
<?if($shop['_str'] > $equip_item['_str']) {
$diff += $shop['_str'] - $equip_item['_str'];
?>#3c3<? }else{ ?>#c66<? }?> "><?=$shop['_str']?></font><br/>
<img class="icon" src="/images/icon/vit.png" /> Жизнь: <font color="
<?if($shop['_vit'] > $equip_item['_vit']) {
$diff += $shop['_vit'] - $equip_item['_vit'];
?>#3c3<? }else{ ?>#c66<? }?> "> <?=$shop['_vit']?></font> <br/>
<img class="icon" src="/images/icon/agi.png" /> Удача: <font color="
<?
if($shop['_agi'] > $equip_item['_agi']) {
$diff += $shop['_agi'] - $equip_item['_agi'];
?>#3c3<?
}
else
{
?>#c66<?
}
?>"><?=$shop['_agi']?></font><br/>
<img class="icon" src="/images/icon/def.png" /> Броня: <font color="
<?
if($shop['_def'] > $equip_item['_def']) {
$diff += $shop['_def'] - $equip_item['_def'];
?>#3c3<?
}
else
{
?>#c66<?
}
?>
"><?=$shop['_def']?></font><br/>
<?
if($diff>=1){
?>
<img class="icon" src='/images/icon/quest.png' alt='*'/> <font color='#3c3'>Лучше +<?=$diff?></font></div>
<?}
else{?></div><?}?>
<div class="clb"></div>
</div></div></div></div></div></div></div></div></div>
<?
if($equip_item) {
$i_equip_item = mysql_query('SELECT * FROM `items` WHERE `id` = "'.$equip_item['item'].'"');
$i_equip_item = mysql_fetch_array($i_equip_item);
switch($i_equip_item['quality']) {
case 0:
$bonus = 0;
$quality = 'Простой';
$quality_color = "#908060";
break;
case 1:
$bonus = 5;
$quality = 'Обычный';
$quality_color = "#60c030";
break;
case 2:
$bonus = 10;
$quality = 'Редкий';
$quality_color = "#6090c0";
break;
case 3:
$bonus = 15;
$quality = 'Эпический';
$quality_color = "#c060f0";
break;
case 4:
$bonus = 20;
$quality = 'Легенарный';
$quality_color = "#f06000";
break;
case 5:
$bonus = 50;
$quality = 'Божественный';
$quality_color = "#909090";
break;
case 6:
$bonus = 65;
$quality = 'Сверх Божественный';
$quality_color = "#909090";
break;
}
switch($i_equip_item['w']) {
case 1:
$w = 'Голова';
break;
case 2:
$w = 'Плечи';
break;
case 3:
$w = 'Торс';
break;
case 4:
$w = 'Перчатки';
break;
case 5:
$w = 'Левая рука';
break;
case 6:
$w = 'Правая рука';
break;
case 7:
$w = 'Ноги';
break;
case 8:
$w = 'Обувь';
break;
}
?>
<div class="hr_g mb2"><div><div></div></div></div>
<div class="mt5 mb5 large cntr">На вас надето</div>
<div class="hr_g mb2"><div><div></div></div></div>
<div class="bdr cnr bg_blue mb2"><div class="wr1"><div class="wr2"><div class="wr3"><div class="wr4"><div class="wr5"><div class="wr6"><div class="wr7"><div class="wr8">
<div class="fl ml5 mt5 mr5">
<img class="item_icon" src="/itemImage.php?id=<?=$equip_item['item']?>" />
</div>
<div class="mt5 mb5 sh small">
<?=$i_equip_item['name']?></div>
<div class="mt5 mb5 sh small">
<img class="icon" src="/images/icon/quality/<?=$i_equip_item['quality']?>.png" />
<font color='<?=$quality_color?>'><?=$quality?> [<?=$equip_item['bonus']?>/<?=$bonus?>]</font>, <?=$w?>
</div>
<div class="mt5 mb5 sh small">
Мастерство:
<img src="/images/icon/skill.png" alt=""/><font color='#<?=($i_equip_item['skill'] > $user['skill'] ? 'c06060':'ffffff')?>'><?=$i_equip_item['skill']?></font>
</div>
<div class="clb"></div>
</div></div></div></div></div></div></div></div></div>
<div class="bdr cnr mb2"><div class="wr1"><div class="wr2"><div class="wr3"><div class="wr4"><div class="wr5"><div class="wr6"><div class="wr7"><div class="wr8">
<div class="ml5 mt5 mb5 sh small">
<img class="icon" src="/images/icon/str.png" /> Сила: <?=$equip_item['_str']?> <br/>
<img class="icon" src="/images/icon/vit.png" /> Жизнь: <?=$equip_item['_vit']?><br/>
<img class="icon" src="/images/icon/agi.png" /> Удача: <?=$equip_item['_agi']?> <br/>
<img class="icon" src="/images/icon/def.png" /> Броня: <?=$equip_item['_def']?> </div>
<div class="clb"></div>
</div></div></div></div></div></div></div></div></div>
<?
}
?>
<div class="cntr mb10"><a href="/mod/instalscript/metro/instalscript-bymas?instalscript=info-metro&id=<?=$item['metro_id']?>">Вернуться</a></div>
<?
include './system/f.php';
?>