renamed template

This commit is contained in:
tracer 2022-10-24 18:41:28 +02:00
parent ed1e795941
commit 61aa012dd6
1 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,32 @@
<html lang="en">
<head>
<title>Address Book
<?php if (!empty($user)): ?>
&nbsp;-&nbsp;<?= $user->getNick() ?>
<?php endif; ?>
</title>
<link rel="stylesheet" href="/assets/styles/main.css">
</head>
<body>
<h1>Address Book</h1>
<a href="<?= $router->path('app_main'); ?>">🏠 Home</a>
<a href="<?= $router->path('app_admin'); ?>"> Admin</a>
<?php if (empty($user) || $user->getAuth() == \App\Enums\UserAuth::AUTH_ANONYMOUS): ?>
<a href="/login">🚪Login</a>
<?php else: ?>
<a href="/logout">🚪Logout</a>
<?php endif; ?>
<?php
if ($user->getAuth() == \App\Enums\UserAuth::AUTH_ANONYMOUS) {
echo "no";
} else {
echo "yes";
}
?>
<?php if (!empty($user) && !$user->getAuth() == \App\Enums\UserAuth::AUTH_ANONYMOUS): ?>
<br>
Welcome back, <?= $user->getNick(); ?>
<?php endif; ?>
<br>