Types in Recent Additions on menu.

This commit is contained in:
2023-08-07 06:49:58 -05:00
parent 9f9c401ebe
commit ebaf321b27

View File

@ -5,7 +5,7 @@ include_once "settings.php";
// Set up Calibre database connection
$db = new SQLite3('metadata.sqlite');
$feature = $db->query('SELECT
$feature = $db->query("SELECT
books.id AS id,
books.title AS title,
authors.name AS author
@ -13,7 +13,12 @@ FROM books
INNER JOIN books_authors_link ON books.id = books_authors_link.book
INNER JOIN authors on authors.id = books_authors_link.author
ORDER BY books.id DESC
LIMIT 4');
LIMIT 4");
$types = $db->query("SELECT
value
FROM custom_column_1
ORDER BY value ASC");
?>
@ -116,14 +121,20 @@ LIMIT 4');
<div class="fh5co-menu">
<div class="fh5co-box">
<h3 class="heading">Categories</h3>
<h3 class="heading">Recent Additions</h3>
<ul>
<li><a href="#">Books</a></li>
<li><a href="#">Movies</a></li>
<li><a href="#">Television</a></li>
<li><a href="#">Video Games</a></li>
<li><a href="#">Other</a></li>
<?php
while ($row = $types->fetchArray()) {
$row_value = $row['value'];
$row_titlecase = mb_convert_case($row_value, MB_CASE_TITLE, "UTF-8");
echo '<li><a href="results.php?ty='.$row_value.'">'.$row_titlecase.'</a></li>';
//echo '<li>'.$row_value.'</li>';
}
?>
</ul>
</div>
<div class="fh5co-box">
<h3 class="heading">Search</h3>