added router->path()
This commit is contained in:
parent
753b832cbc
commit
ab4a00d25c
|
@ -1,32 +1,24 @@
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<title>Address Book
|
<title>Address Book
|
||||||
<?php if (!empty($user)): ?>
|
<?php if (!empty($user->getNick())): ?>
|
||||||
- <?= $user->getNick() ?>
|
- <?= $user->getNick() ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
</title>
|
||||||
</title>
|
<link rel="stylesheet" href="/assets/styles/main.css">
|
||||||
<link rel="stylesheet" href="/assets/styles/main.css">
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<h1>Address Book</h1>
|
<h1>Address Book</h1>
|
||||||
<a href="<?= $router->path('app_main'); ?>">🏠 Home</a>
|
<a href="<?= $router->path('app_main'); ?>">🏠 Home</a>
|
||||||
<a href="<?= $router->path('app_admin'); ?>">⚙ Admin</a>
|
<a href="<?= $router->path('app_admin'); ?>">⚙ Admin</a>
|
||||||
<?php if (empty($user) || $user->getAuth() == \App\Enums\UserAuth::AUTH_ANONYMOUS): ?>
|
<?php if (empty($user) || $user->getAuth() == \App\Enums\UserAuth::AUTH_ANONYMOUS): ?>
|
||||||
<a href="/login">🚪Login</a>
|
<a href="<?= $router->path('app_login'); ?>">🚪Login</a>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<a href="/logout">🚪Logout</a>
|
<a href="<?= $router->path('app_logout'); ?>">🚪Logout</a>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php
|
<?php if (!empty($user->getNick())): ?>
|
||||||
if ($user->getAuth() == \App\Enums\UserAuth::AUTH_ANONYMOUS) {
|
<br>
|
||||||
echo "no";
|
Welcome back, <?= $user->getNick(); ?>
|
||||||
} else {
|
<?php endif; ?>
|
||||||
echo "yes";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<?php if (!empty($user) && !$user->getAuth() == \App\Enums\UserAuth::AUTH_ANONYMOUS): ?>
|
|
||||||
<br>
|
|
||||||
Welcome back, <?= $user->getNick(); ?>
|
|
||||||
<?php endif; ?>
|
|
||||||
<br>
|
<br>
|
||||||
|
|
Loading…
Reference in New Issue