Dragon-Knight/templates/showchar.php

37 lines
2.0 KiB
PHP

<div class="title"><img src="/img/button_character.gif" alt="Character" title="Character"></div>
<b><?= $char['username'] ?></b><br><br>
Class: <?= match ($char['charclass']) {
1 => $controlrow["class1name"],
2 => $controlrow["class2name"],
3 => $controlrow["class3name"]
}; ?><br><br>
Level: <?= $char['level'] ?><br>
Experience: <?= number_format($char['experience']) ?>
<?php if ($char['expbonus'] !== 0): ?> <span class="light">(<?= $char['expbonus'] > 0 ? '+' : '' ?>) <?= $char['expbonus'] ?>%)</span> <?php endif; ?><br>
Next Level: <?php if ($char['level'] < 99) { echo number_format($level[$char['charclass']."_exp"]); } else { ?> <span class="light">None</span> <?php } ?><br>
Gold: <?= number_format($char['gold']) ?>
<?php if ($char['goldbonus'] !== 0): ?> <span class="light">(<?= $char['goldbonus'] > 0 ? '+' : '' ?>) <?= $char['goldbonus'] ?>%)</span> <?php endif; ?><br>
Hit Points: <?= number_format($char['currenthp']) ?> / <?= number_format($char['maxhp']) ?><br>
Magic Points: <?= number_format($char['currentmp']) ?> / <?= number_format($char['maxmp']) ?><br>
Travel Points: <?= number_format($char['currenttp']) ?> / <?= number_format($char['maxtp']) ?><br><br>
Strength: <?= number_format($char['strength']) ?><br>
Dexterity: <?= number_format($char['dexterity']) ?><br>
Attack Power: <?= number_format($char['attackpower']) ?><br>
Defense Power: <?= number_format($char['defensepower']) ?><br>
<br>
<div class="title"><img src="/img/button_inventory.gif" alt="Inventory" title="Inventory"></div>
<img src="/img/icon_weapon.gif" alt="Weapon" title="Weapon"> Weapon: <?= $char['weaponname'] ?><br>
<img src="/img/icon_armor.gif" alt="Armor" title="Armor"> Armor: <?= $char['armorname'] ?><br>
<img src="/img/icon_shield.gif" alt="Shield" title="Shield"> Shield: <?= $char['shieldname'] ?><br>
Slot 1: <?= $char['slot1name'] ?><br>
Slot 2: <?= $char['slot2name'] ?><br>
Slot 3: <?= $char['slot3name'] ?>
<br>
<div class="title"><img src="/img/button_spells.gif" alt="Spells" title="Spells"></div>
<?= $magic_list ?>