mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
31 lines
1.0 KiB
PHP
Executable File
31 lines
1.0 KiB
PHP
Executable File
<?php
|
|
|
|
use App\Models\Video;
|
|
use Blacklight\http\AdminPage;
|
|
|
|
require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/smarty.php';
|
|
|
|
$page = new AdminPage();
|
|
|
|
$page->title = 'TV Shows List';
|
|
|
|
$tvshowname = (request()->has('showname') && ! empty(request()->input('showname')) ? request()->input('showname') : '');
|
|
$offset = request()->input('offset') ?? 0;
|
|
|
|
$page->smarty->assign(
|
|
[
|
|
'showname' => $tvshowname,
|
|
'tvshowlist' => Video::getRange($offset, config('nntmux.items_per_page'), $tvshowname),
|
|
'pagertotalitems' => Video::getCount($tvshowname),
|
|
'pageroffset' => $offset,
|
|
'pageritemsperpage' => config('nntmux.items_per_page'),
|
|
'pagerquerysuffix' => '',
|
|
'pagerquerybase' => WWW_TOP.'/show-list.php?'.
|
|
($tvshowname !== '' ? 'showname='.$tvshowname.'&' : '').'&offset=',
|
|
]
|
|
);
|
|
$page->smarty->assign('pager', $page->smarty->fetch('pager.tpl'));
|
|
|
|
$page->content = $page->smarty->fetch('show-list.tpl');
|
|
$page->render();
|