@@ -64,20 +64,19 @@ function title_bar(): void {
|
||||
WHERE feed.user_id = :id AND item.is_bookmarked = 1)
|
||||
SQL);
|
||||
$bookQuery->bindValue(':id', $_SESSION[Key::USER_ID]);
|
||||
$bookResult = $bookQuery->execute();
|
||||
$hasBookmarks = $bookResult ? $bookResult->fetchArray(SQLITE3_NUM)[0] : false; ?>
|
||||
<?=hx_get('/feeds', 'Feeds')?> |
|
||||
<?=$hasBookmarks ? hx_get('/?bookmarked', 'Bookmarked') . ' | ' : ''?>
|
||||
<?=hx_get('/docs/', 'Docs')?> |
|
||||
<a href=/user/log-off>Log Off</a><?php
|
||||
if ($_SESSION[Key::USER_EMAIL] != Security::SINGLE_USER_EMAIL) { ?>
|
||||
| <?=$_SESSION[Key::USER_EMAIL]?><?php
|
||||
$bookResult = $bookQuery->execute();
|
||||
$hasBookmarks = $bookResult && $bookResult->fetchArray(SQLITE3_NUM)[0];
|
||||
echo hx_get('/feeds', 'Feeds') . ' | ';
|
||||
if ($hasBookmarks) echo hx_get('/?bookmarked', 'Bookmarked') . ' | ';
|
||||
echo hx_get('/docs/', 'Docs') . ' | <a href=/user/log-off>Log Off</a>';
|
||||
if ($_SESSION[Key::USER_EMAIL] != Security::SINGLE_USER_EMAIL) {
|
||||
echo " | {$_SESSION[Key::USER_EMAIL]}";
|
||||
}
|
||||
} finally {
|
||||
$db->close();
|
||||
}
|
||||
} else { ?>
|
||||
<?=hx_get('/user/log-on', 'Log On')?> | <?=hx_get('/docs/', 'Docs')?><?php
|
||||
} else {
|
||||
echo hx_get('/user/log-on', 'Log On') . ' | ' . hx_get('/docs/', 'Docs');
|
||||
} ?>
|
||||
</div>
|
||||
</header>
|
||||
@@ -122,9 +121,7 @@ function page_head(string $title): void {
|
||||
function page_foot(): void {
|
||||
global $is_htmx; ?>
|
||||
</main><?php
|
||||
if (!$is_htmx) { ?>
|
||||
<script src=/assets/htmx.min.js></script><?php
|
||||
} ?>
|
||||
if (!$is_htmx) echo '<script src=/assets/htmx.min.js></script>'; ?>
|
||||
</body>
|
||||
</html><?php
|
||||
session_commit();
|
||||
|
||||
Reference in New Issue
Block a user