2013-07-13 08:00:46 +00:00
< ? php
ini_set ( 'max_execution_time' , 600 );
2011-11-30 08:00:20 +00:00
set_time_limit ( 0 );
2012-06-18 08:00:14 +00:00
2011-03-28 14:21:28 +00:00
//~~~~~~~~~~~ Main bookmarks page ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
2013-05-04 08:00:48 +00:00
function compare ( $X , $Y ) {
2011-03-28 14:21:28 +00:00
return ( $Y [ 'count' ] - $X [ 'count' ]);
}
2013-05-04 08:00:48 +00:00
if ( ! empty ( $_GET [ 'userid' ])) {
if ( ! check_perms ( 'users_override_paranoia' )) {
2011-03-28 14:21:28 +00:00
error ( 403 );
}
$UserID = $_GET [ 'userid' ];
2013-05-04 08:00:48 +00:00
if ( ! is_number ( $UserID )) {
error ( 404 );
}
2013-07-13 08:00:46 +00:00
$DB -> query ( "
SELECT Username
FROM users_main
WHERE ID = '$UserID' " );
2011-08-09 21:03:28 +00:00
list ( $Username ) = $DB -> next_record ();
2011-03-28 14:21:28 +00:00
} else {
$UserID = $LoggedUser [ 'ID' ];
}
2013-07-13 08:00:46 +00:00
$Sneaky = $UserID !== $LoggedUser [ 'ID' ];
2013-02-25 21:16:55 +00:00
$Title = $Sneaky ? " $Username 's bookmarked torrents " : 'Your bookmarked torrents' ;
2011-03-28 14:21:28 +00:00
// Loop through the result set, building up $Collage and $TorrentTable
// Then we print them.
$Collage = array ();
$TorrentTable = '' ;
$NumGroups = 0 ;
2013-02-25 21:16:55 +00:00
$ArtistCount = array ();
2011-03-28 14:21:28 +00:00
2013-02-25 21:16:55 +00:00
list (, $CollageDataList , $TorrentList ) = Users :: get_bookmarks ( $UserID );
foreach ( $TorrentList as $GroupID => $Group ) {
extract ( Torrents :: array_group ( $Group ));
list (, $Sort , $AddedTime ) = array_values ( $CollageDataList [ $GroupID ]);
2012-10-27 08:00:09 +00:00
2011-03-28 14:21:28 +00:00
// Handle stats and stuff
$NumGroups ++ ;
2012-10-27 08:00:09 +00:00
2013-05-04 08:00:48 +00:00
if ( $Artists ) {
foreach ( $Artists as $Artist ) {
if ( ! isset ( $ArtistCount [ $Artist [ 'id' ]])) {
2013-07-13 08:00:46 +00:00
$ArtistCount [ $Artist [ 'id' ]] = array ( 'name' => $Artist [ 'name' ], 'count' => 1 );
2011-03-28 14:21:28 +00:00
} else {
2013-02-25 21:16:55 +00:00
$ArtistCount [ $Artist [ 'id' ]][ 'count' ] ++ ;
2011-03-28 14:21:28 +00:00
}
}
}
2012-10-27 08:00:09 +00:00
2013-02-25 21:16:55 +00:00
$TorrentTags = new Tags ( $TagList );
2011-03-28 14:21:28 +00:00
2011-11-20 08:00:18 +00:00
if ( ! empty ( $ExtendedArtists [ 1 ]) || ! empty ( $ExtendedArtists [ 4 ]) || ! empty ( $ExtendedArtists [ 5 ]) || ! empty ( $ExtendedArtists [ 6 ])) {
unset ( $ExtendedArtists [ 2 ]);
unset ( $ExtendedArtists [ 3 ]);
2012-10-11 08:00:15 +00:00
$DisplayName = Artists :: display_artists ( $ExtendedArtists );
2013-05-04 08:00:48 +00:00
} elseif ( count ( $Artists ) > 0 ) {
2013-07-13 08:00:46 +00:00
$DisplayName = Artists :: display_artists ( array ( '1' => $Artists ));
2011-11-20 08:00:18 +00:00
} else {
$DisplayName = '' ;
2011-03-28 14:21:28 +00:00
}
2013-03-07 08:00:21 +00:00
$DisplayName .= '<a href="torrents.php?id=' . $GroupID . '" title="View Torrent" dir="ltr">' . $GroupName . '</a>' ;
2013-05-04 08:00:48 +00:00
if ( $GroupYear > 0 ) {
2013-07-13 08:00:46 +00:00
$DisplayName = " $DisplayName [ $GroupYear ] " ;
2013-05-04 08:00:48 +00:00
}
2013-05-05 08:00:31 +00:00
if ( $GroupVanityHouse ) {
$DisplayName .= ' [<abbr title="This is a Vanity House release">VH</abbr>]' ;
}
2012-12-06 08:00:17 +00:00
$SnatchedGroupClass = $GroupFlags [ 'IsSnatched' ] ? ' snatched_group' : '' ;
2012-10-27 08:00:09 +00:00
2011-03-28 14:21:28 +00:00
// Start an output buffer, so we can store this output in $TorrentTable
2012-10-27 08:00:09 +00:00
ob_start ();
2013-05-04 08:00:48 +00:00
if ( count ( $Torrents ) > 1 || $GroupCategoryID == 1 ) {
2011-07-04 08:00:07 +00:00
// Grouped torrents
2013-07-13 08:00:46 +00:00
$ShowGroups = ! ( ! empty ( $LoggedUser [ 'TorrentGrouping' ]) && $LoggedUser [ 'TorrentGrouping' ] === 1 );
2011-03-28 14:21:28 +00:00
?>
2012-12-06 08:00:17 +00:00
< tr class = " group discog<?= $SnatchedGroupClass ?> " id = " group_<?= $GroupID ?> " >
2011-03-28 14:21:28 +00:00
< td class = " center " >
2013-08-28 23:08:41 +00:00
< div id = " showimg_<?= $GroupID ?> " class = " <?=( $ShowGroups ? 'hide' : 'show')?>_torrents " >
< a href = " # " class = " tooltip show_torrents_link " onclick = " toggle_group(<?= $GroupID ?>, this, event); " title = " Collapse this group. Hold "Ctrl" while clicking to collape all groups on this page. " ></ a >
2011-03-28 14:21:28 +00:00
</ div >
</ td >
< td class = " center " >
2013-02-25 21:16:55 +00:00
< div title = " <?= $TorrentTags->title ()?> " class = " <?=Format::css_category( $GroupCategoryID )?> <?= $TorrentTags->css_name ()?> " ></ div >
2011-03-28 14:21:28 +00:00
</ td >
< td colspan = " 5 " >
2013-02-25 21:16:55 +00:00
< strong >< ? = $DisplayName ?> </strong>
2013-05-04 08:00:48 +00:00
< span style = " text-align: right; " class = " float_right " >
2013-07-13 08:00:46 +00:00
< ? if ( ! $Sneaky ) { ?>
2013-08-28 23:08:41 +00:00
< a href = " #group_<?= $GroupID ?> " class = " brackets remove_bookmark " onclick = " Unbookmark('torrent', <?= $GroupID ?>, ''); return false; " > Remove bookmark </ a >
2011-08-09 21:03:28 +00:00
< br />
2013-07-13 08:00:46 +00:00
< ? } ?>
2011-08-09 21:03:28 +00:00
< ? = time_diff ( $AddedTime ); ?>
</ span >
2013-02-25 21:16:55 +00:00
< div class = " tags " >< ? = $TorrentTags -> format () ?> </div>
2011-03-28 14:21:28 +00:00
</ td >
</ tr >
< ?
$LastRemasterYear = '-' ;
$LastRemasterTitle = '' ;
$LastRemasterRecordLabel = '' ;
$LastRemasterCatalogueNumber = '' ;
2011-09-04 08:00:07 +00:00
$LastMedia = '' ;
2012-10-27 08:00:09 +00:00
2011-09-04 08:00:07 +00:00
$EditionID = 0 ;
2011-09-05 08:00:07 +00:00
unset ( $FirstUnknown );
2012-10-27 08:00:09 +00:00
2011-03-28 14:21:28 +00:00
foreach ( $Torrents as $TorrentID => $Torrent ) {
2011-09-05 08:00:07 +00:00
if ( $Torrent [ 'Remastered' ] && ! $Torrent [ 'RemasterYear' ]) {
$FirstUnknown = ! isset ( $FirstUnknown );
}
2012-12-06 08:00:17 +00:00
$SnatchedTorrentClass = $Torrent [ 'IsSnatched' ] ? ' snatched_torrent' : '' ;
2013-02-10 08:00:29 +00:00
2013-07-13 08:00:46 +00:00
if (
$Torrent [ 'RemasterTitle' ] != $LastRemasterTitle
|| $Torrent [ 'RemasterYear' ] != $LastRemasterYear
|| $Torrent [ 'RemasterRecordLabel' ] != $LastRemasterRecordLabel
|| $Torrent [ 'RemasterCatalogueNumber' ] != $LastRemasterCatalogueNumber
|| $FirstUnknown
|| $Torrent [ 'Media' ] != $LastMedia
) {
2011-09-04 08:00:07 +00:00
$EditionID ++ ;
2011-03-28 14:21:28 +00:00
?>
2013-07-13 08:00:46 +00:00
< tr class = " group_torrent groupid_<?= $GroupID ?> edition<?= $SnatchedGroupClass . (!empty( $LoggedUser['TorrentGrouping'] ) && $LoggedUser['TorrentGrouping'] === 1 ? ' hidden' : '')?> " >
2013-08-28 23:08:41 +00:00
< td colspan = " 7 " class = " edition_info " >< strong >< a href = " # " onclick = " toggle_edition(<?= $GroupID ?>, <?= $EditionID ?>, this, event) " class = " tooltip " title = " Collapse this edition. Hold "Ctrl" while clicking to collapse all editions in this torrent group. " >& minus ; </ a > < ? = Torrents :: edition_string ( $Torrent , $Group ) ?> </strong></td>
2011-03-28 14:21:28 +00:00
</ tr >
< ?
}
$LastRemasterTitle = $Torrent [ 'RemasterTitle' ];
$LastRemasterYear = $Torrent [ 'RemasterYear' ];
$LastRemasterRecordLabel = $Torrent [ 'RemasterRecordLabel' ];
$LastRemasterCatalogueNumber = $Torrent [ 'RemasterCatalogueNumber' ];
2011-09-04 08:00:07 +00:00
$LastMedia = $Torrent [ 'Media' ];
2011-03-28 14:21:28 +00:00
?>
2013-07-13 08:00:46 +00:00
< tr class = " group_torrent torrent_row groupid_<?= $GroupID ?> edition_<?= $EditionID ?><?= $SnatchedTorrentClass . $SnatchedGroupClass . (!empty( $LoggedUser['TorrentGrouping'] ) && $LoggedUser['TorrentGrouping'] === 1 ? ' hidden' : '')?> " >
2011-03-28 14:21:28 +00:00
< td colspan = " 3 " >
2011-10-29 08:00:15 +00:00
< 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 )) { ?>
2013-08-28 23:08:41 +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?'); " class = " tooltip " > FL </ a >
2011-10-27 08:00:15 +00:00
< ? } ?>
2011-10-29 08:00:15 +00:00
| < a href = " reportsv2.php?action=report&id=<?= $TorrentID ?> " title = " Report " > RP </ a > ]
2011-03-28 14:21:28 +00:00
</ span >
2012-10-11 08:00:15 +00:00
& nbsp ; & nbsp ; & raquo ; & nbsp ; < a href = " torrents.php?id=<?= $GroupID ?>&torrentid=<?= $TorrentID ?> " >< ? = Torrents :: torrent_info ( $Torrent ) ?> </a>
2011-03-28 14:21:28 +00:00
</ td >
2013-08-28 23:08:41 +00:00
< td class = " number_column nobr " >< ? = Format :: get_size ( $Torrent [ 'Size' ]) ?> </td>
< td class = " number_column " >< ? = number_format ( $Torrent [ 'Snatched' ]) ?> </td>
< td class = " number_column<?=(( $Torrent['Seeders'] == 0) ? ' r00' : '')?> " >< ? = number_format ( $Torrent [ 'Seeders' ]) ?> </td>
< td class = " number_column " >< ? = number_format ( $Torrent [ 'Leechers' ]) ?> </td>
2011-03-28 14:21:28 +00:00
</ tr >
< ?
}
} else {
// Viewing a type that does not require grouping
2012-10-27 08:00:09 +00:00
2011-03-28 14:21:28 +00:00
list ( $TorrentID , $Torrent ) = each ( $Torrents );
2012-10-27 08:00:09 +00:00
2013-03-07 08:00:21 +00:00
$DisplayName = '<a href="torrents.php?id=' . $GroupID . '" title="View Torrent" dir="ltr">' . $GroupName . '</a>' ;
2012-10-16 08:00:18 +00:00
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
}
2013-07-13 08:00:46 +00:00
if ( $Torrent [ 'FreeTorrent' ] === '1' ) {
2013-01-03 08:00:30 +00:00
$DisplayName .= ' ' . Format :: torrent_label ( 'Freeleech!' );
2013-07-13 08:00:46 +00:00
} elseif ( $Torrent [ 'FreeTorrent' ] === '2' ) {
2013-01-03 08:00:30 +00:00
$DisplayName .= ' ' . Format :: torrent_label ( 'Neutral leech!' );
2012-10-28 08:00:19 +00:00
} elseif ( $Torrent [ 'PersonalFL' ]) {
2013-01-03 08:00:30 +00:00
$DisplayName .= ' ' . Format :: torrent_label ( 'Personal Freeleech!' );
2011-03-28 14:21:28 +00:00
}
2012-12-06 08:00:17 +00:00
$SnatchedTorrentClass = $Torrent [ 'IsSnatched' ] ? ' snatched_torrent' : '' ;
2011-03-28 14:21:28 +00:00
?>
2012-12-06 08:00:17 +00:00
< tr class = " torrent torrent_row<?= $SnatchedTorrentClass . $SnatchedGroupClass ?> " id = " group_<?= $GroupID ?> " >
2011-03-28 14:21:28 +00:00
< td ></ td >
< td class = " center " >
2013-02-25 21:16:55 +00:00
< div title = " <?= $TorrentTags->title ()?> " class = " <?=Format::css_category( $GroupCategoryID )?> <?= $TorrentTags->css_name ()?> " >
2011-03-28 14:21:28 +00:00
</ div >
</ td >
< td >
< span >
2011-10-29 08:00:15 +00:00
[ < 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 )) { ?>
2013-08-28 23:08:41 +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?'); " class = " tooltip " > FL </ a >
2012-10-27 08:00:09 +00:00
< ? } ?>
2011-10-29 08:00:15 +00:00
| < a href = " reportsv2.php?action=report&id=<?= $TorrentID ?> " title = " Report " > RP </ a > ]
2011-03-28 14:21:28 +00:00
</ span >
< strong >< ? = $DisplayName ?> </strong>
2013-02-25 21:16:55 +00:00
< div class = " tags " >< ? = $TorrentTags -> format () ?> </div>
2013-07-13 08:00:46 +00:00
< ? if ( ! $Sneaky ) { ?>
2013-08-28 23:08:41 +00:00
< span class = " float_right float_clear " >< a href = " #group_<?= $GroupID ?> " class = " brackets remove_bookmark " onclick = " Unbookmark('torrent', <?= $GroupID ?>, ''); return false; " > Remove bookmark </ a ></ span >
2013-07-13 08:00:46 +00:00
< ? } ?>
2013-02-25 21:16:55 +00:00
< span class = " float_right float_clear " >< ? = time_diff ( $AddedTime ); ?> </span>
2011-03-28 14:21:28 +00:00
</ td >
2013-08-28 23:08:41 +00:00
< td class = " number_column nobr " >< ? = Format :: get_size ( $Torrent [ 'Size' ]) ?> </td>
< td class = " number_column " >< ? = number_format ( $Torrent [ 'Snatched' ]) ?> </td>
< td class = " number_column<?=(( $Torrent['Seeders'] == 0) ? ' r00' : '')?> " >< ? = number_format ( $Torrent [ 'Seeders' ]) ?> </td>
< td class = " number_column " >< ? = number_format ( $Torrent [ 'Leechers' ]) ?> </td>
2011-03-28 14:21:28 +00:00
</ tr >
< ?
}
2013-07-13 08:00:46 +00:00
$TorrentTable .= ob_get_clean ();
2012-10-27 08:00:09 +00:00
2011-03-28 14:21:28 +00:00
// Album art
2012-10-27 08:00:09 +00:00
2011-03-28 14:21:28 +00:00
ob_start ();
2012-10-27 08:00:09 +00:00
2011-03-28 14:21:28 +00:00
$DisplayName = '' ;
2011-11-21 08:00:23 +00:00
if ( ! empty ( $ExtendedArtists [ 1 ]) || ! empty ( $ExtendedArtists [ 4 ]) || ! empty ( $ExtendedArtists [ 5 ]) || ! empty ( $ExtendedArtists [ 6 ])) {
unset ( $ExtendedArtists [ 2 ]);
unset ( $ExtendedArtists [ 3 ]);
2012-10-11 08:00:15 +00:00
$DisplayName .= Artists :: display_artists ( $ExtendedArtists , false );
2013-05-04 08:00:48 +00:00
} elseif ( count ( $Artists ) > 0 ) {
2013-07-13 08:00:46 +00:00
$DisplayName .= Artists :: display_artists ( array ( '1' => $Artists ), false );
2011-03-28 14:21:28 +00:00
}
$DisplayName .= $GroupName ;
2013-05-04 08:00:48 +00:00
if ( $GroupYear > 0 ) {
2013-07-13 08:00:46 +00:00
$DisplayName = " $DisplayName [ $GroupYear ] " ;
2013-05-04 08:00:48 +00:00
}
2013-09-23 08:00:51 +00:00
$Tags = display_str ( $TorrentTags -> format ());
2011-03-28 14:21:28 +00:00
?>
2011-04-13 15:36:33 +00:00
< li class = " image_group_<?= $GroupID ?> " >
2012-06-21 08:00:14 +00:00
< a href = " torrents.php?id=<?= $GroupID ?> " class = " bookmark_<?= $GroupID ?> " >
2013-05-25 08:01:03 +00:00
< ? if ( $WikiImage ) { ?>
2013-09-23 08:00:51 +00:00
< img class = " tooltip_interactive " src = " <?=ImageTools::process( $WikiImage , true)?> " alt = " <?= $DisplayName ?> " title = " <?= $DisplayName ?> <br /> <?= $Tags ?> " width = " 117 " />
2011-03-28 14:21:28 +00:00
< ? } else { ?>
2013-05-25 08:01:03 +00:00
< div style = " width: 107px; padding: 5px; " >< ? = $DisplayName ?> </div>
2011-03-28 14:21:28 +00:00
< ? } ?>
</ a >
2011-04-13 15:36:33 +00:00
</ li >
2011-03-28 14:21:28 +00:00
< ?
2013-05-25 08:01:03 +00:00
$Collage [] = ob_get_clean ();
2012-10-27 08:00:09 +00:00
2011-03-28 14:21:28 +00:00
}
2013-07-13 08:00:46 +00:00
$CollageCovers = isset ( $LoggedUser [ 'CollageCovers' ]) ? ( int ) $LoggedUser [ 'CollageCovers' ] : 25 ;
2011-11-20 08:00:18 +00:00
$CollagePages = array ();
2013-05-25 08:01:03 +00:00
for ( $i = 0 ; $i < $NumGroups / $CollageCovers ; $i ++ ) {
$Groups = array_slice ( $Collage , $i * $CollageCovers , $CollageCovers );
2011-11-20 08:00:18 +00:00
$CollagePage = '' ;
foreach ( $Groups as $Group ) {
$CollagePage .= $Group ;
}
$CollagePages [] = $CollagePage ;
}
2012-10-11 08:00:15 +00:00
View :: show_header ( $Title , 'browse,collage' );
2011-03-28 14:21:28 +00:00
?>
< div class = " thin " >
2012-08-19 08:00:19 +00:00
< div class = " header " >
< h2 >< ? if ( ! $Sneaky ) { ?> <a href="feeds.php?feed=torrents_bookmarks_t_<?=$LoggedUser['torrent_pass']?>&user=<?=$LoggedUser['ID']?>&auth=<?=$LoggedUser['RSS_Auth']?>&passkey=<?=$LoggedUser['torrent_pass']?>&authkey=<?=$LoggedUser['AuthKey']?>&name=<?=urlencode(SITE_NAME.': Bookmarked Torrents')?>"><img src="<?=STATIC_SERVER?>/common/symbols/rss.png" alt="RSS feed" /></a> <? } ?><?=$Title?></h2>
< div class = " linkbox " >
2013-01-24 08:00:24 +00:00
< a href = " bookmarks.php?type=torrents " class = " brackets " > Torrents </ a >
< a href = " bookmarks.php?type=artists " class = " brackets " > Artists </ a >
< a href = " bookmarks.php?type=collages " class = " brackets " > Collages </ a >
< a href = " bookmarks.php?type=requests " class = " brackets " > Requests </ a >
2011-08-09 21:03:28 +00:00
< ? if ( count ( $TorrentList ) > 0 ) { ?>
2012-08-19 08:00:19 +00:00
< br />< br />
2013-02-10 08:00:29 +00:00
< a href = " bookmarks.php?action=remove_snatched&auth=<?= $LoggedUser['AuthKey'] ?> " class = " brackets " onclick = " return confirm('Are you sure you want to remove the bookmarks for all items you \ 've snatched?'); " > Remove snatched </ a >
< a href = " bookmarks.php?action=edit&type=torrents " class = " brackets " > Manage torrents </ a >
2011-08-09 21:03:28 +00:00
< ? } ?>
2012-08-19 08:00:19 +00:00
</ div >
2011-03-28 14:21:28 +00:00
</ div >
2013-07-13 08:00:46 +00:00
< ? if ( count ( $TorrentList ) === 0 ) { ?>
2011-08-09 21:03:28 +00:00
< div class = " box pad " align = " center " >
< h2 > You have not bookmarked any torrents .</ h2 >
</ div >
2011-08-22 08:00:05 +00:00
</ div ><!-- content -->
2011-08-09 21:03:28 +00:00
< ?
2012-10-11 08:00:15 +00:00
View :: show_footer ();
2011-08-09 21:03:28 +00:00
die ();
} ?>
2011-03-28 14:21:28 +00:00
< div class = " sidebar " >
2012-12-20 08:00:19 +00:00
< div class = " box box_info box_statistics_bookmarked_torrents " >
2011-03-28 14:21:28 +00:00
< div class = " head " >< strong > Stats </ strong ></ div >
< ul class = " stats nobullet " >
< li > Torrents : < ? = $NumGroups ?> </li>
2013-07-13 08:00:46 +00:00
< ? if ( count ( $ArtistCount ) > 0 ) { ?>
< li > Artists : < ? = count ( $ArtistCount ) ?> </li>
< ? } ?>
2011-03-28 14:21:28 +00:00
</ ul >
</ div >
2012-12-20 08:00:19 +00:00
< div class = " box box_tags " >
2011-03-28 14:21:28 +00:00
< div class = " head " >< strong > Top tags </ strong ></ div >
< div class = " pad " >
2013-05-04 08:00:48 +00:00
< ol style = " padding-left: 5px; " >
2013-02-26 08:00:42 +00:00
< ? Tags :: format_top ( 5 ) ?>
2011-03-28 14:21:28 +00:00
</ ol >
</ div >
</ div >
2012-08-17 08:00:13 +00:00
< div class = " box box_artists " >
2011-03-28 14:21:28 +00:00
< div class = " head " >< strong > Top artists </ strong ></ div >
< div class = " pad " >
2013-05-04 08:00:48 +00:00
< ol style = " padding-left: 5px; " >
2011-03-28 14:21:28 +00:00
< ?
2013-02-25 21:16:55 +00:00
uasort ( $ArtistCount , 'compare' );
2011-03-28 14:21:28 +00:00
$i = 0 ;
2013-02-25 21:16:55 +00:00
foreach ( $ArtistCount as $ID => $Artist ) {
2011-03-28 14:21:28 +00:00
$i ++ ;
2013-05-04 08:00:48 +00:00
if ( $i > 10 ) {
break ;
}
2011-03-28 14:21:28 +00:00
?>
2012-10-27 08:00:09 +00:00
< li >< a href = " artist.php?id=<?= $ID ?> " >< ? = display_str ( $Artist [ 'name' ]) ?> </a> (<?=$Artist['count']?>)</li>
2011-03-28 14:21:28 +00:00
< ?
}
?>
</ ol >
</ div >
</ div >
</ div >
< div class = " main_column " >
2011-11-20 08:00:18 +00:00
< ?
2013-07-13 08:00:46 +00:00
if ( $CollageCovers !== 0 ) { ?>
2011-11-20 08:00:18 +00:00
< div id = " coverart " class = " box " >
2013-02-23 08:00:22 +00:00
< div class = " head " id = " coverhead " >< strong > Cover art </ strong ></ div >
2011-11-20 08:00:18 +00:00
< ul class = " collage_images " id = " collage_page0 " >
< ?
$Page1 = array_slice ( $Collage , 0 , $CollageCovers );
2013-05-04 08:00:48 +00:00
foreach ( $Page1 as $Group ) {
2011-11-20 08:00:18 +00:00
echo $Group ;
2013-05-15 08:00:54 +00:00
} ?>
2011-11-20 08:00:18 +00:00
</ ul >
</ div >
< ? if ( $NumGroups > $CollageCovers ) { ?>
< div class = " linkbox pager " style = " clear: left; " id = " pageslinksdiv " >
2012-09-09 08:00:26 +00:00
< span id = " firstpage " class = " invisible " >< a href = " # " class = " pageslink " onclick = " collageShow.page(0, this); return false; " >& lt ; & lt ; First </ a > | </ span >
2013-06-10 08:01:05 +00:00
< span id = " prevpage " class = " invisible " >< a href = " # " id = " prevpage " class = " pageslink " onclick = " collageShow.prevPage(); return false; " >& lt ; Prev </ a > | </ span >
2013-05-15 08:00:54 +00:00
< ? for ( $i = 0 ; $i < $NumGroups / $CollageCovers ; $i ++ ) { ?>
2013-07-13 08:00:46 +00:00
< span id = " pagelink<?= $i ?> " class = " <?=(( $i > 4) ? 'hidden' : '')?><?=(( $i === 0) ? ' selected' : '')?> " >< a href = " # " class = " pageslink " onclick = " collageShow.page(<?= $i ?>, this); return false; " >< ? = ( $CollageCovers * $i + 1 ) ?> -<?=min($NumGroups, $CollageCovers * ($i + 1))?></a><?=(($i !== ceil($NumGroups / $CollageCovers) - 1) ? ' | ' : '')?></span>
2011-11-20 08:00:18 +00:00
< ? } ?>
2013-05-15 08:00:54 +00:00
< span id = " nextbar " class = " <?=(( $NumGroups / $CollageCovers > 5) ? 'hidden' : '')?> " > | </ span >
2012-09-09 08:00:26 +00:00
< span id = " nextpage " >< a href = " # " class = " pageslink " onclick = " collageShow.nextPage(); return false; " > Next & gt ; </ a ></ span >
2013-07-13 08:00:46 +00:00
< span id = " lastpage " class = " <?=(ceil( $NumGroups / $CollageCovers ) === 2 ? 'invisible' : '')?> " > | < a href = " # " id = " lastpage " class = " pageslink " onclick = " collageShow.page(<?=(ceil( $NumGroups / $CollageCovers ) - 1)?>, this); return false; " > Last & gt ; & gt ; </ a ></ span >
2011-11-20 08:00:18 +00:00
</ div >
< script type = " text/javascript " >
collageShow . init ( < ? = json_encode ( $CollagePages ) ?> );
</ script >
2012-10-27 08:00:09 +00:00
< ? }
2011-11-20 08:00:18 +00:00
} ?>
2012-09-01 08:00:24 +00:00
< table class = " torrent_table grouping cats " id = " torrent_table " >
2011-03-28 14:21:28 +00:00
< tr class = " colhead_dark " >
< td ><!-- expand / collapse --></ td >
< td ><!-- Category --></ td >
2013-09-06 08:00:41 +00:00
< td width = " 70% " >< strong > Torrents </ strong ></ td >
2011-03-28 14:21:28 +00:00
< 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 >
< ? = $TorrentTable ?>
</ table >
</ div >
</ div >
< ?
2012-10-11 08:00:15 +00:00
View :: show_footer ();