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>';
|
|
|
|
}
|
|
|
|
|
2024-07-15 19:54:50 -05:00
|
|
|
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>';
|
2024-07-15 19:54:50 -05:00
|
|
|
} 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
|
|
|
}
|
|
|
|
}
|