TYPE_UNREAD, array_key_exists('bookmarked', $_GET) => TYPE_BOOKMARKED, default => TYPE_ALL }; $extraSQL = match ($type) { TYPE_UNREAD => ' AND is_read = 0', TYPE_BOOKMARKED => ' AND is_bookmarked = 1', default => '' }; $itemQuery = $db->prepare(<<bindValue(':feed', $feed['id']); if (!($itemResult = $itemQuery->execute())) add_error(Data::error($db)['error']); $item = $itemResult ? $itemResult->fetchArray(SQLITE3_ASSOC) : false; $queryParam = match ($type) { TYPE_UNREAD => '&unread', TYPE_BOOKMARKED => '&bookmarked', default => '' }; $thisURL = urlencode("/feed/items?id={$feed['id']}$queryParam"); $listType = match ($type) { TYPE_UNREAD => 'Unread', TYPE_BOOKMARKED => 'Bookmarked', default => '' }; page_head(($type != TYPE_ALL ? "$listType Items | " : '') . strip_tags($feed['title'])); if ($type == TYPE_ALL) { ?>

Items


New   ' : ''?> fetchArray(SQLITE3_ASSOC); } } else { ?>

There are no items

close();