Dragon-Knight/server/modules/HomeModule.php
2024-07-17 18:41:34 -05:00

21 lines
436 B
PHP

<?php
class HomeModule
{
public static function home()
{
foreach ($_SESSION['flash'] as $key => $value) {
echo '<div class="alert ' . $key . '">- ' . $value . '</div>';
}
if (App::auth()) {
echo 'You are already logged in!<br>';
echo '<form action="/gate/logout" method="post"><button>Logout</button></form>';
} else {
echo 'You are not logged in!<br>';
}
echo 'Your request is: ' . App::$req->uri(0);
}
}