Старт переноса showinf_pers(); в класс (наконец!_)

This commit is contained in:
lopar 2020-07-04 23:47:46 +03:00
parent de3ddf058b
commit 1a8aab2eaa
2 changed files with 4 additions and 8 deletions

View File

@ -59,7 +59,7 @@ class User
while ($row = $dressed_items->fetch_assoc()) {
$dressed_item[$row['dressed_slot']] = $row;
}
include_once '/views/user-info-doll.php';
echo <<<USERINFO
Имя {$this->login} <br>
Сила {$this->strength} <br>
@ -71,10 +71,7 @@ class User
Находится в {$this->getRoomName($this->room)}<br>
Предметы на тушке: <br>
USERINFO;
$this->showItem($dressed_item[1]);
$this->showItem($dressed_item[2]);
$this->showItem($dressed_item[3]);
$this->showItem($dressed_item[4]);
// if (isset($dressed_item[1])) {
// $this->showItem($dressed_item[1]);
// }

View File

@ -53,9 +53,8 @@ if (empty($user->id)): ?>
<tr>
<td style="width: 250px; vertical-align: top;">
<?php
include_once 'views/user-info-doll.php';
//include_once 'views/user-info-doll.php';
try {$user->showUserInfo();} catch (Exception $e) {echo "<div class='private'>Ошибка классового генератора персонажа showUserInfo(): {$e}</div>";}
if (!empty($user->married)): ?>
<a href="inf.php?<?= $user->married ?>" target=_blank>
<img alt="В браке с <?= $user->married ?>" src="i/married.gif"