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