Files
aowow/pages/main.php
Sarjuuk 6acee41e3d Javascript:
- reviewed and used objects PageTemplate and Locale
- removed associated workarounds
- replaced ~12k tabs with ~48k spaces
- fixed some localization errors
- whoops, forgot to update some Util::$pageTemplate calls to $this
2014-07-24 17:52:46 +02:00

33 lines
705 B
PHP

<?php
if (!defined('AOWOW_REVISION'))
die('illegal access');
/*
todo (med):
- different styles for newsbox
- flags for news .. disabled, deleted, recurring, whatever..
*/
class MainPage extends GenericPage
{
protected $tpl = 'main';
protected $news = [];
protected function generateContent()
{
parent::__construct('home');
// load news
$rows = DB::Aowow()->select('SELECT * FROM ?_news ORDER BY time DESC, id DESC LIMIT 5');
foreach ($rows as $i => $row)
$this->news[$i]['text'] = Util::localizedString($row, 'text');
}
protected function generateTitle() {}
protected function generatePath() {}
}
?>