Суммирование параметров на предмете.
This commit is contained in:
@@ -56,37 +56,18 @@ class User
|
||||
private function UserInfoDoll($isBattle = 0, $isMain = 0)
|
||||
{
|
||||
//https://jsfiddle.net/ngx0yvhc
|
||||
// $dressed_items = db::c()->query('SELECT * FROM inventory WHERE owner_id = ?i AND dressed_slot > 0', $this->id);
|
||||
// while ($row = $dressed_items->fetch_assoc()) {
|
||||
// $dressed_item[$row['dressed_slot']] = $row;
|
||||
// }
|
||||
$di = new DressedItems();
|
||||
$di->eeee($this->id);
|
||||
$dressedItems = $di->getItemsInSlots($this->id);
|
||||
|
||||
// for ($i = 1; $i <= 12; $i++) {
|
||||
// echo sprintf('<div class="slot-%s">', $i);
|
||||
// if (isset($dressed_item[$i])) {
|
||||
// if (!$isBattle && $isMain) {
|
||||
// $itemString = '<a href="?edit=1&drop=%s"><img src="/i/sh/%s" class="item-wrap-normal" alt="%s" title="%s"></a>';
|
||||
// echo sprintf($itemString, $i, $dressed_item[$i]['image'], $dressed_item[$i]['name'], $dressed_item[$i]['name']);
|
||||
// } else {
|
||||
// $itemString = '<img src="/i/sh/%s" class="item-wrap-normal tip" alt="%s"><span class="tiptext"><strong>%s</strong></span>';
|
||||
// echo sprintf($itemString, $dressed_item[$i]['image'], $dressed_item[$i]['name'], $dressed_item[$i]['name']);
|
||||
// }
|
||||
// } else {
|
||||
// echo sprintf('<img src="/i/sh/noitem.png" class="item-wrap-normal" title="Пустой слот [%s]" alt="Пустой слот [%s]">', $i, $i);
|
||||
// }
|
||||
// echo sprintf('</div><!-- slot-%s -->', $i);
|
||||
// }
|
||||
for ($i = 1; $i <= 12; $i++) {
|
||||
echo sprintf('<div class="slot-%s">', $i);
|
||||
if (isset($di->eeee($this->id)[$i])) {
|
||||
if (!$isBattle && $isMain) {
|
||||
$itemString = '<a href="?edit=1&drop=%s"><img src="/i/sh/%s" class="item-wrap-normal" alt="%s" title="%s"></a>';
|
||||
echo sprintf($itemString, $i, $di->eeee($this->id)[$i]['image'], $di->eeee($this->id)[$i]['name'], $di->eeee($this->id)[$i]['name']);
|
||||
echo sprintf($itemString, $i, $dressedItems[$i]['image'], $dressedItems[$i]['name'], $dressedItems[$i]['name']);
|
||||
} else {
|
||||
$itemString = '<img src="/i/sh/%s" class="item-wrap-normal tip" alt="%s"><span class="tiptext"><strong>%s</strong></span>';
|
||||
echo sprintf($itemString, $di->eeee($this->id)[$i]['image'], $di->eeee($this->id)[$i]['name'], $di->eeee($this->id)[$i]['name']);
|
||||
echo sprintf($itemString, $dressedItems[$i]['image'], $dressedItems[$i]['name'], $dressedItems[$i]['name']);
|
||||
}
|
||||
} else {
|
||||
echo sprintf('<img src="/i/sh/noitem.png" class="item-wrap-normal" title="Пустой слот [%s]" alt="Пустой слот [%s]">', $i, $i);
|
||||
|
||||
Reference in New Issue
Block a user