Accords-CMS/public/admin/admin-bar.php

12 lines
366 B
PHP
Raw Normal View History

2021-10-14 08:41:30 +00:00
<div id="admin-bar">
<h1>Accord's CMS</h1>
<?php
if (session_status() == PHP_SESSION_NONE) session_start();
if (isset($_SESSION['loginUsername'])) {
echo '<div id="logout">Welcome ' . $_SESSION['loginUsername'] . '<a class="button" href="/admin/logout.php">Logout</a></div>';
} else {
header('Location: /');
}
?>
</div>