mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-31 02:08:57 +00:00
Replace more of prehash that were missed
This commit is contained in:
+9
-9
@@ -10,9 +10,9 @@ $predb = new PreDb();
|
||||
|
||||
$offset = (isset($_REQUEST["offset"]) && ctype_digit($_REQUEST['offset'])) ? $_REQUEST["offset"] : 0;
|
||||
|
||||
if (isset($_REQUEST['prehashsearch'])) {
|
||||
$lastSearch = $_REQUEST['prehashsearch'];
|
||||
$parr = $predb->getAll($offset, ITEMS_PER_PAGE, $_REQUEST['prehashsearch']);
|
||||
if (isset($_REQUEST['presearch'])) {
|
||||
$lastSearch = $_REQUEST['presearch'];
|
||||
$parr = $predb->getAll($offset, ITEMS_PER_PAGE, $_REQUEST['presearch']);
|
||||
} else {
|
||||
$lastSearch = '';
|
||||
$parr = $predb->getAll($offset, ITEMS_PER_PAGE);
|
||||
@@ -21,7 +21,7 @@ if (isset($_REQUEST['prehashsearch'])) {
|
||||
$page->smarty->assign('pagertotalitems', $parr['count']);
|
||||
$page->smarty->assign('pageroffset', $offset);
|
||||
$page->smarty->assign('pageritemsperpage', ITEMS_PER_PAGE);
|
||||
$page->smarty->assign('pagerquerybase', WWW_TOP . "/prehash/&offset=");
|
||||
$page->smarty->assign('pagerquerybase', WWW_TOP . "/predb/&offset=");
|
||||
$page->smarty->assign('pagerquerysuffix', "#results");
|
||||
$page->smarty->assign('lastSearch', $lastSearch);
|
||||
|
||||
@@ -30,10 +30,10 @@ $page->smarty->assign('pager', $pager);
|
||||
|
||||
$page->smarty->assign('results', $parr['arr']);
|
||||
|
||||
$page->title = "Browse Prehash";
|
||||
$page->meta_title = "View Prehash info";
|
||||
$page->meta_keywords = "view,prehash,info,description,details";
|
||||
$page->meta_description = "View Prehash info";
|
||||
$page->title = "Browse PreDb";
|
||||
$page->meta_title = "View PreDb info";
|
||||
$page->meta_keywords = "view,predb,info,description,details";
|
||||
$page->meta_description = "View PreDb info";
|
||||
|
||||
$page->content = $page->smarty->fetch('prehash.tpl');
|
||||
$page->content = $page->smarty->fetch('predb.tpl');
|
||||
$page->render();
|
||||
|
||||
@@ -153,7 +153,7 @@ if (isset($_GET['type'])) {
|
||||
$preData = $db->query(
|
||||
sprintf('
|
||||
SELECT p.*
|
||||
FROM prehash p
|
||||
FROM predb p
|
||||
INNER JOIN groups g ON g.id = p.groupid
|
||||
WHERE requestid = %d
|
||||
AND g.name = %s
|
||||
@@ -177,7 +177,7 @@ if (isset($_GET['type'])) {
|
||||
if (isset($_GET['title'])) {
|
||||
$db = new newznab\db\Settings();
|
||||
$preData = $db->query(
|
||||
sprintf('SELECT * FROM prehash p WHERE p.title %s %s %s LIKE %s LIMIT %d OFFSET %d',
|
||||
sprintf('SELECT * FROM predb p WHERE p.title %s %s %s LIKE %s LIMIT %d OFFSET %d',
|
||||
$newer,
|
||||
$older,
|
||||
$nuked,
|
||||
@@ -195,7 +195,7 @@ if (isset($_GET['type'])) {
|
||||
if (isset($_GET['md5']) && strlen($_GET['title']) === 32) {
|
||||
$db = new newznab\db\Settings();
|
||||
$preData = $db->query(
|
||||
sprintf('SELECT * FROM prehash p INNER JOIN predbhash ph ON ph.pre_id = p.id WHERE MATCH(hashes) AGAINST (%s) %s %s %s LIMIT %d OFFSET %d',
|
||||
sprintf('SELECT * FROM predb p INNER JOIN predbhash ph ON ph.pre_id = p.id WHERE MATCH(hashes) AGAINST (%s) %s %s %s LIMIT %d OFFSET %d',
|
||||
$db->escapeString($_GET['md5']),
|
||||
$newer,
|
||||
$older,
|
||||
@@ -212,7 +212,7 @@ if (isset($_GET['type'])) {
|
||||
if (isset($_GET['sha1']) && strlen($_GET['sha1']) === 40) {
|
||||
$db = new newznab\db\Settings();
|
||||
$preData = $db->query(
|
||||
sprintf('SELECT * FROM prehash p INNER JOIN predbhash ph ON ph.pre_id = p.id WHERE MATCH(hashes) AGAINST (%s) %s %s %s LIMIT %d OFFSET %d',
|
||||
sprintf('SELECT * FROM predb p INNER JOIN predbhash ph ON ph.pre_id = p.id WHERE MATCH(hashes) AGAINST (%s) %s %s %s LIMIT %d OFFSET %d',
|
||||
$db->escapeString($_GET['sha1']),
|
||||
$newer,
|
||||
$older,
|
||||
@@ -228,7 +228,7 @@ if (isset($_GET['type'])) {
|
||||
case 'all':
|
||||
$db = new newznab\db\Settings();
|
||||
$preData = $db->query(
|
||||
sprintf('SELECT * FROM prehash p WHERE 1=1 %s %s %s ORDER BY p.predate DESC LIMIT %d OFFSET %d',
|
||||
sprintf('SELECT * FROM predb p WHERE 1=1 %s %s %s ORDER BY p.predate DESC LIMIT %d OFFSET %d',
|
||||
$newer,
|
||||
$older,
|
||||
$nuked,
|
||||
@@ -291,4 +291,4 @@ function sanitize($string)
|
||||
{
|
||||
//return $string;
|
||||
return preg_replace('/[^\x{0009}\x{000a}\x{000d}\x{0020}-\x{D7FF}\x{E000}-\x{FFFD}]+/u', '.', $string);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
<?php
|
||||
|
||||
use newznab\Movie;
|
||||
use libs\Tmdb\TmdbAPI;
|
||||
use newznab\db\Settings;
|
||||
|
||||
if (!$page->users->isLoggedIn()) {
|
||||
$page->show403();
|
||||
}
|
||||
|
||||
$m = new Movie();
|
||||
$pdo = new Settings();
|
||||
$tmdb = new TmdbAPI($pdo->getSetting('tmdbkey'));
|
||||
|
||||
if (!isset($_GET["id"])) {
|
||||
$_GET["id"] = 1;
|
||||
@@ -17,8 +19,8 @@ $cpurl = $user['cp_url'];
|
||||
$page->smarty->assign('cpapi', $cpapi);
|
||||
$page->smarty->assign('cpurl', $cpurl);
|
||||
|
||||
$data = $m->getUpcoming($_GET["id"]);
|
||||
//print_r(json_decode($data["info"])->movies);die();
|
||||
$data = $tmdb->upcomingMovies();
|
||||
|
||||
if (!$data || $data["info"] == "") {
|
||||
$page->smarty->assign("nodata", "No upcoming data.");
|
||||
} else {
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
<li><a href="{$smarty.const.WWW_TOP}/xxx"><i class="fa fa-venus-mars"></i><span> Adult</span></a></li>
|
||||
<li><a href="{$smarty.const.WWW_TOP}/books"><i class="fa fa-book"></i><span> Books</span></a></li>
|
||||
<li><a href="{$smarty.const.WWW_TOP}/browse"><i class="fa fa-list-ul"></i><span> Browse All Releases</span></a>
|
||||
<li><a href="{$smarty.const.WWW_TOP}/prehash"><i
|
||||
<li><a href="{$smarty.const.WWW_TOP}/predb"><i
|
||||
class="fa fa-list-ol"></i><span> PreDb</span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
{$site->adbrowse}
|
||||
{/if}
|
||||
<h1>{$page->title}</h1>
|
||||
<form name="prehashsearch" method="get" action="{$smarty.const.WWW_TOP}/prehash" id="custom-search-form"
|
||||
<form name="presearch" method="get" action="{$smarty.const.WWW_TOP}/predb" id="custom-search-form"
|
||||
class="form-search form-horizontal col-4 col-lg-4 pull-right">
|
||||
<div id="search" class="input-group col-12 col-lg-12">
|
||||
<input type="text" class="form-control" placeholder="Search prehash" id="prehashsearch" name="prehashsearch"
|
||||
<input type="text" class="form-control" placeholder="Search predb" id="presearch" name="presearch"
|
||||
value="{$lastSearch|escape:'html'}">
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" value="Go" class="btn btn-default">
|
||||
@@ -37,10 +37,10 @@
|
||||
</tr>
|
||||
{foreach from=$results item=result}
|
||||
<tr class="{cycle values=",alt"}">
|
||||
<td class="prehash" style="text-align:center;">
|
||||
<td class="predb" style="text-align:center;">
|
||||
{$result.predate|date_format:"%Y-%m-%d %H:%M:%S"}
|
||||
</td>
|
||||
<td class="prehash" style="text-align:center;">
|
||||
<td class="predb" style="text-align:center;">
|
||||
{if isset($result.guid)}
|
||||
<a style="font-style:italic;text-decoration:underline;color:#{if $result.nuked == 1}009933{elseif $result.nuked > 1}990000{/if};"
|
||||
class="title" title="View details"
|
||||
@@ -52,7 +52,7 @@
|
||||
title="{if $result.nuked == 1}UNNUKED: {$result.nukereason|escape:"htmlall"}{elseif $result.nuked > 1}NUKED: {$result.nukereason|escape:"htmlall"}{else}{$result.title|escape:"htmlall"}{/if}">{$result.title|escape:"htmlall"}</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td class="prehash" style="text-align:center;">
|
||||
<td class="predb" style="text-align:center;">
|
||||
{* Console *}
|
||||
{* Xbox 360 *}
|
||||
{if {$result.category} == 'XBOX360'}
|
||||
@@ -182,7 +182,7 @@
|
||||
{$result.category}
|
||||
{/if}
|
||||
</td>
|
||||
<td class="prehash" style="text-align:center;">
|
||||
<td class="predb" style="text-align:center;">
|
||||
{if {$result.source} == abgx}
|
||||
<a title="Visit abgx"
|
||||
href="{$site->dereferrer_link}http://www.abgx.net/rss/x360/posted.rss"
|
||||
@@ -274,7 +274,7 @@
|
||||
{$result.source}
|
||||
{/if}
|
||||
</td>
|
||||
<td class="prehash" style="text-align:center;">
|
||||
<td class="predb" style="text-align:center;">
|
||||
{if is_numeric({$result.requestid}) && {$result.requestid} != 0}
|
||||
<a
|
||||
class="requestid"
|
||||
@@ -289,7 +289,7 @@
|
||||
N/A
|
||||
{/if}
|
||||
</td>
|
||||
<td class="prehash" style="text-align:center;">
|
||||
<td class="predb" style="text-align:center;">
|
||||
{if not in_array({$result.size}, array('NULL', '', '0MB'))}
|
||||
{if strpos($result.size, 'MB') != false && {$result.size|regex_replace:"/(\.\d|,|MB)+/":''|count_characters} > 3}
|
||||
{math equation=($result.size|regex_replace:'/(\.\d|,|MB)+/':'' / 1024)|round}GB
|
||||
@@ -300,14 +300,14 @@
|
||||
N/A
|
||||
{/if}
|
||||
</td>
|
||||
<td class="prehash" style="text-align:center;">
|
||||
<td class="predb" style="text-align:center;">
|
||||
{if isset($result.files)}
|
||||
{$result.files}
|
||||
{else}
|
||||
N/A
|
||||
{/if}
|
||||
</td>
|
||||
<td class="prehash" style="text-align:center;">
|
||||
<td class="predb" style="text-align:center;">
|
||||
<a
|
||||
style="float: right;"
|
||||
title="NzbIndex"
|
||||
@@ -318,7 +318,7 @@
|
||||
|
||||
</a>
|
||||
</td>
|
||||
<td class="prehash" style="text-align:center;">
|
||||
<td class="predb" style="text-align:center;">
|
||||
<a
|
||||
style="float: right;"
|
||||
title="BinSearch"
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
{$site->adbrowse}
|
||||
{/if}
|
||||
<h1>{$page->title}</h1>
|
||||
<form name="prehashsearch" method="get" action="{$smarty.const.WWW_TOP}/prehash" id="custom-search-form"
|
||||
<form name="presearch" method="get" action="{$smarty.const.WWW_TOP}/predb" id="custom-search-form"
|
||||
class="form-search form-horizontal col-4 col-lg-4 pull-right">
|
||||
<div id="search" class="input-group col-12 col-lg-12">
|
||||
<input type="text" class="form-control" placeholder="Search prehash" id="prehashsearch" name="prehashsearch"
|
||||
<input type="text" class="form-control" placeholder="Search predb" id="presearch" name="presearch"
|
||||
value="{$lastSearch|escape:'html'}">
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" value="Go" class="btn btn-default">
|
||||
@@ -37,10 +37,10 @@
|
||||
</tr>
|
||||
{foreach from=$results item=result}
|
||||
<tr class="{cycle values=",alt"}">
|
||||
<td class="prehash" style="text-align:center;">
|
||||
<td class="predb" style="text-align:center;">
|
||||
{$result.predate|date_format:"%Y-%m-%d %H:%M:%S"}
|
||||
</td>
|
||||
<td class="prehash" style="text-align:center;">
|
||||
<td class="predb" style="text-align:center;">
|
||||
{if isset($result.guid)}
|
||||
<a style="font-style:italic;text-decoration:underline;color:#{if $result.nuked == 1}009933{elseif $result.nuked > 1}990000{/if};"
|
||||
class="title" title="View details"
|
||||
@@ -52,7 +52,7 @@
|
||||
title="{if $result.nuked == 1}UNNUKED: {$result.nukereason|escape:"htmlall"}{elseif $result.nuked > 1}NUKED: {$result.nukereason|escape:"htmlall"}{else}{$result.title|escape:"htmlall"}{/if}">{$result.title|escape:"htmlall"}</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td class="prehash" style="text-align:center;">
|
||||
<td class="predb" style="text-align:center;">
|
||||
{* Console *}
|
||||
{* Xbox 360 *}
|
||||
{if {$result.category} == 'XBOX360'}
|
||||
@@ -182,7 +182,7 @@
|
||||
{$result.category}
|
||||
{/if}
|
||||
</td>
|
||||
<td class="prehash" style="text-align:center;">
|
||||
<td class="predb" style="text-align:center;">
|
||||
{if {$result.source} == abgx}
|
||||
<a title="Visit abgx"
|
||||
href="{$site->dereferrer_link}http://www.abgx.net/rss/x360/posted.rss"
|
||||
@@ -262,7 +262,7 @@
|
||||
{$result.source}
|
||||
{/if}
|
||||
</td>
|
||||
<td class="prehash" style="text-align:center;">
|
||||
<td class="predb" style="text-align:center;">
|
||||
{if is_numeric({$result.requestid}) && {$result.requestid} != 0}
|
||||
<a
|
||||
class="requestid"
|
||||
@@ -277,7 +277,7 @@
|
||||
N/A
|
||||
{/if}
|
||||
</td>
|
||||
<td class="prehash" style="text-align:center;">
|
||||
<td class="predb" style="text-align:center;">
|
||||
{if not in_array({$result.size}, array('NULL', '', '0MB'))}
|
||||
{if strpos($result.size, 'MB') != false && {$result.size|regex_replace:"/(\.\d|,|MB)+/":''|count_characters} > 3}
|
||||
{math equation=($result.size|regex_replace:'/(\.\d|,|MB)+/':'' / 1024)|round}GB
|
||||
@@ -288,14 +288,14 @@
|
||||
N/A
|
||||
{/if}
|
||||
</td>
|
||||
<td class="prehash" style="text-align:center;">
|
||||
<td class="predb" style="text-align:center;">
|
||||
{if isset($result.files)}
|
||||
{$result.files}
|
||||
{else}
|
||||
N/A
|
||||
{/if}
|
||||
</td>
|
||||
<td class="prehash" style="text-align:center;">
|
||||
<td class="predb" style="text-align:center;">
|
||||
<a
|
||||
style="float: right;"
|
||||
title="NzbIndex"
|
||||
@@ -306,7 +306,7 @@
|
||||
|
||||
</a>
|
||||
</td>
|
||||
<td class="prehash" style="text-align:center;">
|
||||
<td class="predb" style="text-align:center;">
|
||||
<a
|
||||
style="float: right;"
|
||||
title="BinSearch"
|
||||
|
||||
@@ -207,7 +207,7 @@
|
||||
<li><a href="{$smarty.const.WWW_TOP}/books"><i class="fa fa-book"></i><span> Books</span></a></li>
|
||||
<li><a href="{$smarty.const.WWW_TOP}/browse"><i
|
||||
class="fa fa-list-ul"></i><span> Browse All Releases</span></a></li>
|
||||
<li><a href="{$smarty.const.WWW_TOP}/prehash"><i class="fa fa-list-ol"></i><span> PreDb</span></a>
|
||||
<li><a href="{$smarty.const.WWW_TOP}/predb"><i class="fa fa-list-ol"></i><span> PreDb</span></a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
{$site->adbrowse}
|
||||
{/if}
|
||||
<h1>{$page->title}</h1>
|
||||
<form name="prehashsearch" method="get" action="{$smarty.const.WWW_TOP}/prehash" id="custom-search-form"
|
||||
<form name="presearch" method="get" action="{$smarty.const.WWW_TOP}/predb" id="custom-search-form"
|
||||
class="form-search form-horizontal col-4 col-lg-4 pull-right">
|
||||
<div id="search" class="input-group col-12 col-lg-12">
|
||||
<input type="text" class="form-control" placeholder="Search prehash" id="prehashsearch" name="prehashsearch"
|
||||
<input type="text" class="form-control" placeholder="Search predb" id="presearch" name="presearch"
|
||||
value="{$lastSearch|escape:'html'}">
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" value="Go" class="btn btn-default">
|
||||
@@ -37,10 +37,10 @@
|
||||
</tr>
|
||||
{foreach from=$results item=result}
|
||||
<tr class="{cycle values=",alt"}">
|
||||
<td class="prehash" style="text-align:center;">
|
||||
<td class="predb" style="text-align:center;">
|
||||
{$result.predate|date_format:"%Y-%m-%d %H:%M:%S"}
|
||||
</td>
|
||||
<td class="prehash" style="text-align:center;">
|
||||
<td class="predb" style="text-align:center;">
|
||||
{if isset($result.guid)}
|
||||
<a style="font-style:italic;text-decoration:underline;color:#{if $result.nuked == 1}009933{elseif $result.nuked > 1}990000{/if};"
|
||||
class="title" title="View details"
|
||||
@@ -52,7 +52,7 @@
|
||||
title="{if $result.nuked == 1}UNNUKED: {$result.nukereason|escape:"htmlall"}{elseif $result.nuked > 1}NUKED: {$result.nukereason|escape:"htmlall"}{else}{$result.title|escape:"htmlall"}{/if}">{$result.title|escape:"htmlall"}</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td class="prehash" style="text-align:center;">
|
||||
<td class="predb" style="text-align:center;">
|
||||
{* Console *}
|
||||
{* Xbox 360 *}
|
||||
{if {$result.category} == 'XBOX360'}
|
||||
@@ -182,7 +182,7 @@
|
||||
{$result.category}
|
||||
{/if}
|
||||
</td>
|
||||
<td class="prehash" style="text-align:center;">
|
||||
<td class="predb" style="text-align:center;">
|
||||
{if {$result.source} == abgx}
|
||||
<a title="Visit abgx"
|
||||
href="{$site->dereferrer_link}http://www.abgx.net/rss/x360/posted.rss"
|
||||
@@ -262,7 +262,7 @@
|
||||
{$result.source}
|
||||
{/if}
|
||||
</td>
|
||||
<td class="prehash" style="text-align:center;">
|
||||
<td class="predb" style="text-align:center;">
|
||||
{if is_numeric({$result.requestid}) && {$result.requestid} != 0}
|
||||
<a
|
||||
class="requestid"
|
||||
@@ -277,7 +277,7 @@
|
||||
N/A
|
||||
{/if}
|
||||
</td>
|
||||
<td class="prehash" style="text-align:center;">
|
||||
<td class="predb" style="text-align:center;">
|
||||
{if not in_array({$result.size}, array('NULL', '', '0MB'))}
|
||||
{if strpos($result.size, 'MB') != false && {$result.size|regex_replace:"/(\.\d|,|MB)+/":''|count_characters} > 3}
|
||||
{math equation=($result.size|regex_replace:'/(\.\d|,|MB)+/':'' / 1024)|round}GB
|
||||
@@ -288,14 +288,14 @@
|
||||
N/A
|
||||
{/if}
|
||||
</td>
|
||||
<td class="prehash" style="text-align:center;">
|
||||
<td class="predb" style="text-align:center;">
|
||||
{if isset($result.files)}
|
||||
{$result.files}
|
||||
{else}
|
||||
N/A
|
||||
{/if}
|
||||
</td>
|
||||
<td class="prehash" style="text-align:center;">
|
||||
<td class="predb" style="text-align:center;">
|
||||
<a
|
||||
style="float: right;"
|
||||
title="NzbIndex"
|
||||
@@ -306,7 +306,7 @@
|
||||
|
||||
</a>
|
||||
</td>
|
||||
<td class="prehash" style="text-align:center;">
|
||||
<td class="predb" style="text-align:center;">
|
||||
<a
|
||||
style="float: right;"
|
||||
title="BinSearch"
|
||||
|
||||
Reference in New Issue
Block a user