Types in Recent Additions on menu.
This commit is contained in:
27
index.php
27
index.php
@ -5,7 +5,7 @@ include_once "settings.php";
|
|||||||
// Set up Calibre database connection
|
// Set up Calibre database connection
|
||||||
$db = new SQLite3('metadata.sqlite');
|
$db = new SQLite3('metadata.sqlite');
|
||||||
|
|
||||||
$feature = $db->query('SELECT
|
$feature = $db->query("SELECT
|
||||||
books.id AS id,
|
books.id AS id,
|
||||||
books.title AS title,
|
books.title AS title,
|
||||||
authors.name AS author
|
authors.name AS author
|
||||||
@ -13,7 +13,12 @@ FROM books
|
|||||||
INNER JOIN books_authors_link ON books.id = books_authors_link.book
|
INNER JOIN books_authors_link ON books.id = books_authors_link.book
|
||||||
INNER JOIN authors on authors.id = books_authors_link.author
|
INNER JOIN authors on authors.id = books_authors_link.author
|
||||||
ORDER BY books.id DESC
|
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-menu">
|
||||||
<div class="fh5co-box">
|
<div class="fh5co-box">
|
||||||
<h3 class="heading">Categories</h3>
|
<h3 class="heading">Recent Additions</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#">Books</a></li>
|
<?php
|
||||||
<li><a href="#">Movies</a></li>
|
while ($row = $types->fetchArray()) {
|
||||||
<li><a href="#">Television</a></li>
|
$row_value = $row['value'];
|
||||||
<li><a href="#">Video Games</a></li>
|
$row_titlecase = mb_convert_case($row_value, MB_CASE_TITLE, "UTF-8");
|
||||||
<li><a href="#">Other</a></li>
|
echo '<li><a href="results.php?ty='.$row_value.'">'.$row_titlecase.'</a></li>';
|
||||||
|
//echo '<li>'.$row_value.'</li>';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="fh5co-box">
|
<div class="fh5co-box">
|
||||||
<h3 class="heading">Search</h3>
|
<h3 class="heading">Search</h3>
|
||||||
|
Reference in New Issue
Block a user