mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
- convert first pages to extend GenericPage (Race/s; Class/es; Main) - added new stack-rule from TC to spells
31 lines
667 B
PHP
31 lines
667 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()
|
|
{
|
|
// 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() {}
|
|
}
|
|
|
|
?>
|