Старт переноса showinf_pers(); в класс
This commit is contained in:
parent
4a7e359cc3
commit
c25bc6cbfd
@ -44,10 +44,12 @@ class User
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function showUserInfo() {
|
public function showUserInfo() {
|
||||||
|
$dressed_items_array = [];
|
||||||
$dressed_items = db::c()->query('SELECT * FROM inventory WHERE owner_id = ?i AND dressed_slot > 0', $this->id);
|
$dressed_items = db::c()->query('SELECT * FROM inventory WHERE owner_id = ?i AND dressed_slot > 0', $this->id);
|
||||||
foreach ($dressed_items->fetch_assoc_array() as $item) {
|
foreach ($dressed_items->fetch_assoc_array() as $key=>$value) {
|
||||||
print_r($item);
|
$dressed_items_array[$dressed_items['dressed_slot']][$key] = $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
echo <<<USERINFO
|
echo <<<USERINFO
|
||||||
Имя {$this->login} <br>
|
Имя {$this->login} <br>
|
||||||
Сила {$this->strength} <br>
|
Сила {$this->strength} <br>
|
||||||
@ -59,7 +61,7 @@ class User
|
|||||||
Находится в {$this->getRoomName($this->room)}<br>
|
Находится в {$this->getRoomName($this->room)}<br>
|
||||||
Предметы на тушке: <br>
|
Предметы на тушке: <br>
|
||||||
USERINFO;
|
USERINFO;
|
||||||
|
print_r($dressed_items_array);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user