You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
798 B
32 lines
798 B
<?php
|
|
|
|
declare(strict_types = 1);
|
|
|
|
/**
|
|
* @author Robert Strutts
|
|
* @copyright (c) 2026, Robert Strutts
|
|
* @license MIT
|
|
*/
|
|
namespace Project\Classes\Logic;
|
|
|
|
/**
|
|
* Description of IndexAuthContainer
|
|
*
|
|
* @author Robert Strutts
|
|
*/
|
|
class IndexAuthContainer
|
|
{
|
|
public static function Logins(): string
|
|
{
|
|
$auth = '<div class="auth-container">';
|
|
$loggedin = $_SESSION['email'] ?? false;
|
|
if ($loggedin === false) {
|
|
$auth .= '<a href="/App/Home/Login.html" class="btn login-btn">Login</a>';
|
|
$auth .= '<a href="/App/Home/Register.html" class="btn register-btn">Register</a>';
|
|
} else {
|
|
$auth .= '<a href="/App/Home/Logout.html" class="btn login-btn">Logout</a>';
|
|
}
|
|
$auth .= '</div>';
|
|
return $auth;
|
|
}
|
|
}
|
|
|