Файл: public_html/modules/bag.php
Строк: 21
<?php
$root = $_SERVER['DOCUMENT_ROOT'];
include_once ($root.'/core/base.php');
falseauth();
$header = "Рюкзак";
include_once ($root.'/core/head.php');
$resource_types = ['res1' => 'Азурит', 'res2' => 'Аметист', 'res3' => 'Гелиодор', 'res4' => 'Родонит'];
$resources = $db->query("SELECT * FROM `resources` WHERE `user` = '".$u['id']."'");
$count = 0;
$potionStatus = 0;
while($res = $resources->fetch_object())
{
if($res->count > 0)
{
echo '<div class="b"><img src="/images/resources/'.$res->resource_type.'.png" width="24" heigth="24" align="middle"> '.$resource_types[$res->resource_type].' - ' .$res->count.' шт.</div>';
}
if($res->count >= 200) $potionStatus++;
$count += $res->count;
}
if($count == 0) echo '<div class="b">Ресурсы отсутствуют!</div>';
echo '<div class="line"></div>';
if($potionStatus >= 4) echo '<a class="link" href="/craft">Собрать травяное зелье</a>';
include_once ($root.'/core/foot.php');