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

46 lines
988 B
PHP
Raw Normal View History

2018-01-26 21:12:04 +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
2020-01-16 11:48:27 +01:00
$allposts = $SITE->modules->Blog()->listAllNewestFirst();
2018-01-26 21:12:04 +01:00
?>
<div class="index_pnl_base">
<div class="index_pnl_header">
<a href="/blog">New posts</a>
</div>
<div class="index_pnl_content blog_pnl_content">
<?php
2019-11-02 18:31:54 +01:00
$c=0;
for ($i=0; $i < count($allposts); $i++)
2018-01-26 21:12:04 +01:00
{
$post = $allposts[$i];
if (!$post['visible']) continue;
echo "<a class='blogpnl_base' href='" . $post['url'] . "'>\n";
echo "<div class='blogpnl_date'>" . $post['date'] . "</div>\n";
echo "<div class='blogpnl_title'>" . $post['title'] . "</div>\n";
echo "</a>\n";
2019-11-02 18:31:54 +01:00
$c++;
if ($c >= 3) break;
2018-01-26 21:12:04 +01:00
}
?>
</div>
</div>