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.
55 lines
1.4 KiB
PHP
55 lines
1.4 KiB
PHP
<?php
|
|
|
|
if (!defined('AOWOW_REVISION'))
|
|
die('illegal access');
|
|
|
|
|
|
$cat = Util::extractURLParams($pageParam)[0];
|
|
$path = [0, 10];
|
|
$validCats = [0, 1, 2, 3, 4, 5, 6];
|
|
$title = [Util::ucFirst(Lang::$game['titles'])];
|
|
$cacheKey = implode('_', [CACHETYPE_PAGE, TYPE_TITLE, -1, isset($cat) ? $cat : -1, User::$localeId]);
|
|
|
|
if (!in_array($cat, $validCats))
|
|
$smarty->error();
|
|
|
|
$path[] = $cat; // should be only one parameter anyway
|
|
|
|
if (isset($cat))
|
|
array_unshift($title, Lang::$title['cat'][$cat]);
|
|
|
|
if (!$smarty->loadCache($cacheKey, $pageData))
|
|
{
|
|
$titles = new TitleList(isset($cat) ? array(['category', (int)$cat]) : []);
|
|
|
|
$pageData = array(
|
|
'file' => 'title',
|
|
'data' => $titles->getListviewData(),
|
|
'params' => []
|
|
);
|
|
|
|
if ($titles->hasDiffFields(['category']))
|
|
$pageData['params']['visibleCols'] = "$['category']";
|
|
|
|
if (!$titles->hasAnySource())
|
|
$pageData['params']['hiddenCols'] = "$['source']";
|
|
|
|
$smarty->saveCache($cacheKey, $pageData);
|
|
}
|
|
|
|
|
|
// menuId 10: Title g_initPath()
|
|
// tabId 0: Database g_initHeader()
|
|
$smarty->updatePageVars(array(
|
|
'title' => implode(" - ", $title),
|
|
'path' => "[".implode(", ", $path)."]",
|
|
'tab' => 0
|
|
));
|
|
$smarty->assign('lang', Lang::$main);
|
|
$smarty->assign('lvData', $pageData);
|
|
|
|
// load the page
|
|
$smarty->display('generic-no-filter.tpl');
|
|
|
|
?>
|