mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
34 lines
861 B
PHP
34 lines
861 B
PHP
<?php
|
|
|
|
require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/smarty.php';
|
|
|
|
use Blacklight\Games;
|
|
use Blacklight\http\AdminPage;
|
|
|
|
$page = new AdminPage();
|
|
$game = new Games(['Settings' => $page->pdo]);
|
|
|
|
$page->title = 'Game List';
|
|
|
|
$gameCount = $game->getCount();
|
|
|
|
$offset = request()->input('offset') ?? 0;
|
|
|
|
$page->smarty->assign([
|
|
'pagertotalitems' => $gameCount,
|
|
'pagerquerysuffix' => '#results',
|
|
'pageroffset' => $offset,
|
|
'pageritemsperpage' => config('nntmux.items_per_page'),
|
|
'pagerquerybase' => WWW_TOP.'/game-list.php?offset=',
|
|
]);
|
|
|
|
$pager = $page->smarty->fetch('pager.tpl');
|
|
$page->smarty->assign('pager', $pager);
|
|
|
|
$gamelist = $game->getRange($offset, config('nntmux.items_per_page'));
|
|
|
|
$page->smarty->assign('gamelist', $gamelist);
|
|
|
|
$page->content = $page->smarty->fetch('game-list.tpl');
|
|
$page->render();
|