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

46 lines
1.0 KiB
PHP
Raw Normal View History

2018-01-27 18:13:38 +01:00
<?php
2020-01-15 02:50:23 +01:00
require_once (__DIR__ . '/../internals/website.php');
/** @var PageFrameOptions $FRAME_OPTIONS */ global $FRAME_OPTIONS;
/** @var URLRoute $ROUTE */ global $ROUTE;
/** @var Website $SITE */ global $SITE;
global $FRAGMENT_PARAM;
/** @var array $parameter */
$parameter = $FRAGMENT_PARAM;
?>
<?php
$BOOKS = $SITE->modules->Books();
$allbooks = $BOOKS->listAllNewestFirst();
2018-01-27 18:13:38 +01:00
?>
<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>