mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-09-01 10:48:53 +00:00
Fixed most of the undefined index notices.
This commit is contained in:
+18
-9
@@ -4,9 +4,9 @@ if (!$page->users->isLoggedIn()) {
|
||||
$page->show403();
|
||||
}
|
||||
|
||||
$games = new Games();
|
||||
$cat = new Category();
|
||||
$gen = new Genres();
|
||||
$games = new Games(['Settings' => $page->settings]);
|
||||
$cat = new Category(['Settings' => $page->settings]);
|
||||
$gen = new Genres(['Settings' => $page->settings]);
|
||||
|
||||
$concats = $cat->getChildren(Category::CAT_PARENT_PC);
|
||||
$ctmp = array();
|
||||
@@ -24,18 +24,22 @@ $catarray[] = $category;
|
||||
$page->smarty->assign('catlist', $ctmp);
|
||||
$page->smarty->assign('category', $category);
|
||||
|
||||
$browsecount = $games->getgamesCount($catarray, -1, $page->userdata["categoryexclusions"]);
|
||||
$browsecount = $games->getGamesCount($catarray, -1, $page->userdata["categoryexclusions"]);
|
||||
|
||||
$offset = (isset($_REQUEST["offset"]) && ctype_digit($_REQUEST['offset'])) ? $_REQUEST["offset"] : 0;
|
||||
$ordering = $games->getgamesOrdering();
|
||||
$ordering = $games->getGamesOrdering();
|
||||
|
||||
$orderby = isset($_REQUEST["ob"]) && in_array($_REQUEST['ob'], $ordering) ? $_REQUEST["ob"] : '';
|
||||
|
||||
$results = $games2 = array();
|
||||
$results = $games->getgamesRange($catarray, $offset, ITEMS_PER_COVER_PAGE, $orderby, -1, $page->userdata["categoryexclusions"]);
|
||||
$results = $games->getGamesRange($catarray, $offset, ITEMS_PER_COVER_PAGE, $orderby, -1, $page->userdata["categoryexclusions"]);
|
||||
$maxwords = 50;
|
||||
foreach ($results as $result) {
|
||||
if (!empty($result['review'])) {
|
||||
// remove "Overview" from start of review if present
|
||||
if (0 === strpos($result['review'], 'Overview')) {
|
||||
$result['review'] = substr($result['review'], 8);
|
||||
}
|
||||
$words = explode(' ', $result['review']);
|
||||
if (sizeof($words) > $maxwords) {
|
||||
$newwords = array_slice($words, 0, $maxwords);
|
||||
@@ -44,8 +48,6 @@ foreach ($results as $result) {
|
||||
}
|
||||
$games2[] = $result;
|
||||
}
|
||||
$platform = (isset($_REQUEST['platform']) && !empty($_REQUEST['platform'])) ? stripslashes($_REQUEST['platform']) : '';
|
||||
$page->smarty->assign('platform', $platform);
|
||||
|
||||
$title = (isset($_REQUEST['title']) && !empty($_REQUEST['title'])) ? stripslashes($_REQUEST['title']) : '';
|
||||
$page->smarty->assign('title', $title);
|
||||
@@ -55,11 +57,18 @@ $tmpgnr = array();
|
||||
foreach ($genres as $gn) {
|
||||
$tmpgnr[$gn['id']] = $gn['title'];
|
||||
}
|
||||
|
||||
$years = range(1903, (date("Y") + 1));
|
||||
rsort($years);
|
||||
$year = (isset($_REQUEST['year']) && in_array($_REQUEST['year'], $years)) ? $_REQUEST['year'] : '';
|
||||
$page->smarty->assign('years', $years);
|
||||
$page->smarty->assign('year', $year);
|
||||
|
||||
$genre = (isset($_REQUEST['genre']) && array_key_exists($_REQUEST['genre'], $tmpgnr)) ? $_REQUEST['genre'] : '';
|
||||
$page->smarty->assign('genres', $genres);
|
||||
$page->smarty->assign('genre', $genre);
|
||||
|
||||
$browseby_link = '&title=' . $title . '&platform=' . $platform;
|
||||
$browseby_link = '&title=' . $title . '&year=' . $year;
|
||||
|
||||
$page->smarty->assign('pagertotalitems', $browsecount);
|
||||
$page->smarty->assign('pageroffset', $offset);
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
</a>
|
||||
|
||||
<div class="movextra">
|
||||
{if $result.nfoid > 0}<a href="{$smarty.const.WWW_TOP}/nfo/{$result.guid}"
|
||||
{if $result.nfoid > 0}<a href="{$smarty.const.WWW_TOP}/nfo/{$result.grp_release_guid}"
|
||||
title="View Nfo" class="btn btn-mini modal_nfo" rel="nfo">
|
||||
Nfo</a>{/if}
|
||||
{if $result.url != ""}<a class="btn btn-mini" target="_blank"
|
||||
@@ -137,42 +137,42 @@
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td colspan="8" class="left" id="guid{$result.guid}">
|
||||
<td colspan="8" class="left" id="grp_release_guid{$result.grp_release_guid}">
|
||||
<h2><a class="title" title="View details"
|
||||
href="{$smarty.const.WWW_TOP}/details/{$result.grp_release_guid}/{$result.grp_release_name|escape:"seourl"}">{$result.title|escape:"htmlall"}
|
||||
- {$result.platform|escape:"htmlall"}</a></h2>
|
||||
{if $result.genre != ""}<b>Genre:</b>{$result.genre}<br/>{/if}
|
||||
{if $result.esrb != ""}<b>Rating:</b>{$result.esrb}<br/>{/if}
|
||||
{if $result.publisher != ""}<b>Publisher:</b>{$result.publisher}<br/>{/if}
|
||||
{if $result.releasedate != ""}<b>Released:</b>{$result.releasedate|date_format}<br/>{/if}
|
||||
{if $result.review != ""}<b>Review:</b>{$result.review|escape:'htmlall'}<br/>{/if}
|
||||
{if isset($result.genre) && $result.genre != ""}<b>Genre:</b>{$result.genre}<br/>{/if}
|
||||
{if isset($result.esrb) && $result.esrb != ""}<b>Rating:</b>{$result.esrb}<br/>{/if}
|
||||
{if isset($result.publisher) && $result.publisher != ""}<b>Publisher:</b>{$result.publisher}<br/>{/if}
|
||||
{if isset($result.releasedate) && $result.releasedate != ""}<b>Released:</b>{$result.releasedate|date_format}<br/>{/if}
|
||||
{if isset($result.review) && $result.review != ""}<b>Review:</b>{$result.review|escape:'htmlall'}<br/>{/if}
|
||||
<br/>
|
||||
|
||||
<div class="movextra">
|
||||
<b>{$result.searchname|escape:"htmlall"}</b> <a class="rndbtn"
|
||||
<b>{$result.grp_release_name|escape:"htmlall"}</b> <a class="rndbtn"
|
||||
href="{$smarty.const.WWW_TOP}/console?platform={$result.platform}"
|
||||
title="View similar nzbs">Similar</a>
|
||||
{if $isadmin}
|
||||
<a class="rndbtn"
|
||||
href="{$smarty.const.WWW_TOP}/admin/release-edit.php?id={$result.releaseid}&from={$smarty.server.REQUEST_URI|escape:"url"}"
|
||||
href="{$smarty.const.WWW_TOP}/admin/release-edit.php?id={$result.grp_release_id}&from={$smarty.server.REQUEST_URI|escape:"url"}"
|
||||
title="Edit Release">Edit</a>
|
||||
<a class="rndbtn confirm_action"
|
||||
href="{$smarty.const.WWW_TOP}/admin/release-delete.php?id={$result.releaseid}&from={$smarty.server.REQUEST_URI|escape:"url"}"
|
||||
href="{$smarty.const.WWW_TOP}/admin/release-delete.php?id={$result.grp_release_id}&from={$smarty.server.REQUEST_URI|escape:"url"}"
|
||||
title="Delete Release">Del</a>
|
||||
{/if}
|
||||
<br/>
|
||||
<b>Info:</b> {$result.postdate|timeago}, {$result.size|fsize_format:"MB"}, <a
|
||||
<b>Info:</b> {$result.grp_release_postdate|timeago}, {$result.grp_release_size|fsize_format:"MB"}, <a
|
||||
title="View file list"
|
||||
href="{$smarty.const.WWW_TOP}/filelist/{$result.guid}">{$result.totalpart} files</a>,
|
||||
<a title="View comments for {$result.searchname|escape:"htmlall"}"
|
||||
href="{$smarty.const.WWW_TOP}/details/{$result.guid}/#comments">{$result.comments}
|
||||
cmt{if $result.comments != 1}s{/if}</a>, {$result.grabs}
|
||||
grab{if $result.grabs != 1}s{/if}
|
||||
href="{$smarty.const.WWW_TOP}/filelist/{$result.grp_release_guid}">{$result.grp_release_totalparts} files</a>,
|
||||
<a title="View comments for {$result.grp_release_name|escape:"htmlall"}"
|
||||
href="{$smarty.const.WWW_TOP}/details/{$result.grp_release_guid}/#comments">{$result.grp_release_comments}
|
||||
cmt{if $result.grp_release_comments != 1}s{/if}</a>, {$result.grp_release_grabs}
|
||||
grab{if $result.grp_release_grabs != 1}s{/if}
|
||||
<br/>
|
||||
|
||||
<div class="icon"><input type="checkbox" class="nzb_check" value="{$result.guid}"/></div>
|
||||
<div class="icon"><input type="checkbox" class="nzb_check" value="{$result.grp_release_guid}"/></div>
|
||||
<div class="icon icon_nzb"><a title="Download Nzb"
|
||||
href="{$smarty.const.WWW_TOP}/getnzb/{$result.guid}/{$result.searchname|escape:"htmlall"}">
|
||||
href="{$smarty.const.WWW_TOP}/getnzb/{$result.grp_release_guid}/{$result.grp_release_name|escape:"htmlall"}">
|
||||
</a></div>
|
||||
<div class="icon icon_cart" title="Add to Cart"></div>
|
||||
{if $sabintegrated}
|
||||
|
||||
@@ -150,11 +150,11 @@
|
||||
<td colspan="8" class="left" id="guid{$result.grp_release_guid}">
|
||||
<h2><a class="title" title="View details"
|
||||
href="{$smarty.const.WWW_TOP}/details/{$result.grp_release_guid}/{$result.grp_release_name|escape:"htmlall"}">{$result.title|stripslashes|escape:"htmlall"}</a></h2>
|
||||
{if $result.genre != ""}<b>Genre:</b>{$result.genre}<br/>{/if}
|
||||
{if $result.esrb != ""}<b>Rating:</b>{$result.esrb}<br/>{/if}
|
||||
{if $result.publisher != ""}<b>Publisher:</b>{$result.publisher}<br/>{/if}
|
||||
{if $result.releasedate != ""}<b>Released:</b>{$result.releasedate|date_format}<br/>{/if}
|
||||
{if $result.review != ""}<b>Review:</b>{$result.review|stripslashes|escape:'htmlall'}<br/>{/if}
|
||||
{if isset($result.genre) && $result.genre != ""}<b>Genre:</b>{$result.genre}<br/>{/if}
|
||||
{if isset($result.esrb) && $result.esrb != ""}<b>Rating:</b>{$result.esrb}<br/>{/if}
|
||||
{if isset($result.publisher) && $result.publisher != ""}<b>Publisher:</b>{$result.publisher}<br/>{/if}
|
||||
{if isset($result.releasedate) && $result.releasedate != ""}<b>Released:</b>{$result.releasedate|date_format}<br/>{/if}
|
||||
{if isset($result.review) && $result.review != ""}<b>Review:</b>{$result.review|stripslashes|escape:'htmlall'}<br/>{/if}
|
||||
<br/>
|
||||
|
||||
<div class="movextra">
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
<td class="mid">
|
||||
<div class="movcover">
|
||||
<a class="title" title="View details"
|
||||
href="{$smarty.const.WWW_TOP}/details/{$result.guid}/{$result.searchname|escape:"htmlall"}">
|
||||
href="{$smarty.const.WWW_TOP}/details/{$result.grp_release_guid}/{$result.grp_release_name|escape:"htmlall"}">
|
||||
<img class="shadow"
|
||||
src="{$smarty.const.WWW_TOP}/covers/music/{if $result.cover == 1}{$result.musicinfoid}.jpg{else}no-cover.jpg{/if}"
|
||||
width="120" border="0"
|
||||
@@ -132,7 +132,7 @@
|
||||
</a>
|
||||
|
||||
<div class="movextra">
|
||||
{if $result.nfoid > 0}<a href="{$smarty.const.WWW_TOP}/nfo/{$result.guid}"
|
||||
{if $result.nfoid > 0}<a href="{$smarty.const.WWW_TOP}/nfo/{$result.grp_release_guid}"
|
||||
title="View Nfo" class="btn btn-mini modal_nfo" rel="nfo">
|
||||
Nfo</a>{/if}
|
||||
<a class="btn btn-mini" target="_blank" href="{$site->dereferrer_link}{$result.url}"
|
||||
@@ -142,7 +142,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td colspan="7" class="left" id="guid{$result.guid}">
|
||||
<td colspan="7" class="left" id="guid{$result.grp_release_guid}">
|
||||
<h2>{$result.artist}{" - "}{$result.title}</h2>
|
||||
{if $result.genreid != ""}
|
||||
<b>Genre:</b>
|
||||
|
||||
@@ -93,15 +93,17 @@
|
||||
</div> {/if}
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-mini" target="_blank" href="{$site->dereferrer_link}http://www.imdb.com/title/tt{$release.imdbid}/" title="View at IMDB">IMDB</a>
|
||||
{if $movie.tmdbID != ''}<a class="btn btn-mini" target="_blank" href="{$site->dereferrer_link}http://www.themoviedb.org/movie/{$movie.tmdbID}" title="View at TMDb">TMDb</a>{/if}
|
||||
{if isset($movie.tmdbid) && $movie.tmdbid != ''}<a class="btn btn-mini" target="_blank" href="{$site->dereferrer_link}http://www.themoviedb.org/movie/{$movie.tmdbid}" title="View at TMDb">TMDb</a>{/if}
|
||||
<a class="btn btn-mini" href="{$smarty.const.WWW_TOP}/movies?imdb={$release.imdbid}" title="View all versions">Movie View</a>
|
||||
{if isset($cpurl) && $cpurl != '' && isset($cpapi) && $cpapi != ''}
|
||||
<a
|
||||
class="btn btn-mini" target="blackhole"
|
||||
href="javascript:;"
|
||||
href="javascript:"
|
||||
rel="{$site->dereferrer_link}{$cpurl}/api/{$cpapi}/movie.add/?identifier=tt{$release.imdbid}&title={$movie.title}"
|
||||
name="CP{$release.imdbid}" title="Add to CouchPotato">
|
||||
CouchPotato
|
||||
</a>
|
||||
{/if}
|
||||
<a class="btn btn-mini" target="_blank" href="http://www.opensubtitles.org/search/sublanguageid-all/moviename-{$movie.title|replace:" ":"+"}"title="Opensubtitles">OpenSubtitles</a>
|
||||
<a class="btn btn-mini" target="_blank" href="http://www.subtitleseeker.com/search/MOVIE_TITLES/{$movie.title}"title="SubtitleSeeker">SubtitleSeeker</a>
|
||||
</div>
|
||||
@@ -399,7 +401,7 @@
|
||||
{/if}
|
||||
{foreach from=$reAudio item=audio}
|
||||
<tr>
|
||||
<td><strong>Audio {$audio.audioID}</strong></td>
|
||||
<td><strong>Audio {$audio.audioid}</strong></td>
|
||||
<td>Format</td>
|
||||
<td class="right">{$audio.audioformat}</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user