Файл: pages/economy/item-stars.php
Строк: 56
<?php
// Physical module map v50.6: public URL stays clean while code lives in /pages.
if (!defined('GAME_ROOT')) define('GAME_ROOT', dirname(__DIR__, 2));
chdir(GAME_ROOT);
if (PHP_SAPI !== 'cli') { $_SERVER['PHP_SELF']='/item-stars.php'; $_SERVER['SCRIPT_NAME']='/item-stars.php'; }
/* Звёзды только для реально надетых вещей. by Метриум (Стэлп) */
include './system/common.php'; include './system/functions.php'; include './system/user.php';
if(!$user){header('Location:/');exit;} $title='Звезды вещей'; include './system/h.php'; $state=game_star_chest_state((int)$user['id']);
?>
<div class="stars-v34"><img class="stars-banner" src="/images/town/hd/smith.jpg" alt="">
<div class="center blue">Открывай сундуки, чтобы получить звездную пыль!<br>Звездная пыль: <b>★ <?=n_f((int)$state['dust'])?></b></div>
<?php $q=db_query('SELECT i.*,it.name,it.quality,it.w FROM `inv` i JOIN `items` it ON it.id=i.item WHERE i.user='.(int)$user['id'].' AND i.equip=1 ORDER BY it.w'); $cnt=0;
while($r=db_fetch_assoc($q)):$cnt++;$st=min(5,(int)($r['stars']??0));$cost=[10,25,50,100,200][$st]??0;$qi=game_item_quality_info((int)$r['quality']);?>
<a class="star-row <?=$qi['class']?>" href="/item/<?=$r['id']?>/">
<span class="star-icon"><img src="/itemImage.php?id=<?=$r['item']?>&smith=<?=$r['smith']?>" alt=""><small><?=n_f((int)$r['bonus'])?>/<?=n_f(game_item_bonus_max((int)$r['quality']))?></small></span>
<span class="star-info"><b style="color:<?=$qi['color']?>"><?=security_html($r['name'])?></b><em><?=$qi['name']?></em><strong><?=str_repeat('★',$st).str_repeat('☆',5-$st)?></strong></span>
<span class="star-action">★ +<?=n_f(max(0,game_stats_sum(game_item_stats($r))))?> к параметрам<br><?=$st>=5?'Максимум':((int)$state['dust']>=$cost?'Прокачать':'Не хватает '.$cost.' пыли')?></span>
</a><?php endwhile;?>
<?php if(!$cnt):?><div class="block_zero grey center">Надетых вещей для прокачки звёзд пока нет.</div><?php endif;?>
</div><?php include './system/f.php'; ?>