This commit is contained in:
lopar 2020-07-05 01:48:48 +03:00
parent 3f614f35d2
commit 27e880df75

View File

@ -65,32 +65,39 @@ EMPTY_SLOT;
{
$dressed_item = [];
$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;
$dressed_items_row = $dressed_items->fetch_assoc();
for ($dressed_items_row['dressed_slot'] = 1; $dressed_items_row['dressed_slot'] <= $dressed_items->getNumRows(); $dressed_items_row['dressed_slot']++) {
$dressed_item[$dressed_items_row['dressed_slot']] = $dressed_items_row ?? 0;
}
echo <<<USERINFO
<div style="text-align: center">
<?php if ($this->align): ?>
<img src="/i/align_{$this->align}.png" alt="Склонность">
<?php endif; ?>
<?php if ($this->block): ?>
<span class="private"><s>{$this->login}</s></span>
<?php else: ?>
<strong>{$this->login}</strong>
<?php endif; ?>
<?php if ($this->clan): ?>
<img src="/i/clan/{$this->clan}.png" alt="{$this->clan}">
<?php endif; ?>
</div>
// while ($row = $dressed_items->fetch_assoc()) {
// $dressed_item[$row['dressed_slot']] = $row;
// }
echo '<div style="text-align: center">';
if ($this->align) {
echo sprintf('<img src="/i/align_%s.png" alt="Склонность">', $this->align);
}
if ($this->block) {
echo sprintf('<span class="private"><s>%s</s></span>', $this->login);
} else {
echo sprintf('<strong>%s</strong>', $this->login);
}
if ($this->clan) {
echo sprintf('<img src="/i/clan/%s.png" alt="%s">', $this->clan, $this->clan);
}
echo '</div>
<div style="width: 100%; height: 16px; background: #ffaaff; overflow: hidden; border-radius: 3px; font-size: 14px; text-align: center;">
добавить здоровье 🤔
добавить здоровье
</div>
<table style="width: 100%; text-align: center;">
<tr>
<td width=62 valign=top>
<table width=100%>
<tr>
<td>
<td>';
echo <<<USERINFO
{$this->showItem($dressed_item[1])}
</td>
</tr>
@ -156,9 +163,9 @@ EMPTY_SLOT;
Находится в {$this->getRoomName($this->room)}<br>
USERINFO;
// if (isset($dressed_item[1])) {
// $this->showItem($dressed_item[1]);
// }
if (isset($dressed_item[1])) {
$this->showItem($dressed_item[1]);
}
// if (isset($dressed_item[2])) {
// $this->showItem($dressed_item[2]);
// }