2012-10-27 08:00:09 +00:00
< ?
// We need these to do our rankification
include ( SERVER_ROOT . '/sections/torrents/ranking_funcs.php' );
include ( SERVER_ROOT . '/sections/bookmarks/functions.php' );
2012-11-02 08:00:18 +00:00
$UserVotes = Votes :: get_user_votes ( $LoggedUser [ 'ID' ]);
2012-10-27 08:00:09 +00:00
if ( ! empty ( $_GET [ 'advanced' ]) && check_perms ( 'site_advanced_top10' )) {
$Details = 'all' ;
2012-10-29 08:00:20 +00:00
$Limit = 25 ;
2012-10-28 08:00:19 +00:00
2012-10-27 08:00:09 +00:00
if ( $_GET [ 'tags' ]) {
$Tags = explode ( ',' , str_replace ( " . " , " _ " , trim ( $_GET [ 'tags' ])));
foreach ( $Tags as $Tag ) {
$Tag = preg_replace ( '/[^a-z0-9_]/' , '' , $Tag );
if ( $Tag != '' ) {
$Where [] = " g.TagList REGEXP '[[:<:]] " . db_string ( $Tag ) . " [[:>:]]' " ;
}
}
}
$Year1 = ( int ) $_GET [ 'year1' ];
$Year2 = ( int ) $_GET [ 'year2' ];
if ( $Year1 > 0 && $Year2 <= 0 ) {
$Where [] = " g.Year = $Year1 " ;
} elseif ( $Year1 > 0 && $Year2 > 0 ) {
$Where [] = " g.Year BETWEEN $Year1 AND $Year2 " ;
} elseif ( $Year2 > 0 && $Year1 <= 0 ) {
$Where [] = " g.Year <= $Year2 " ;
2012-10-28 08:00:19 +00:00
}
2012-10-27 08:00:09 +00:00
} else {
$Details = 'all' ;
// defaults to 10 (duh)
2012-10-29 08:00:20 +00:00
$Limit = isset ( $_GET [ 'limit' ]) ? intval ( $_GET [ 'limit' ]) : 25 ;
$Limit = in_array ( $Limit , array ( 25 , 100 , 250 )) ? $Limit : 25 ;
2012-10-27 08:00:09 +00:00
}
$Filtered = ! empty ( $Where );
2012-10-29 08:00:20 +00:00
if ( $_GET [ 'anyall' ] == 'any' && ! empty ( $Where )) {
2012-10-28 08:00:19 +00:00
$Where = '(' . implode ( ' OR ' , $Where ) . ')' ;
} else {
$Where = implode ( ' AND ' , $Where );
}
2012-10-27 08:00:09 +00:00
$WhereSum = ( empty ( $Where )) ? '' : md5 ( $Where );
// Unlike the other top 10s, this query just gets some raw stats
// We'll need to do some fancy-pants stuff to translate it into
// BPCI scores before getting the torrent data
2012-10-28 08:00:19 +00:00
$Query = " SELECT v.GroupID, v.Ups, v.Total, v.Score
2012-10-27 08:00:09 +00:00
FROM torrents_votes AS v " ;
if ( ! empty ( $Where )) {
$Query .= " JOIN torrents_group AS g ON g.ID = v.GroupID
WHERE $Where AND " ;
} else {
$Query .= " WHERE " ;
}
$Query .= " Score > 0 ORDER BY Score DESC LIMIT $Limit " ;
$TopVotes = $Cache -> get_value ( 'top10votes_' . $Limit . $WhereSum );
if ( $TopVotes === false ) {
2012-10-28 08:00:19 +00:00
if ( $Cache -> get_query_lock ( 'top10votes' )) {
2012-10-27 08:00:09 +00:00
$DB -> query ( $Query );
$Results = $DB -> collect ( 'GroupID' );
2012-10-28 08:00:19 +00:00
$Data = $DB -> to_array ( 'GroupID' );
2013-02-12 08:00:08 +00:00
2012-10-27 08:00:09 +00:00
$Groups = Torrents :: get_groups ( $Results );
if ( count ( $Results ) > 0 ) {
2012-10-28 08:00:19 +00:00
$DB -> query ( ' SELECT ID , CategoryID FROM torrents_group
2012-10-27 08:00:09 +00:00
WHERE ID IN ( '.implode(' , ', $Results).' ) ' );
$Cats = $DB -> to_array ( 'ID' );
}
// Make sure it's still in order.
$TopVotes = array ();
foreach ( $Results as $GroupID ) {
$TopVotes [ $GroupID ] = $Groups [ 'matches' ][ $GroupID ];
$TopVotes [ $GroupID ][ 'CategoryID' ] = $Cats [ $GroupID ][ 'CategoryID' ];
2012-10-28 08:00:19 +00:00
$TopVotes [ $GroupID ][ 'Ups' ] = $Data [ $GroupID ][ 'Ups' ];
$TopVotes [ $GroupID ][ 'Total' ] = $Data [ $GroupID ][ 'Total' ];
$TopVotes [ $GroupID ][ 'Score' ] = $Data [ $GroupID ][ 'Score' ];
2012-10-27 08:00:09 +00:00
}
2012-10-28 08:00:19 +00:00
2012-10-27 08:00:09 +00:00
$Cache -> cache_value ( 'top10votes_' . $Limit . $WhereSum , $TopVotes , 60 * 30 );
$Cache -> clear_query_lock ( 'top10votes' );
} else {
$TopVotes = false ;
}
}
2012-10-28 08:00:19 +00:00
2012-11-02 08:00:18 +00:00
View :: show_header ( 'Top ' . $Limit . ' Voted Groups' , 'browse,voting' );
2012-10-27 08:00:09 +00:00
?>
< div class = " thin " >
< div class = " header " >
< h2 > Top < ? = $Limit ?> Voted Groups</h2>
< div class = " linkbox " >
2013-02-09 08:01:01 +00:00
< a href = " top10.php?type=torrents " class = " brackets " > Torrents </ a >
< a href = " top10.php?type=users " class = " brackets " > Users </ a >
< a href = " top10.php?type=tags " class = " brackets " > Tags </ a >
< a href = " top10.php?type=votes " class = " brackets " >< strong > Favorites </ strong ></ a >
2012-10-27 08:00:09 +00:00
</ div >
</ div >
< ?
if ( check_perms ( 'site_advanced_top10' )) { ?>
< form class = " search_form " name = " votes " action = " " method = " get " >
< input type = " hidden " name = " advanced " value = " 1 " />
< input type = " hidden " name = " type " value = " votes " />
< table cellpadding = " 6 " cellspacing = " 1 " border = " 0 " class = " layout border " width = " 100% " >
2012-11-06 08:00:20 +00:00
< tr id = " tagfilter " >
2012-10-27 08:00:09 +00:00
< td class = " label " > Tags ( comma - separated ) :</ td >
2012-11-06 08:00:20 +00:00
< td class = " ft_taglist " >
< input type = " text " name = " tags " size = " 75 " value = " <? if(!empty( $_GET['tags'] )) { echo display_str( $_GET['tags'] );} ?> " />& nbsp ;
2013-01-15 08:00:37 +00:00
< input type = " radio " id = " rdoAll " name = " anyall " value = " all " < ? = ( $_GET [ 'anyall' ] != 'any' ? ' checked="checked"' : '' ) ?> /><label for="rdoAll"> All</label>
< input type = " radio " id = " rdoAny " name = " anyall " value = " any " < ? = ( $_GET [ 'anyall' ] == 'any' ? ' checked="checked"' : '' ) ?> /><label for="rdoAny"> Any</label>
2012-10-28 08:00:19 +00:00
</ td >
</ tr >
2012-11-06 08:00:20 +00:00
< tr id = " yearfilter " >
2012-10-27 08:00:09 +00:00
< td class = " label " > Year :</ td >
2012-11-06 08:00:20 +00:00
< td class = " ft_year " >
2012-10-27 08:00:09 +00:00
< input type = " text " name = " year1 " size = " 4 " value = " <? if(!empty( $_GET['year1'] )) { echo display_str( $_GET['year1'] );} ?> " />
to
< input type = " text " name = " year2 " size = " 4 " value = " <? if(!empty( $_GET['year2'] )) { echo display_str( $_GET['year2'] );} ?> " />
</ td >
</ tr >
< tr >
< td colspan = " 2 " class = " center " >
< input type = " submit " value = " Filter torrents " />
</ td >
</ tr >
2012-10-28 08:00:19 +00:00
</ table >
2012-10-27 08:00:09 +00:00
</ form >
< ?
}
$Bookmarks = all_bookmarks ( 'torrent' );
?>
< h3 > Top < ? = $Limit . ' ' . $Caption ?>
2012-10-28 08:00:19 +00:00
< ?
if ( empty ( $_GET [ 'advanced' ])){ ?>
2013-02-12 08:00:08 +00:00
< small class = " top10_quantity_links " >
2012-10-28 08:00:19 +00:00
< ?
2012-10-27 08:00:09 +00:00
switch ( $Limit ) {
case 100 : ?>
2013-02-09 08:01:01 +00:00
- < a href = " top10.php?type=votes " class = " brackets " > Top 25 </ a >
- < span class = " brackets " > Top 100 </ span >
- < a href = " top10.php?type=votes&limit=250 " class = " brackets " > Top 250 </ a >
2012-10-27 08:00:09 +00:00
< ? break ;
case 250 : ?>
2013-02-09 08:01:01 +00:00
- < a href = " top10.php?type=votes " class = " brackets " > Top 25 </ a >
- < a href = " top10.php?type=votes&limit=100 " class = " brackets " > Top 100 </ a >
- < span class = " brackets " > Top 250 </ span >
2012-10-27 08:00:09 +00:00
< ? break ;
default : ?>
2013-02-09 08:01:01 +00:00
- < span class = " brackets " > Top 25 </ span >
- < a href = " top10.php?type=votes&limit=100 " class = " brackets " > Top 100 </ a >
- < a href = " top10.php?type=votes&limit=250 " class = " brackets " > Top 250 </ a >
2012-10-27 08:00:09 +00:00
< ? } ?>
</ small >
< ?
2012-10-28 08:00:19 +00:00
} ?>
2012-10-27 08:00:09 +00:00
</ h3 >
< ?
2012-10-28 08:00:19 +00:00
2012-10-27 08:00:09 +00:00
// This code was copy-pasted from collages and should die in a fire
$Number = 0 ;
$NumGroups = 0 ;
foreach ( $TopVotes as $GroupID => $Group ) {
2012-10-28 08:00:19 +00:00
list ( $GroupID , $GroupName , $GroupYear , $GroupRecordLabel ,
$GroupCatalogueNumber , $TagList , $ReleaseType , $GroupVanityHouse ,
2012-12-06 08:00:17 +00:00
$Torrents , $GroupArtists , $ExtendedArtists , $GroupFlags , $GroupCategoryID , $Ups , $Total , $Score ) = array_values ( $Group );
2012-10-28 08:00:19 +00:00
2012-11-04 08:00:20 +00:00
$IsBookmarked = in_array ( $GroupID , $Bookmarks );
2012-10-27 08:00:09 +00:00
// Handle stats and stuff
$Number ++ ;
$NumGroups ++ ;
$TagList = explode ( ' ' , str_replace ( '_' , '.' , $TagList ));
$TorrentTags = array ();
foreach ( $TagList as $Tag ) {
$TorrentTags [] = '<a href="torrents.php?taglist=' . $Tag . '">' . $Tag . '</a>' ;
}
$PrimaryTag = $TagList [ 0 ];
$TorrentTags = implode ( ', ' , $TorrentTags );
$TorrentTags = '<br /><div class="tags">' . $TorrentTags . '</div>' ;
$DisplayName = $Number . ' - ' ;
2012-10-28 08:00:19 +00:00
2012-10-27 08:00:09 +00:00
if ( ! empty ( $ExtendedArtists [ 1 ]) || ! empty ( $ExtendedArtists [ 4 ]) || ! empty ( $ExtendedArtists [ 5 ]) || ! empty ( $ExtendedArtists [ 6 ])) {
unset ( $ExtendedArtists [ 2 ]);
unset ( $ExtendedArtists [ 3 ]);
$DisplayName .= Artists :: display_artists ( $ExtendedArtists );
} elseif ( count ( $GroupArtists ) > 0 ) {
$DisplayName .= Artists :: display_artists ( array ( '1' => $GroupArtists ));
}
2012-10-28 08:00:19 +00:00
2012-10-27 08:00:09 +00:00
$DisplayName .= '<a href="torrents.php?id=' . $GroupID . '" title="View Torrent">' . $GroupName . '</a>' ;
if ( $GroupYear > 0 ) { $DisplayName = $DisplayName . ' [' . $GroupYear . ']' ;}
if ( $GroupVanityHouse ) { $DisplayName .= ' [<abbr title="This is a vanity house release">VH</abbr>]' ; }
// Start an output buffer, so we can store this output in $TorrentTable
ob_start ();
if ( count ( $Torrents ) > 1 || $GroupCategoryID == 1 ) {
2012-12-06 08:00:17 +00:00
// Grouped torrents
$GroupSnatched = false ;
foreach ( $Torrents as & $Torrent ) {
if (( $Torrent [ 'IsSnatched' ] = Torrents :: has_snatched ( $Torrent [ 'ID' ])) && ! $GroupSnatched ) {
$GroupSnatched = true ;
}
}
$SnatchedGroupClass = $GroupSnatched ? ' snatched_group' : '' ;
2012-10-27 08:00:09 +00:00
?>
2012-12-06 08:00:17 +00:00
< tr class = " group discog<?= $SnatchedGroupClass ?> " id = " group_<?= $GroupID ?> " >
2012-10-27 08:00:09 +00:00
< td class = " center " >
< div title = " View " id = " showimg_<?= $GroupID ?> " class = " show_torrents " >
2012-12-27 08:00:27 +00:00
< a href = " # " class = " show_torrents_link " onclick = " toggle_group(<?= $GroupID ?>, this, event) " title = " Collapse this group. Hold "Ctrl" while clicking to collapse all groups on this page. " ></ a >
2012-10-27 08:00:09 +00:00
</ div >
</ td >
< td class = " center " >
< div title = " <?=ucfirst(str_replace('_',' ', $PrimaryTag ))?> " class = " cats_<?=strtolower(str_replace(array('-',' '),array('',''), $Categories[$GroupCategoryID-1] ))?> tags_<?=str_replace('.','_', $PrimaryTag )?> " ></ div >
</ td >
< td >
2012-11-02 08:00:18 +00:00
< strong >< ? = $DisplayName ?> </strong> <!--<?Votes::vote_link($GroupID,$UserVotes[$GroupID]['Type']);?>-->
2012-11-04 08:00:20 +00:00
< ? if ( $IsBookmarked ) { ?>
2013-02-09 08:01:01 +00:00
< span class = " bookmark " style = " float:right; " >< a href = " # " id = " bookmarklink_torrent_<?= $GroupID ?> " class = " brackets remove_bookmark " title = " Remove bookmark " onclick = " Unbookmark('torrent',<?= $GroupID ?>,'Bookmark');return false; " > Unbookmark </ a ></ span >
2012-10-27 08:00:09 +00:00
< ? } else { ?>
2013-02-09 08:01:01 +00:00
< span class = " bookmark " style = " float:right; " >< a href = " # " id = " bookmarklink_torrent_<?= $GroupID ?> " class = " brackets add_bookmark " title = " Add bookmark " onclick = " Bookmark('torrent',<?= $GroupID ?>,'Unbookmark');return false; " > Bookmark </ a ></ span >
2012-10-27 08:00:09 +00:00
< ? } ?>
< ? = $TorrentTags ?>
</ td >
2013-02-12 08:00:08 +00:00
< td colspan = " 4 " class = " votes_info_td " >< strong >< ? = number_format ( $Ups ) ?> </strong> upvotes out of <strong><?=number_format($Total)?></strong> total (<span title="Score: <?=number_format($Score*100,4)?>">Score: <?=number_format($Score*100)?></span>).</td>
2012-10-27 08:00:09 +00:00
</ tr >
< ?
$LastRemasterYear = '-' ;
$LastRemasterTitle = '' ;
$LastRemasterRecordLabel = '' ;
$LastRemasterCatalogueNumber = '' ;
$LastMedia = '' ;
2012-10-28 08:00:19 +00:00
2012-10-27 08:00:09 +00:00
$EditionID = 0 ;
unset ( $FirstUnknown );
2012-10-28 08:00:19 +00:00
2012-10-27 08:00:09 +00:00
foreach ( $Torrents as $TorrentID => $Torrent ) {
if ( $Torrent [ 'Remastered' ] && ! $Torrent [ 'RemasterYear' ]) {
$FirstUnknown = ! isset ( $FirstUnknown );
}
2012-12-06 08:00:17 +00:00
$SnatchedTorrentClass = $Torrent [ 'IsSnatched' ] ? ' snatched_torrent' : '' ;
2012-10-28 08:00:19 +00:00
2012-10-27 08:00:09 +00:00
if ( $Torrent [ 'RemasterTitle' ] != $LastRemasterTitle || $Torrent [ 'RemasterYear' ] != $LastRemasterYear ||
$Torrent [ 'RemasterRecordLabel' ] != $LastRemasterRecordLabel || $Torrent [ 'RemasterCatalogueNumber' ] != $LastRemasterCatalogueNumber || $FirstUnknown || $Torrent [ 'Media' ] != $LastMedia ) {
$EditionID ++ ;
if ( $Torrent [ 'Remastered' ] && $Torrent [ 'RemasterYear' ] != 0 ) {
$RemasterName = $Torrent [ 'RemasterYear' ];
$AddExtra = " - " ;
if ( $Torrent [ 'RemasterRecordLabel' ]) { $RemasterName .= $AddExtra . display_str ( $Torrent [ 'RemasterRecordLabel' ]); $AddExtra = ' / ' ; }
if ( $Torrent [ 'RemasterCatalogueNumber' ]) { $RemasterName .= $AddExtra . display_str ( $Torrent [ 'RemasterCatalogueNumber' ]); $AddExtra = ' / ' ; }
if ( $Torrent [ 'RemasterTitle' ]) { $RemasterName .= $AddExtra . display_str ( $Torrent [ 'RemasterTitle' ]); $AddExtra = ' / ' ; }
$RemasterName .= $AddExtra . display_str ( $Torrent [ 'Media' ]);
2012-10-28 08:00:19 +00:00
2012-10-27 08:00:09 +00:00
?>
2012-12-06 08:00:17 +00:00
< tr class = " group_torrent groupid_<?= $GroupID ?> edition<?= $SnatchedGroupClass ?> hidden " >
2012-10-27 08:00:09 +00:00
< td colspan = " 7 " class = " edition_info " >< strong >< a href = " # " onclick = " toggle_edition(<?= $GroupID ?>, <?= $EditionID ?>, this, event) " title = " Collapse this edition. Hold "Ctrl" while clicking to collapse all editions in this torrent group. " >& minus ; </ a > < ? = $RemasterName ?> </strong></td>
</ tr >
< ?
} else {
$AddExtra = " / " ;
if ( ! $Torrent [ 'Remastered' ]) {
$MasterName = " Original Release " ;
if ( $GroupRecordLabel ) { $MasterName .= $AddExtra . $GroupRecordLabel ; $AddExtra = ' / ' ; }
if ( $GroupCatalogueNumber ) { $MasterName .= $AddExtra . $GroupCatalogueNumber ; $AddExtra = ' / ' ; }
} else {
$MasterName = " Unknown Release(s) " ;
}
$MasterName .= $AddExtra . display_str ( $Torrent [ 'Media' ]);
?>
2012-12-06 08:00:17 +00:00
< tr class = " group_torrent groupid_<?= $GroupID ?> edition<?= $SnatchedGroupClass ?> hidden " >
2012-10-27 08:00:09 +00:00
< td colspan = " 7 " class = " edition_info " >< strong >< a href = " # " onclick = " toggle_edition(<?= $GroupID ?>, <?= $EditionID ?>, this, event) " title = " Collapse this edition. Hold "Ctrl" while clicking to collapse all editions in this torrent group. " >& minus ; </ a > < ? = $MasterName ?> </strong></td>
</ tr >
< ?
}
}
$LastRemasterTitle = $Torrent [ 'RemasterTitle' ];
$LastRemasterYear = $Torrent [ 'RemasterYear' ];
$LastRemasterRecordLabel = $Torrent [ 'RemasterRecordLabel' ];
$LastRemasterCatalogueNumber = $Torrent [ 'RemasterCatalogueNumber' ];
$LastMedia = $Torrent [ 'Media' ];
?>
2012-12-06 08:00:17 +00:00
< tr class = " group_torrent torrent_row groupid_<?= $GroupID ?> edition_<?= $EditionID ?><?= $SnatchedTorrentClass . $SnatchedGroupClass ?> hidden " >
2012-10-27 08:00:09 +00:00
< td colspan = " 3 " >
< span >
[ < a href = " torrents.php?action=download&id=<?= $TorrentID ?>&authkey=<?= $LoggedUser['AuthKey'] ?>&torrent_pass=<?= $LoggedUser['torrent_pass'] ?> " title = " Download " > DL </ a >
2012-10-28 08:00:19 +00:00
< ? if ( Torrents :: can_use_token ( $Torrent )) { ?>
2012-10-27 08:00:09 +00:00
| < a href = " torrents.php?action=download&id=<?= $TorrentID ?>&authkey=<?= $LoggedUser['AuthKey'] ?>&torrent_pass=<?= $LoggedUser['torrent_pass'] ?>&usetoken=1 " title = " Use a FL Token " onclick = " return confirm('Are you sure you want to use a freeleech token here?'); " > FL </ a >
< ? } ?>
| < a href = " reportsv2.php?action=report&id=<?= $TorrentID ?> " title = " Report " > RP </ a > ]
</ span >
& nbsp ; & nbsp ; & raquo ; & nbsp ; < a href = " torrents.php?id=<?= $GroupID ?>&torrentid=<?= $TorrentID ?> " >< ? = Torrents :: torrent_info ( $Torrent ) ?> </a>
</ td >
< td class = " nobr " >< ? = Format :: get_size ( $Torrent [ 'Size' ]) ?> </td>
< td >< ? = number_format ( $Torrent [ 'Snatched' ]) ?> </td>
< td < ? = ( $Torrent [ 'Seeders' ] == 0 ) ? ' class="r00"' : '' ?> ><?=number_format($Torrent['Seeders'])?></td>
< td >< ? = number_format ( $Torrent [ 'Leechers' ]) ?> </td>
</ tr >
< ?
}
} else {
// Viewing a type that does not require grouping
2012-10-28 08:00:19 +00:00
2012-10-27 08:00:09 +00:00
list ( $TorrentID , $Torrent ) = each ( $Torrents );
2012-11-04 08:00:20 +00:00
$Torrent [ 'IsSnatched' ] = Torrents :: has_snatched ( $TorrentID );
2012-10-28 08:00:19 +00:00
2012-10-27 08:00:09 +00:00
$DisplayName = $Number . ' - <a href="torrents.php?id=' . $GroupID . '" title="View Torrent">' . $GroupName . '</a>' ;
2012-10-28 08:00:19 +00:00
if ( $Torrent [ 'IsSnatched' ]) {
2013-01-03 08:00:30 +00:00
$DisplayName .= ' ' . Format :: torrent_label ( 'Snatched!' );
2012-10-28 08:00:19 +00:00
}
if ( $Torrent [ 'FreeTorrent' ] == '1' ) {
2013-01-03 08:00:30 +00:00
$DisplayName .= ' ' . Format :: torrent_label ( 'Freeleech!' );
2012-10-28 08:00:19 +00:00
} elseif ( $Torrent [ 'FreeTorrent' ] == '2' ) {
2013-01-03 08:00:30 +00:00
$DisplayName .= ' ' . Format :: torrent_label ( 'Neutral leech!' );
2012-11-05 08:00:16 +00:00
} elseif ( Torrents :: has_token ( $TorrentID )) {
2013-01-03 08:00:30 +00:00
$DisplayName .= ' ' . Format :: torrent_label ( 'Personal Freeleech!' );
2012-10-27 08:00:09 +00:00
}
2012-12-06 08:00:17 +00:00
$SnatchedTorrentClass = $Torrent [ 'IsSnatched' ] ? ' snatched_torrent' : '' ;
2012-10-27 08:00:09 +00:00
?>
2012-12-06 08:00:17 +00:00
< tr class = " torrent torrent_row<?= $SnatchedTorrentClass . $SnatchedGroupClass ?> " id = " group_<?= $GroupID ?> " >
2012-10-27 08:00:09 +00:00
< td ></ td >
< td class = " center " >
< div title = " <?=ucfirst(str_replace('_',' ', $PrimaryTag ))?> " class = " cats_<?=strtolower(str_replace(array('-',' '),array('',''), $Categories[$GroupCategoryID-1] ))?> tags_<?=str_replace('.','_', $PrimaryTag )?> " >
</ div >
</ td >
< td class = " nobr " >
< span >
[ < a href = " torrents.php?action=download&id=<?= $TorrentID ?>&authkey=<?= $LoggedUser['AuthKey'] ?>&torrent_pass=<?= $LoggedUser['torrent_pass'] ?> " title = " Download " > DL </ a >
2012-10-28 08:00:19 +00:00
< ? if ( Torrents :: can_use_token ( $Torrent )) { ?>
2012-10-27 08:00:09 +00:00
| < a href = " torrents.php?action=download&id=<?= $TorrentID ?>&authkey=<?= $LoggedUser['AuthKey'] ?>&torrent_pass=<?= $LoggedUser['torrent_pass'] ?>&usetoken=1 " title = " Use a FL Token " onclick = " return confirm('Are you sure you want to use a freeleech token here?'); " > FL </ a >
2012-10-28 08:00:19 +00:00
< ? } ?>
2012-10-27 08:00:09 +00:00
| < a href = " reportsv2.php?action=report&id=<?= $TorrentID ?> " title = " Report " > RP </ a >
2012-11-04 08:00:20 +00:00
< ? if ( $IsBookmarked ) { ?>
2013-01-16 08:00:31 +00:00
| < a href = " # " id = " bookmarklink_torrent_<?= $GroupID ?> " class = " remove_bookmark " title = " Remove bookmark " onclick = " Unbookmark('torrent',<?= $GroupID ?>,'Bookmark');return false; " > Unbookmark </ a >
2012-10-27 08:00:09 +00:00
< ? } else { ?>
2013-01-16 08:00:31 +00:00
| < a href = " # " id = " bookmarklink_torrent_<?= $GroupID ?> " class = " add_bookmark " title = " Add bookmark " onclick = " Bookmark('torrent',<?= $GroupID ?>,'Unbookmark');return false; " > Bookmark </ a >
2012-10-27 08:00:09 +00:00
< ? } ?>
]
</ span >
2012-11-02 08:00:18 +00:00
< strong >< ? = $DisplayName ?> </strong> <!--<?Votes::vote_link($GroupID,$UserVotes[$GroupID]['Type']);?>-->
2012-10-27 08:00:09 +00:00
< ? = $TorrentTags ?>
</ td >
< td class = " nobr " >< ? = Format :: get_size ( $Torrent [ 'Size' ]) ?> </td>
< td >< ? = number_format ( $Torrent [ 'Snatched' ]) ?> </td>
< td < ? = ( $Torrent [ 'Seeders' ] == 0 ) ? ' class="r00"' : '' ?> ><?=number_format($Torrent['Seeders'])?></td>
< td >< ? = number_format ( $Torrent [ 'Leechers' ]) ?> </td>
</ tr >
< ?
}
$TorrentTable .= ob_get_clean ();
}
?>
< table class = " torrent_table grouping cats " id = " discog_table " >
< tr class = " colhead_dark " >
< td ><!-- expand / collapse --></ td >
< td ><!-- Category --></ td >
< td width = " 70% " >< strong > Torrents </ strong ></ td >
< td > Size </ td >
< td class = " sign " >< img src = " static/styles/<?= $LoggedUser['StyleName'] ?>/images/snatched.png " alt = " Snatches " title = " Snatches " /></ td >
< td class = " sign " >< img src = " static/styles/<?= $LoggedUser['StyleName'] ?>/images/seeders.png " alt = " Seeders " title = " Seeders " /></ td >
< td class = " sign " >< img src = " static/styles/<?= $LoggedUser['StyleName'] ?>/images/leechers.png " alt = " Leechers " title = " Leechers " /></ td >
</ tr >
< ?
if ( $TorrentList === false ) { ?>
< tr >
< td colspan = " 7 " class = " center " > Server is busy processing another top list request . Please try again in a minute .</ td >
</ tr >
< ?
2012-10-28 08:00:19 +00:00
} elseif ( count ( $TopVotes ) == 0 ) { ?>
2012-10-27 08:00:09 +00:00
< tr >
< td colspan = " 7 " class = " center " > No torrents were found that meet your criteria .</ td >
</ tr >
< ?
} else {
echo $TorrentTable ;
}
?>
</ table >
</ div >
< ?
View :: show_footer ();
2012-12-27 08:00:27 +00:00
?>