Empty commit

This commit is contained in:
Git 2012-08-08 08:00:12 +00:00
parent bf1cd3d12f
commit da3ab149ca
12 changed files with 142 additions and 109 deletions

View File

@ -68,7 +68,7 @@ function search($Query='', $CachePrefix='', $CacheLength=0, $ReturnData=array(),
send_irc('PRIVMSG '.LAB_CHAN.' :Search for "'.$Query.'" ('.str_replace("\n",'',print_r($this->Filters, true)).') failed: '.$this->GetLastError()); send_irc('PRIVMSG '.LAB_CHAN.' :Search for "'.$Query.'" ('.str_replace("\n",'',print_r($this->Filters, true)).') failed: '.$this->GetLastError());
} }
$this->TotalResults = $Result['total']; $this->TotalResults = $Result['total_found'];
$this->SearchTime = $Result['time']; $this->SearchTime = $Result['time'];
if(empty($Result['matches'])) { if(empty($Result['matches'])) {
@ -136,11 +136,10 @@ function search($Query='', $CachePrefix='', $CacheLength=0, $ReturnData=array(),
return $Matches; return $Matches;
} }
function limit($Start, $Length, $MaxMatches=SPHINX_MATCHES_START) { function limit($Start, $Length) {
if(check_perms('site_search_many') && empty($_GET['limit_matches'])) { $Start = (int)$Start;
$MaxMatches = 500000; $Length = (int)$Length;
} $this->SetLimits($Start, $Length, $Start+$Length);
$this->SetLimits((int)$Start, (int)$Length, $MaxMatches, 0);
} }

View File

@ -923,10 +923,9 @@ function get_pages($StartPage,$TotalRecords,$ItemsPerPage,$ShowPages=11,$Anchor=
eg. If there are 20 pages that exist, but $ShowPages is only 11, only 11 links will be shown. eg. If there are 20 pages that exist, but $ShowPages is only 11, only 11 links will be shown.
//----------------------------------------------------------------------------*/ //----------------------------------------------------------------------------*/
$StartPage = ceil($StartPage); $StartPage = ceil($StartPage);
if ($StartPage==0) { $StartPage=1; }
$TotalPages = 0; $TotalPages = 0;
if ($TotalRecords > 0) { if ($TotalRecords > 0) {
if ($StartPage>ceil($TotalRecords/$ItemsPerPage)) { $StartPage=ceil($TotalRecords/$ItemsPerPage); } $StartPage = min($StartPage, ceil($TotalRecords/$ItemsPerPage));
$ShowPages--; $ShowPages--;
$TotalPages = ceil($TotalRecords/$ItemsPerPage); $TotalPages = ceil($TotalRecords/$ItemsPerPage);
@ -949,10 +948,12 @@ function get_pages($StartPage,$TotalRecords,$ItemsPerPage,$ShowPages=11,$Anchor=
$StartPosition = 1; $StartPosition = 1;
} }
if ($StartPosition<1) { $StartPosition=1; } $StartPosition = max($StartPosition, 1);
$QueryString = get_url(array('page','post')); $QueryString = get_url(array('page','post'));
if($QueryString != '') { $QueryString = '&amp;'.$QueryString; } if ($QueryString != '') {
$QueryString = '&amp;'.$QueryString;
}
$Pages = ''; $Pages = '';
@ -965,7 +966,9 @@ function get_pages($StartPage,$TotalRecords,$ItemsPerPage,$ShowPages=11,$Anchor=
if (!$Mobile) { if (!$Mobile) {
for ($i = $StartPosition; $i <= $StopPage; $i++) { for ($i = $StartPosition; $i <= $StopPage; $i++) {
//if ($i!=$StartPage) { $Pages.='<a href="'.$Location.'?page='.$i.$QueryString.'">'; } //if ($i!=$StartPage) { $Pages.='<a href="'.$Location.'?page='.$i.$QueryString.'">'; }
if ($i!=$StartPage) { $Pages.='<a href="'.$Location.'?page='.$i.$QueryString.$Anchor.'">'; } if ($i != $StartPage) {
$Pages .= '<a href="'.$Location.'?page='.$i.$QueryString.$Anchor.'">';
}
$Pages .= "<strong>"; $Pages .= "<strong>";
if($i*$ItemsPerPage > $TotalRecords) { if($i*$ItemsPerPage > $TotalRecords) {
$Pages .= ((($i-1)*$ItemsPerPage)+1).'-'.($TotalRecords); $Pages .= ((($i-1)*$ItemsPerPage)+1).'-'.($TotalRecords);
@ -974,21 +977,27 @@ function get_pages($StartPage,$TotalRecords,$ItemsPerPage,$ShowPages=11,$Anchor=
} }
$Pages .= "</strong>"; $Pages .= "</strong>";
if ($i!=$StartPage) { $Pages.='</a>'; } if ($i != $StartPage) {
if ($i<$StopPage) { $Pages.=" | "; } $Pages.='</a>';
}
if ($i < $StopPage) {
$Pages.=" | ";
}
} }
} else { } else {
$Pages .= $StartPage; $Pages .= $StartPage;
} }
if ($StartPage<$TotalPages) { if ($StartPage && $StartPage < $TotalPages) {
$Pages .= ' | <a href="'.$Location.'?page='.($StartPage+1).$QueryString.$Anchor.'" class="pager_next"><strong>Next &gt;</strong></a> '; $Pages .= ' | <a href="'.$Location.'?page='.($StartPage+1).$QueryString.$Anchor.'" class="pager_next"><strong>Next &gt;</strong></a> ';
$Pages .= '<a href="'.$Location.'?page='.$TotalPages.$QueryString.$Anchor.'"><strong> Last &gt;&gt;</strong></a>'; $Pages .= '<a href="'.$Location.'?page='.$TotalPages.$QueryString.$Anchor.'"><strong> Last &gt;&gt;</strong></a>';
} }
} }
if ($TotalPages>1) { return $Pages; } if ($TotalPages > 1) {
return $Pages;
}
} }

View File

@ -230,17 +230,15 @@ function header_link($SortKey,$DefaultWay="desc") {
} }
if(!empty($_GET['page']) && is_number($_GET['page'])) { if(!empty($_GET['page']) && is_number($_GET['page']) && $_GET['page'] > 0) {
if(check_perms('site_search_many')) { if(check_perms('site_search_many')) {
$Page = $_GET['page']; $Page = $_GET['page'];
} else { } else {
$Page = min(SPHINX_MAX_MATCHES/TORRENTS_PER_PAGE, $_GET['page']); $Page = min(SPHINX_MAX_MATCHES/TORRENTS_PER_PAGE, $_GET['page']);
} }
$MaxMatches = min(SPHINX_MAX_MATCHES, SPHINX_MATCHES_START + SPHINX_MATCHES_STEP*floor(($Page-1)*TORRENTS_PER_PAGE/SPHINX_MATCHES_STEP)); $SS->limit(($Page-1)*TORRENTS_PER_PAGE, TORRENTS_PER_PAGE);
$SS->limit(($Page-1)*TORRENTS_PER_PAGE, TORRENTS_PER_PAGE, $MaxMatches);
} else { } else {
$Page = 1; $Page = 1;
$MaxMatches = SPHINX_MATCHES_START;
$SS->limit(0, TORRENTS_PER_PAGE); $SS->limit(0, TORRENTS_PER_PAGE);
} }
@ -259,7 +257,7 @@ function header_link($SortKey,$DefaultWay="desc") {
} elseif($_GET['order_by'] == 'random') { } elseif($_GET['order_by'] == 'random') {
$OrderBy = '@random'; $OrderBy = '@random';
$Way = SPH_SORT_EXTENDED; $Way = SPH_SORT_EXTENDED;
$SS->limit(0, TORRENTS_PER_PAGE, TORRENTS_PER_PAGE); $SS->limit(0, TORRENTS_PER_PAGE);
} else { } else {
$OrderBy = $_GET['order_by']; $OrderBy = $_GET['order_by'];
} }
@ -278,7 +276,11 @@ function header_link($SortKey,$DefaultWay="desc") {
$SS->set_index(SPHINX_INDEX.' delta'); $SS->set_index(SPHINX_INDEX.' delta');
$Results = $SS->search($Query, '', 0, array(), '', ''); $Results = $SS->search($Query, '', 0, array(), '', '');
if(check_perms('site_search_many')) {
$TorrentCount = $SS->TotalResults; $TorrentCount = $SS->TotalResults;
} else {
$TorrentCount = min($SS->TotalResults, SPHINX_MAX_MATCHES);
}
// These ones were not found in the cache, run SQL // These ones were not found in the cache, run SQL
if(!empty($Results['notfound'])) { if(!empty($Results['notfound'])) {
@ -310,6 +312,7 @@ function header_link($SortKey,$DefaultWay="desc") {
if(count($Results)==0) { if(count($Results)==0) {
$DB->query("SELECT $DB->query("SELECT
tags.Name, tags.Name,
((COUNT(tags.Name)-2)*(SUM(tt.PositiveVotes)-SUM(tt.NegativeVotes)))/(tags.Uses*0.8) AS Score ((COUNT(tags.Name)-2)*(SUM(tt.PositiveVotes)-SUM(tt.NegativeVotes)))/(tags.Uses*0.8) AS Score
@ -327,12 +330,12 @@ function header_link($SortKey,$DefaultWay="desc") {
GROUP BY tt.TagID GROUP BY tt.TagID
ORDER BY Score DESC ORDER BY Score DESC
LIMIT 8"); LIMIT 8");
$JsonYouMightLike = array(); $JsonYouMightLike = array();
while(list($Tag)=$DB->next_record()) { while(list($Tag)=$DB->next_record()) {
$JsonYouMightLike[] = $Tag; $JsonYouMightLike[] = $Tag;
} }
print print
json_encode( json_encode(
array( array(

View File

@ -208,10 +208,10 @@
if(!empty($_GET['page']) && is_number($_GET['page'])) { if(!empty($_GET['page']) && is_number($_GET['page'])) {
$Page = min($_GET['page'], 50000/REQUESTS_PER_PAGE); $Page = min($_GET['page'], 50000/REQUESTS_PER_PAGE);
$SS->limit(($Page - 1) * REQUESTS_PER_PAGE, REQUESTS_PER_PAGE, 50000); $SS->limit(($Page - 1) * REQUESTS_PER_PAGE, REQUESTS_PER_PAGE);
} else { } else {
$Page = 1; $Page = 1;
$SS->limit(0, REQUESTS_PER_PAGE, 50000); $SS->limit(0, REQUESTS_PER_PAGE);
} }
if(empty($_GET['order'])) { if(empty($_GET['order'])) {

View File

@ -204,12 +204,12 @@
} }
} }
if(!empty($_GET['page']) && is_number($_GET['page'])) { if(!empty($_GET['page']) && is_number($_GET['page']) && $_GET['page'] > 0) {
$Page = min($_GET['page'], 50000/REQUESTS_PER_PAGE); $Page = $_GET['page'];
$SS->limit(($Page - 1) * REQUESTS_PER_PAGE, REQUESTS_PER_PAGE, 50000); $SS->limit(($Page - 1) * REQUESTS_PER_PAGE, REQUESTS_PER_PAGE);
} else { } else {
$Page = 1; $Page = 1;
$SS->limit(0, REQUESTS_PER_PAGE, 50000); $SS->limit(0, REQUESTS_PER_PAGE);
} }
if(empty($_GET['order'])) { if(empty($_GET['order'])) {
@ -267,34 +267,11 @@
$SS->set_index('requests requests_delta'); $SS->set_index('requests requests_delta');
$SphinxResults = $SS->search($Query, '', 0, array(), '', ''); $SphinxResults = $SS->search($Query, '', 0, array(), '', '');
$NumResults = $SS->TotalResults; $NumResults = $SS->TotalResults;
//We don't use sphinxapi's default cache searcher, we use our own functions if($NumResults && $NumResults < ($Page - 1) * REQUESTS_PER_PAGE + 1) {
$PageLinks = get_pages(0, $NumResults, REQUESTS_PER_PAGE);
if(!empty($SphinxResults['notfound'])) { } else {
$SQLResults = get_requests($SphinxResults['notfound']);
if(is_array($SQLResults['notfound'])) {
//Something wasn't found in the db, remove it from results
reset($SQLResults['notfound']);
foreach($SQLResults['notfound'] as $ID) {
unset($SQLResults['matches'][$ID]);
unset($SphinxResults['matches'][$ID]);
}
}
// Merge SQL results with memcached results
foreach($SQLResults['matches'] as $ID => $SQLResult) {
$SphinxResults['matches'][$ID] = $SQLResult;
//$Requests['matches'][$ID] = array_merge($Requests['matches'][$ID], $SQLResult);
//We ksort because depending on the filter modes, we're given our data in an unpredictable order
//ksort($Requests['matches'][$ID]);
}
}
$PageLinks = get_pages($Page, $NumResults, REQUESTS_PER_PAGE); $PageLinks = get_pages($Page, $NumResults, REQUESTS_PER_PAGE);
}
$Requests = $SphinxResults['matches'];
$CurrentURL = get_url(array('order', 'sort'));
show_header($Title, 'requests'); show_header($Title, 'requests');
@ -451,9 +428,11 @@
</form> </form>
</div> </div>
<? if($NumResults) { ?>
<div class="linkbox"> <div class="linkbox">
<?=$PageLinks?> <?=$PageLinks?>
</div> </div>
<? } ?>
<table id="request_table" cellpadding="6" cellspacing="1" border="0" class="border" width="100%"> <table id="request_table" cellpadding="6" cellspacing="1" border="0" class="border" width="100%">
<tr class="colhead_dark"> <tr class="colhead_dark">
<td style="width: 38%;" class="nobr"> <td style="width: 38%;" class="nobr">
@ -487,7 +466,39 @@
Nothing found! Nothing found!
</td> </td>
</tr> </tr>
<? } elseif($NumResults < ($Page - 1) * REQUESTS_PER_PAGE + 1) { ?>
<tr class="rowb">
<td colspan="8">
The requested page contains no matches!
</td>
</tr>
<? } else { <? } else {
//We don't use sphinxapi's default cache searcher, we use our own functions
if(!empty($SphinxResults['notfound'])) {
$SQLResults = get_requests($SphinxResults['notfound']);
if(is_array($SQLResults['notfound'])) {
//Something wasn't found in the db, remove it from results
reset($SQLResults['notfound']);
foreach($SQLResults['notfound'] as $ID) {
unset($SQLResults['matches'][$ID]);
unset($SphinxResults['matches'][$ID]);
}
}
// Merge SQL results with memcached results
foreach($SQLResults['matches'] as $ID => $SQLResult) {
$SphinxResults['matches'][$ID] = $SQLResult;
//$Requests['matches'][$ID] = array_merge($Requests['matches'][$ID], $SQLResult);
//We ksort because depending on the filter modes, we're given our data in an unpredictable order
//ksort($Requests['matches'][$ID]);
}
}
$Requests = $SphinxResults['matches'];
$CurrentURL = get_url(array('order', 'sort'));
$Row = 'a'; $Row = 'a';
$TimeCompare = 1267643718; // Requests v2 was implemented 2010-03-03 20:15:18 $TimeCompare = 1267643718; // Requests v2 was implemented 2010-03-03 20:15:18
foreach ($Requests as $RequestID => $Request) { foreach ($Requests as $RequestID => $Request) {

View File

@ -1,5 +1,5 @@
<? <?
if(!check_perms('users_mod')) { error(403); } if(!check_perms('users_view_email')) { error(403); }
show_header('Manage email blacklist'); show_header('Manage email blacklist');
$DB->query("SELECT $DB->query("SELECT

View File

@ -1,5 +1,5 @@
<? <?
if(!check_perms('users_mod')) { error(403); } if(!check_perms('users_view_email')) { error(403); }
authorize(); authorize();

View File

@ -1,5 +1,5 @@
<?php <?php
if (!check_perms('users_mod')) { error(403); if (!check_perms('users_view_invites')) { error(403);
} }
show_header('Fishy Invites'); show_header('Fishy Invites');

View File

@ -25,8 +25,10 @@
<tr><td><a href="tools.php?action=dnu">Do not upload list</a></td></tr> <tr><td><a href="tools.php?action=dnu">Do not upload list</a></td></tr>
<? } if (check_perms('site_recommend_own') || check_perms('site_manage_recommendations')) { ?> <? } if (check_perms('site_recommend_own') || check_perms('site_manage_recommendations')) { ?>
<tr><td><a href="tools.php?action=recommend">Vanity House additions</a></td></tr> <tr><td><a href="tools.php?action=recommend">Vanity House additions</a></td></tr>
<? } if (check_perms('users_mod')) { ?>
<? } if (check_perms('users_view_email')) { ?>
<tr><td><a href="tools.php?action=email_blacklist">Email Blacklist</a></td></tr> <tr><td><a href="tools.php?action=email_blacklist">Email Blacklist</a></td></tr>
<? } if (check_perms('users_mod')) { ?>
<tr><td><a href="tools.php?action=tokens">Manage freeleech tokens</a></td></tr> <tr><td><a href="tools.php?action=tokens">Manage freeleech tokens</a></td></tr>
<tr><td><a href="tools.php?action=official_tags">Official Tags Manager</a></td></tr> <tr><td><a href="tools.php?action=official_tags">Official Tags Manager</a></td></tr>
<tr><td><a href="tools.php?action=tag_aliases">Tag Aliases</a></td></tr> <tr><td><a href="tools.php?action=tag_aliases">Tag Aliases</a></td></tr>
@ -47,6 +49,7 @@
<tr><td><a href="tools.php?action=registration_log">Registration Log</a></td></tr> <tr><td><a href="tools.php?action=registration_log">Registration Log</a></td></tr>
<? } if (check_perms('users_view_invites')) { ?> <? } if (check_perms('users_view_invites')) { ?>
<tr><td><a href="tools.php?action=invite_pool">Invite Pool</a></td></tr> <tr><td><a href="tools.php?action=invite_pool">Invite Pool</a></td></tr>
<? } if (check_perms('site_view_flow')) { ?> <? } if (check_perms('site_view_flow')) { ?>
<tr><td><a href="tools.php?action=upscale_pool">Upscale Pool</a></td></tr> <tr><td><a href="tools.php?action=upscale_pool">Upscale Pool</a></td></tr>
<tr><td><a href="tools.php?action=user_flow">User Flow</a></td></tr> <tr><td><a href="tools.php?action=user_flow">User Flow</a></td></tr>

View File

@ -269,18 +269,15 @@ function header_link($SortKey,$DefaultWay="desc") {
$SS->set_filter('categoryid', array_keys($_GET['filter_cat'])); $SS->set_filter('categoryid', array_keys($_GET['filter_cat']));
} }
if(!empty($_GET['page']) && is_number($_GET['page']) && $_GET['page'] > 0) {
if(!empty($_GET['page']) && is_number($_GET['page'])) {
if(check_perms('site_search_many')) { if(check_perms('site_search_many')) {
$Page = $_GET['page']; $Page = $_GET['page'];
} else { } else {
$Page = min(SPHINX_MAX_MATCHES/TORRENTS_PER_PAGE, $_GET['page']); $Page = min(SPHINX_MAX_MATCHES/TORRENTS_PER_PAGE, $_GET['page']);
} }
$MaxMatches = min(SPHINX_MAX_MATCHES, SPHINX_MATCHES_START + SPHINX_MATCHES_STEP*floor(($Page-1)*TORRENTS_PER_PAGE/SPHINX_MATCHES_STEP)); $SS->limit(($Page-1)*TORRENTS_PER_PAGE, TORRENTS_PER_PAGE);
$SS->limit(($Page-1)*TORRENTS_PER_PAGE, TORRENTS_PER_PAGE, $MaxMatches);
} else { } else {
$Page = 1; $Page = 1;
$MaxMatches = SPHINX_MATCHES_START;
$SS->limit(0, TORRENTS_PER_PAGE); $SS->limit(0, TORRENTS_PER_PAGE);
} }
@ -299,7 +296,7 @@ function header_link($SortKey,$DefaultWay="desc") {
} elseif($_GET['order_by'] == 'random') { } elseif($_GET['order_by'] == 'random') {
$OrderBy = '@random'; $OrderBy = '@random';
$Way = SPH_SORT_EXTENDED; $Way = SPH_SORT_EXTENDED;
$SS->limit(0, TORRENTS_PER_PAGE, TORRENTS_PER_PAGE); $SS->limit(0, TORRENTS_PER_PAGE);
} else { } else {
$OrderBy = $_GET['order_by']; $OrderBy = $_GET['order_by'];
} }
@ -318,8 +315,13 @@ function header_link($SortKey,$DefaultWay="desc") {
$SS->set_index(SPHINX_INDEX.' delta'); $SS->set_index(SPHINX_INDEX.' delta');
$Results = $SS->search($Query, '', 0, array(), '', ''); $Results = $SS->search($Query, '', 0, array(), '', '');
if(check_perms('site_search_many')) {
$TorrentCount = $SS->TotalResults; $TorrentCount = $SS->TotalResults;
} else {
$TorrentCount = min($SS->TotalResults, SPHINX_MAX_MATCHES);
}
/* /*
// If some were fetched from memcached, get their artists // If some were fetched from memcached, get their artists
if(!empty($Results['matches'])) { // Fetch the artists for groups if(!empty($Results['matches'])) { // Fetch the artists for groups
@ -367,9 +369,6 @@ function header_link($SortKey,$DefaultWay="desc") {
show_header('Browse Torrents','browse'); show_header('Browse Torrents','browse');
// List of pages
$Pages=get_pages($Page,$TorrentCount,TORRENTS_PER_PAGE);
?> ?>
<form name="filter" method="get" action=''> <form name="filter" method="get" action=''>
@ -553,12 +552,6 @@ function header_link($SortKey,$DefaultWay="desc") {
</select> </select>
</td> </td>
</tr> </tr>
<? if(check_perms('site_search_many')) { ?>
<tr>
<td class="label">Limited search results:</td>
<td><input type="checkbox" value="1" name="limit_matches" <?selected('limit_matches',1,'checked')?> /></td>
</tr>
<? } ?>
</table> </table>
<table class="cat_list"> <table class="cat_list">
<? <?
@ -621,7 +614,7 @@ function header_link($SortKey,$DefaultWay="desc") {
</tr> </tr>
</table> </table>
<div class="submit"> <div class="submit">
<span style="float:left;"><?=number_format($TorrentCount).($TorrentCount < SPHINX_MAX_MATCHES && $TorrentCount == $MaxMatches ? '+' : '')?> Results</span> <span style="float:left;"><?=number_format($TorrentCount)?> Results</span>
<input type="submit" value="Filter Torrents" /> <input type="submit" value="Filter Torrents" />
<input type="button" value="Reset" onclick="location.href='torrents.php<? if(isset($_GET['action']) && $_GET['action']=="advanced") { ?>?action=advanced<? } ?>'" /> <input type="button" value="Reset" onclick="location.href='torrents.php<? if(isset($_GET['action']) && $_GET['action']=="advanced") { ?>?action=advanced<? } ?>'" />
&nbsp;&nbsp; &nbsp;&nbsp;
@ -639,8 +632,7 @@ function header_link($SortKey,$DefaultWay="desc") {
</div> </div>
</form> </form>
<div class="linkbox"><?=$Pages?></div> <? if($TorrentCount == 0) {
<? if(count($Results)==0) {
$DB->query("SELECT $DB->query("SELECT
tags.Name, tags.Name,
((COUNT(tags.Name)-2)*(SUM(tt.PositiveVotes)-SUM(tt.NegativeVotes)))/(tags.Uses*0.8) AS Score ((COUNT(tags.Name)-2)*(SUM(tt.PositiveVotes)-SUM(tt.NegativeVotes)))/(tags.Uses*0.8) AS Score
@ -668,10 +660,26 @@ function header_link($SortKey,$DefaultWay="desc") {
show_footer();die(); show_footer();die();
} }
$Bookmarks = all_bookmarks('torrent'); if($TorrentCount < ($Page-1)*TORRENTS_PER_PAGE+1) {
$LastPage = ceil($TorrentCount/TORRENTS_PER_PAGE);
$Pages = get_pages(0, $TorrentCount, TORRENTS_PER_PAGE);
?>
<div class="box pad" align="center">
<h2>The requested page contains no matches.</h2>
<p>You are requesting page <?=$Page?>, but the search returned only <?=$LastPage?> pages.</p>
</div>
<div class="linkbox">Go to page <?=$Pages?></div>
<?
show_footer();die();
}
// List of pages
$Pages = get_pages($Page, $TorrentCount, TORRENTS_PER_PAGE);
$Bookmarks = all_bookmarks('torrent');
?> ?>
<div class="linkbox"><?=$Pages?></div>
<table class="torrent_table grouping" id="torrent_table"> <table class="torrent_table grouping" id="torrent_table">
<tr class="colhead"> <tr class="colhead">

View File

@ -18,7 +18,7 @@ function header_link($SortKey,$DefaultWay="DESC") {
if(!is_number($UserID)) { error(0); } if(!is_number($UserID)) { error(0); }
if(!empty($_GET['page']) && is_number($_GET['page'])) { if(!empty($_GET['page']) && is_number($_GET['page']) && $_GET['page'] > 0) {
$Page = $_GET['page']; $Page = $_GET['page'];
$Limit = ($Page-1)*TORRENTS_PER_PAGE.', '.TORRENTS_PER_PAGE; $Limit = ($Page-1)*TORRENTS_PER_PAGE.', '.TORRENTS_PER_PAGE;
} else { } else {

View File

@ -481,7 +481,7 @@ ul#userinfo_username {
} }
#torrents #content h2 { #torrents #content h2 {
margin: 10px 0 10px 0; margin: 10px 0 10px 0 !important;
} }
#content h2:first-child { #content h2:first-child {