mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
Changes to movie list.
This commit is contained in:
@@ -2,30 +2,23 @@
|
||||
|
||||
require_once './config.php';
|
||||
|
||||
$page = new AdminPage();
|
||||
|
||||
$movie = new Film(['Settings' => $page->settings]);
|
||||
$page = new AdminPage();
|
||||
$movie = new Movie(['Settings' => $page->settings]);
|
||||
|
||||
$page->title = "Movie List";
|
||||
|
||||
$tname = "";
|
||||
if (isset($_REQUEST['moviename']) && !empty($_REQUEST['moviename']))
|
||||
$tname = $_REQUEST['moviename'];
|
||||
|
||||
$movcount = $movie->getCount();
|
||||
|
||||
$offset = isset($_REQUEST["offset"]) ? $_REQUEST["offset"] : 0;
|
||||
$tsearch = ($tname != "") ? 'moviename='.$tname.'&' : '';
|
||||
|
||||
$page->smarty->assign('pagertotalitems',$movcount);
|
||||
$page->smarty->assign('pageroffset',$offset);
|
||||
$page->smarty->assign('pageritemsperpage',ITEMS_PER_PAGE);
|
||||
$page->smarty->assign('pagertotalitems', $movcount);
|
||||
$page->smarty->assign('pageroffset', $offset);
|
||||
$page->smarty->assign('pageritemsperpage', ITEMS_PER_PAGE);
|
||||
$page->smarty->assign('pagerquerybase', WWW_TOP . "/movie-list.php?offset=");
|
||||
$pager = $page->smarty->fetch("pager.tpl");
|
||||
$page->smarty->assign('pager', $pager);
|
||||
|
||||
$movielist = $movie->getRange($offset, ITEMS_PER_PAGE);
|
||||
$page->smarty->assign('movielist',$movielist);
|
||||
$page->smarty->assign('movielist', $movielist);
|
||||
|
||||
$page->content = $page->smarty->fetch('movie-list.tpl');
|
||||
$page->render();
|
||||
|
||||
@@ -1,51 +1,29 @@
|
||||
<h1>{$page->title}</h1>
|
||||
|
||||
{if $movielist}
|
||||
|
||||
<div style="float:right;">
|
||||
|
||||
<form name="moviesearch" action="">
|
||||
<label for="moviename">Title</label>
|
||||
<input id="moviename" type="text" name="moviename" value="{$moviename}" size="15" />
|
||||
|
||||
<input type="submit" value="Go" />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{$pager}
|
||||
|
||||
<br/><br/>
|
||||
|
||||
<table style="width:100%;margin-top:10px;" class="data Sortable highlight">
|
||||
|
||||
<tr>
|
||||
<th>IMDB id</th>
|
||||
<th>TMDb id</th>
|
||||
<th>Title</th>
|
||||
<th class="mid">Cover</th>
|
||||
<th class="mid">Backdrop</th>
|
||||
<th class="mid" style="width:80px;">Created</th>
|
||||
<th style="width:100px;" class="mid">options</th>
|
||||
</tr>
|
||||
|
||||
{foreach from=$movielist item=movie}
|
||||
<tr class="{cycle values=",alt"}">
|
||||
<td class="less"><a href="http://www.imdb.com/title/tt{$movie.imdbid}" title="View in IMDB">{$movie.imdbid}</a></td>
|
||||
<td class="less"><a href="http://www.themoviedb.org/movie/{$movie.tmdbid}" title="View in TMDb">{$movie.tmdbid}</a></td>
|
||||
<td><a title="Edit" href="{$smarty.const.WWW_TOP}/movie-edit.php?id={$movie.imdbid}">{$movie.title} ({$movie.year})</a></td>
|
||||
<td class="less mid">{if $movie.cover == "1"}Yes{else}No{/if}</td>
|
||||
<td class="less mid">{if $movie.backdrop == "1"}Yes{else}No{/if}</td>
|
||||
<td class="less mid">{$movie.createddate|date_format}</td>
|
||||
<td class="mid">
|
||||
<a title="update" href="{$smarty.const.WWW_TOP}/movie-add.php?id={$movie.imdbid}&update=1">update</a> |
|
||||
<a title="delete" href="{$smarty.const.WWW_TOP}/movie-delete.php?id={$movie.imdbid}">delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
|
||||
</table>
|
||||
<br/>
|
||||
{$pager}
|
||||
{$pager}
|
||||
<table style="margin-top:10px;" class="data Sortable highlight">
|
||||
<tr>
|
||||
<th>IMDB ID</th>
|
||||
<th>TMDb ID</th>
|
||||
<th>Title</th>
|
||||
<th>Cover</th>
|
||||
<th>Backdrop</th>
|
||||
<th>Created</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
{foreach from=$movielist item=movie}
|
||||
<tr class="{cycle values=",alt"}">
|
||||
<td class="less"><a href="http://www.imdb.com/title/tt{$movie.imdbid}" title="View in IMDB">{$movie.imdbid}</a></td>
|
||||
<td class="less"><a href="http://www.themoviedb.org/movie/{$movie.tmdbid}" title="View in TMDb">{$movie.tmdbid}</a></td>
|
||||
<td><a title="Edit" href="{$smarty.const.WWW_TOP}/movie-edit.php?id={$movie.imdbid}">{$movie.title} ({$movie.year})</a></td>
|
||||
<td class="less">{$movie.cover}</td>
|
||||
<td class="less">{$movie.backdrop}</td>
|
||||
<td class="less">{$movie.createddate|date_format}</td>
|
||||
<td class="less"><a title="Update" href="{$smarty.const.WWW_TOP}/movie-add.php?id={$movie.imdbid}&update=1">Update</a></td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{else}
|
||||
<p>No Movies available.</p>
|
||||
<p>No Movies available.</p>
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user