mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
- consequentially prepended $WH to those functions (since i do have issues with regEx, some errors may occur) * simplified including required JS and CSS files per page * replaced old Menu-class with (almost) current version. Since it relies heavily on jQuery it is also loaded.
27 lines
533 B
PHP
27 lines
533 B
PHP
<?php
|
|
|
|
if (!defined('AOWOW_REVISION'))
|
|
die('illegal access');
|
|
|
|
|
|
/*
|
|
todo:
|
|
- different styles for newsbox
|
|
- flags for news .. disabled, deleted, recurring, whatever..
|
|
*/
|
|
|
|
// load news
|
|
$rows = DB::Aowow()->select('SELECT * FROM ?_news ORDER BY time DESC, id DESC LIMIT 5');
|
|
|
|
foreach ($rows as $i => $row)
|
|
$rows[$i]['text'] = Util::localizedString($row, 'text');
|
|
|
|
|
|
$smarty->assign('news', isset($rows) ? $rows : NULL);
|
|
$smarty->assign('lang', Lang::$main);
|
|
|
|
// load the page
|
|
$smarty->display('main.tpl');
|
|
|
|
?>
|