battles/views/user-info-doll.php

94 lines
2.8 KiB
PHP

<?php
function showItemInSlot($slot = 0)
{
global $dressed_item;
if (isset($dressed_item[$slot])) {
echo <<<SLOT
<img src="/i/sh/{$dressed_item[$slot]['image']}" class="item-wrap-normal tip" alt="Слот [{$slot}]">
<span class="tiptext"><strong>{$dressed_item[$slot]['name']}</strong></span>
SLOT;
} else {
echo <<<EMPTY_SLOT
<img src="/i/sh/noitem.png" class="item-wrap-normal" title="Пустой слот [{$slot}]" alt="Пустой слот [{$slot}]>
EMPTY_SLOT;
}
}
?>
<div style="text-align: center">
<?php if (!empty($user->align)): ?>
<img src="/i/align_<?= $user->align ?>.png" alt="Склонность">
<?php endif; ?>
<?php if ($user->block): ?>
<span class="private"><s><?= $user->login ?></s></span>
<?php else: ?>
<strong><?= $user->login ?></strong>
<?php endif; ?>
<?php if (!empty($user->clan)): ?>
<img src="/i/clan/<?= $user->clan ?>.png" alt="<?= $user->clan ?>">
<?php endif; ?>
</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>
<?= showItemInSlot(1) ?>
</td>
</tr>
<tr>
<td>
<?= showItemInSlot(2) ?>
</td>
</tr>
<tr>
<td>
<?= showItemInSlot(3) ?>
</td>
</tr>
<tr>
<td>
<?= showItemInSlot(4) ?>
</td>
</tr>
</table>
</td>
<td valign=top>
<img src="/i/shadow/<?= $user->shadow ?>" onerror=" this.src = '/i/shadow/0.gif';">
</td>
<td width="62" valign=top>
<table width=100%>
<tr>
<td>
<?= showItemInSlot(5) ?>
</td>
</tr>
<tr>
<td>
<?= showItemInSlot(6) ?>
</td>
</tr>
<tr>
<td>
<?= showItemInSlot(7) ?>
</td>
</tr>
<tr>
<td>
<?= showItemInSlot(8) ?>
</td>
</tr>
</table>
</td>
</tr>
</table>
<div style="text-align: center">
<?= showItemInSlot(9) ?>
<?= showItemInSlot(10) ?>
<?= showItemInSlot(11) ?>
</div>