php-mpos/public/include/pages/news.inc.php
Sebastian Grewe c66c448836 Adding mobile dashboard and news page
* Adding mobile detection to home page
* Allow home page to default to news for desktops
* Use payout specific sidebar for mobile homescreen
* Added News navigation option to mobile

Fixes #278
Fixes #279
2013-06-29 15:11:57 +02:00

20 lines
472 B
PHP

<?php
// Make sure we are called from index.php
if (!defined('SECURITY')) die('Hacking attempt');
// Include markdown library
use \Michelf\Markdown;
// Fetch active news to display
$aNews = $news->getAllActive();
foreach ($aNews as $key => $aData) {
// Transform Markdown content to HTML
$aNews[$key]['content'] = Markdown::defaultTransform($aData['content']);
}
// Tempalte specifics
$smarty->assign("NEWS", $aNews);
$smarty->assign("CONTENT", "default.tpl");
?>