12 lines
343 B
PHP
12 lines
343 B
PHP
<?php if (!auth_check()): ?>
|
|
Hello, oppai!
|
|
<a href="/auth/register">Register</a>
|
|
<a href="/auth/login">Login</a>
|
|
<?php else: ?>
|
|
Hello, <?= $_SESSION['user']['username'] ?>!
|
|
<form action="/auth/logout" method="post">
|
|
<input type="hidden" name="csrf" value="<?= csrf() ?>">
|
|
<input type="submit" value="Logout">
|
|
</form>
|
|
<?php endif; ?>
|