Старт переноса showinf_pers(); в класс (наконец!_)
This commit is contained in:
parent
93da7c0177
commit
c6729f4a7b
@ -43,6 +43,10 @@ class User
|
||||
}
|
||||
}
|
||||
|
||||
protected function showItem(array $item) {
|
||||
echo sprintf('<img src="/i/sh/%s" class="item-wrap-normal tooltip" title="<strong>%s</strong>">', $item['image'], $item['name']);
|
||||
}
|
||||
|
||||
public function showUserInfo() {
|
||||
$dressed_item = [];
|
||||
$dressed_items = db::c()->query('SELECT * FROM inventory WHERE owner_id = ?i AND dressed_slot > 0', $this->id);
|
||||
@ -62,13 +66,13 @@ class User
|
||||
Предметы на тушке: <br>
|
||||
USERINFO;
|
||||
if (isset($dressed_item[1])) {
|
||||
echo "В руке — " .$dressed_item[1]['name']."<br>";
|
||||
$this->showItem($dressed_item[1]);
|
||||
}
|
||||
if (isset($dressed_item[2])) {
|
||||
echo "В другой руке — " .$dressed_item[2]['name']."<br>";
|
||||
$this->showItem($dressed_item[2]);
|
||||
}
|
||||
if (isset($dressed_item[4])) {
|
||||
echo "На пузе — " .$dressed_item[4]['name']."<br>";
|
||||
$this->showItem($dressed_item[4]);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user