blob: afa8304a7b8084c19e901d0ca13c3d4c8ad4e29f (
plain)
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
|
<?php
session_start();
function html_navbar()
{
$user = $_SESSION['user'] ?? null;
echo '' ?>
<header>
<a href="/">
<img src="/static/img/brand/big.webp" alt="ilt.su">
</a>
<?php if (isset($user)): ?>
<div class="row gap-8 align-center">
<p>Signed in as <b><?= $user['username'] ?></b></p>
<a href="/account/edit.php"><img src="/static/img/icons/settings.png" alt="Settings"
title="Account settings..."></a>
<a href="/account/logout.php"><img src="/static/img/icons/logout.png" alt="Logout"
title="Logout from the account"></a>
</div>
<?php else: ?>
<a href="/login.php">Log in</a>
<?php endif; ?>
</header>
<?php ;
}
|