-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathcharacters.php
More file actions
29 lines (22 loc) · 768 Bytes
/
characters.php
File metadata and controls
29 lines (22 loc) · 768 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
$pagetitle = 'My Characters';
require 'common.php';
if (!$logged)
{
$tpl->message = 'You must be logged in to view this page.';
$tpl->Execute(null);
exit;
}
$characters = webcp_db_fetchall("SELECT * FROM characters WHERE account = ? ORDER BY exp DESC", $sess->username);
foreach ($characters as &$character)
{
$character['name'] = ucfirst($character['name']);
$character['gender'] = $character['gender']?'Male':'Female';
$character['title'] = empty($character['title'])?'-':ucfirst($character['title']);
$character['exp'] = number_format($character['exp']);
$character['gm'] = $character['admin'] > 0;
$character['admin_str'] = adminrank_str($character['admin']);
}
unset($character);
$tpl->characters = $characters;
$tpl->Execute('characters');