33 lines
1.1 KiB
PHP
33 lines
1.1 KiB
PHP
<?php
|
|
if (isset($_SESSION["user"])) {
|
|
$account = new Account($_SESSION["user"], $conn);
|
|
|
|
if (!$account->accountExists()) {
|
|
session_destroy();
|
|
header('Location: /');
|
|
}
|
|
}
|
|
?>
|
|
<tr>
|
|
<td colspan="2">
|
|
<table align="center" border="0" class="header">
|
|
<tbody>
|
|
<tr>
|
|
<td><a href="/"><img src="/images/logo.gif" alt="<?= $website->title; ?>"></a></td>
|
|
<td class="slogan"><?= $website->slogan; ?></td>
|
|
<?php
|
|
if (!isset($_SESSION['user'])) {
|
|
?>
|
|
<td class="account-status">no account. <a href="/login">log in</a> or <a href="/apply">apply</a>?</td>
|
|
<?php
|
|
} else {
|
|
?>
|
|
<td class="account-status">welcome, <?= $account->getDetails("username"); ?> | <a href="/logout">log out</a></td>
|
|
<?php
|
|
}
|
|
?>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|