1
0
www.mikescher.com/www/fragments/panel_books.php

34 lines
774 B
PHP
Raw Normal View History

2018-01-27 18:13:38 +01:00
<?php
require_once(__DIR__ . '/../internals/books.php');
$allbooks = Books::listAllNewestFirst();
?>
<div class="index_pnl_base">
<div class="index_pnl_header">
<a href="/books">Converted books</a>
</div>
<div class="index_pnl_content books_pnl_content">
<?php
for ($i=0; $i<min(6, count($allbooks)); $i++)
{
$book = $allbooks[$i];
$extra = $i>=2 ? 'books_pnl_extra' : '';
echo "<a class='books_pnl_entry $extra' href='" . $book['url'] . "'>";
echo ' <img src="' . $book['preview_url'] . '" alt="' . $book['title'] . ' " />' . "\n";
echo "<div class='books_pnl_caption'>" . htmlspecialchars($book['title_short']) . "</div>";
echo "";
echo "</a>";
}
?>
</div>
</div>