You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
756 B
26 lines
756 B
<?php
|
|
require_once './config.php';
|
|
|
|
use nzedb\Games;
|
|
|
|
$page = new AdminPage();
|
|
$game = new Games(['Settings' => $page->settings]);
|
|
|
|
$page->title = "Game List";
|
|
|
|
$gamecount = $game->getCount();
|
|
|
|
$offset = isset($_REQUEST["offset"]) ? $_REQUEST["offset"] : 0;
|
|
$page->smarty->assign('pagertotalitems', $gamecount);
|
|
$page->smarty->assign('pageroffset', $offset);
|
|
$page->smarty->assign('pageritemsperpage', ITEMS_PER_PAGE);
|
|
$page->smarty->assign('pagerquerybase', WWW_TOP . "/game-list.php?offset=");
|
|
$pager = $page->smarty->fetch("pager.tpl");
|
|
$page->smarty->assign('pager', $pager);
|
|
|
|
$gamelist = $game->getRange($offset, ITEMS_PER_PAGE);
|
|
|
|
$page->smarty->assign('gamelist', $gamelist);
|
|
|
|
$page->content = $page->smarty->fetch('game-list.tpl');
|
|
$page->render();
|
|
|