battles/views/shop.php
Ivor Barhansky 0398425205 Code smell.
2022-12-17 03:03:56 +02:00

54 lines
3.0 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
# Date: 19.02.2022 (3:54)
use Battles\{Item, InventoryItem, Shop, ShopItem, User, Template};
Template::header('Магазин');
?>
<link href='/css/shop.css' rel='stylesheet'>
<script src="/js/main.js"></script>
<h1>Государственный магазин</h1>
<a href=# onclick=hrefToFrame('city.php?cp')> ← выйти на Центральную площадь</a>
<div class="status"><?= ShopItem::$status ?></div>
<div class="row shop">
<div class="left column">
<h3><?= Shop::id(Shop::GENERAL_SHOP)->getCategoryName() ?></h3>
<div>
<?php if (Shop::id(Shop::GENERAL_SHOP)->categoryType === -1): ?>
Вы можете продать ваши предметы за сущие копейки.
<?php endif; ?>
</div>
<!--Магазин-->
<?= Shop::id(Shop::GENERAL_SHOP)->getItemsList() ?>
</div>
<div class="right column">
<div>
<strong>
Масса всех вещей: <?= InventoryItem::getWeightData() ?> <br>
Деньги: <?= User::getInstance()->money()->get() ?>.
</strong>
</div>
<hr>
<div>Отделы магазина</div>
<a class="waretype" href="?otdel=<?= Item::TYPE_WEAPON ?>&rnd=<?= mt_rand() ?>">Оружие</a>
<a class="waretype" href="?otdel=<?= Item::TYPE_HELMET ?>&rnd=<?= mt_rand() ?>">Шлемы</a>
<a class="waretype" href="?otdel=<?= Item::TYPE_ARMOR ?>&rnd=<?= mt_rand() ?>">Броня</a>
<a class="waretype" href="?otdel=<?= Item::TYPE_LEGS ?>&rnd=<?= mt_rand() ?>">Поножи</a>
<a class="waretype" href="?otdel=<?= Item::TYPE_BOOTS ?>&rnd=<?= mt_rand() ?>">Сапоги</a>
<a class="waretype" href="?otdel=<?= Item::TYPE_GLOVES ?>&rnd=<?= mt_rand() ?>">Перчатки</a>
<a class="waretype" href="?otdel=<?= Item::TYPE_SHIELD ?>&rnd=<?= mt_rand() ?>">Щиты</a>
<a class="waretype" href="?otdel=<?= Item::TYPE_BELT ?>&rnd=<?= mt_rand() ?>">Пояса</a>
<a class="waretype" href="?otdel=<?= Item::TYPE_RING ?>&rnd=<?= mt_rand() ?>">Кольца</a>
<a class="waretype" href="?otdel=<?= Item::TYPE_AMULET ?>&rnd=<?= mt_rand() ?>">Амулеты</a>
<a class="waretype" href="?otdel=<?= Item::TYPE_CONSUMABLE ?>&rnd=<?= mt_rand() ?>">Расходники</a>
<a class="waretype" href="?otdel=<?= Item::TYPE_OTHER ?>&rnd=<?= mt_rand() ?>">Разное</a>
<a class="waretype alltypes" href="?rnd=<?= mt_rand() ?>">Все товары</a>
<a class="waretype sell" href="?otdel=sale&rnd=<?= mt_rand() ?>">Продать вещи</a>
<div id="hint3" class="ahint"></div>
<div>
<small>Если у вас не хватит денег на покупку, деньги будут автоматически сняты с вашего банковского
счёта
с вычетом банковской комиссии за услуги.</small>
</div>
</div>
</div>