summaryrefslogtreecommitdiff
path: root/php/header.php
diff options
context:
space:
mode:
Diffstat (limited to 'php/header.php')
-rwxr-xr-xphp/header.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/php/header.php b/php/header.php
index 0fd46df..18a043a 100755
--- a/php/header.php
+++ b/php/header.php
@@ -19,15 +19,19 @@
require_once ROOT . '/php/replace.php';
require_once ROOT . '/php/session.php';
+require_once ROOT . '/php/user.php';
$username = get_username();
if ($username === null) {
$account = import(ROOT . '/html/guest.html');
} else {
+ $admin = is_admin() ? import(ROOT . '/html/admin-link.html') : '';
+
$account = replace(ROOT . '/html/account.html', [
'{{username}}' => htmlspecialchars($username, ENT_QUOTES, 'UTF-8'),
- '{{profile}}' => rawurlencode($username)
+ '{{profile}}' => rawurlencode($username),
+ '{{admin}}' => $admin
]);
}