Dragon-Knight/server/modules/HomeModule.php

21 lines
436 B
PHP
Raw Normal View History

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