17 lines
634 B
PHP
17 lines
634 B
PHP
|
<h1>Characters</h1>
|
||
|
<?php
|
||
|
$list = char_list(user('id'));
|
||
|
if (count($list) > 0): ?>
|
||
|
<form action="/character/select" method="post">
|
||
|
<input type="hidden" name="csrf" value="<?= csrf() ?>">
|
||
|
<?php foreach ($list as $id => $char): ?>
|
||
|
<input type="radio" name="char_id" value="<?= $id ?>" id="char_<?= $id ?>">
|
||
|
<label for="char_<?= $id ?>"><?= $char['name'] ?> (Level <?= $char['level'] ?>)</label><br>
|
||
|
<?php endforeach; ?>
|
||
|
<input type="submit" value="Select Character">
|
||
|
</form>
|
||
|
<?php else: ?>
|
||
|
<!-- Should never see this particular message. If you have, there's a bug. -->
|
||
|
<p>You have no characters.</p>
|
||
|
<?php endif; ?>
|