query("
SELECT Username
FROM users_main
WHERE ID = '$UserID'");
list($Username) = $DB->next_record();
} else {
$UserID = $LoggedUser['ID'];
}
$Sneaky = $UserID != $LoggedUser['ID'];
$Title = $Sneaky ? "$Username's bookmarked torrent groups" : 'Your bookmarked torrent groups';
// Loop through the result set, building up $Collage and $TorrentTable
// Then we print them.
$Collage = [];
$TorrentTable = '';
$NumGroups = 0;
$ArtistCount = [];
list($GroupIDs, $CollageDataList, $TorrentList) = Users::get_bookmarks($UserID);
foreach ($GroupIDs as $GroupID) {
if (!isset($TorrentList[$GroupID])) {
continue;
}
$Group = $TorrentList[$GroupID];
extract(Torrents::array_group($Group));
list(, $Sort, $AddedTime) = array_values($CollageDataList[$GroupID]);
// Handle stats and stuff
$NumGroups++;
if ($Artists) {
foreach ($Artists as $Artist) {
if (!isset($ArtistCount[$Artist['id']])) {
$ArtistCount[$Artist['id']] = array('name' => $Artist['name'], 'count' => 1);
} else {
$ArtistCount[$Artist['id']]['count']++;
}
}
}
$TorrentTags = new Tags($TagList);
$DisplayName = Artists::display_artists($Artists);
$GroupName = empty($GroupName) ? (empty($GroupTitle2) ? $GroupNameJP : $GroupTitle2) : $GroupName;
$DisplayName .= '';
if ($GroupYear > 0) {
$DisplayName = "$DisplayName [$GroupYear]";
}
$SnatchedGroupClass = $GroupFlags['IsSnatched'] ? ' snatched_group' : '';
// Start an output buffer, so we can store this output in $TorrentTable
ob_start();
if (count($Torrents) > 1) {
// Grouped torrents
$ShowGroups = !(!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGrouping'] === 1); ?>
|
|
=$DisplayName?>
=time_diff($AddedTime); ?>
Remove
bookmark
=$TorrentTags->format()?>
|
$Torrent) {
$SnatchedTorrentClass = $Torrent['IsSnatched'] ? ' snatched_torrent' : ''; ?>
[ DL
| FL
| RP ]
=Torrents::torrent_info($Torrent)?>
|
=Format::get_size($Torrent['Size'])?>
|
=number_format($Torrent['Snatched'])?>
|
=number_format($Torrent['Seeders'])?>
|
=number_format($Torrent['Leechers'])?>
|
'.$GroupName.'';
if ($Torrent['IsSnatched']) {
$DisplayName .= ' ' . Format::torrent_label('Snatched', 'bold');
}
if ($Torrent['FreeTorrent'] === '1') {
$DisplayName .= ' ' . Format::torrent_label('Freeleech', 'important_text_alt');
} elseif ($Torrent['FreeTorrent'] === '2') {
$DisplayName .= ' ' . Format::torrent_label('Neutral Leech', 'bold');
} elseif ($Torrent['PersonalFL']) {
$DisplayName .= ' ' . Format::torrent_label('Personal Freeleech', 'important_text_alt');
}
$SnatchedTorrentClass = $Torrent['IsSnatched'] ? ' snatched_torrent' : ''; ?>
|
|
[ DL
| FL
| RP ]
=time_diff($AddedTime); ?>
Remove
bookmark
=$DisplayName?>
=$TorrentTags->format()?>
|
=Format::get_size($Torrent['Size'])?>
|
=number_format($Torrent['Snatched'])?>
|
=number_format($Torrent['Seeders'])?>
|
=number_format($Torrent['Leechers'])?>
|
0) {
$DisplayName = "$DisplayName [$GroupYear]";
}
$Tags = display_str($TorrentTags->format());
$PlainTags = implode(', ', $TorrentTags->get_tags()); ?>
0) {
for ($i = 0; $i < $NumGroups / $CollageCovers; $i++) {
$Groups = array_slice($Collage, $i * $CollageCovers, $CollageCovers);
$CollagePage = '';
foreach ($Groups as $Group) {
$CollagePage .= $Group;
}
$CollagePages[] = $CollagePage;
}
}
View::show_header($Title, 'browse,collage,wall');
?>
You have not bookmarked any torrents.
$CollageCovers) { ?>
|
|
Torrents |
Size |
↻
|
↑
|
↓
|
=$TorrentTable?>