query(" SELECT ct.GroupID, tg.WikiImage, tg.CategoryID, um.ID, um.Username FROM collages_torrents AS ct JOIN torrents_group AS tg ON tg.ID=ct.GroupID LEFT JOIN users_main AS um ON um.ID=ct.UserID WHERE ct.CollageID='$CollageID' ORDER BY ct.Sort"); $GroupIDs = $DB->collect('GroupID'); $CollageDataList = $DB->to_array('GroupID', MYSQLI_ASSOC); if (count($GroupIDs) > 0) { $TorrentList = Torrents::get_groups($GroupIDs); $TorrentList = $TorrentList['matches']; } else { $TorrentList = array(); } // Loop through the result set, building up $Collage and $TorrentTable // Then we print them. $Collage = array(); $TorrentTable = ''; $NumGroups = 0; $NumGroupsByUser = 0; $TopArtists = array(); $Users = array(); $Number = 0; foreach ($TorrentList as $GroupID => $Group) { extract(Torrents::array_group($Group)); list( , , , $UserID, $Username) = array_values($CollageDataList[$GroupID]); $TorrentTags = new Tags($TagList); // Handle stats and stuff $Number++; $NumGroups++; if ($UserID == $LoggedUser['ID']) { $NumGroupsByUser++; } if (!empty($ExtendedArtists[1]) || !empty($ExtendedArtists[4]) || !empty($ExtendedArtists[5]) || !empty($ExtendedArtists[6])) { $CountArtists = array_merge((array)$ExtendedArtists[1], (array)$ExtendedArtists[4], (array)$ExtendedArtists[5], (array)$ExtendedArtists[6]); } else { $CountArtists = $GroupArtists; } if ($CountArtists) { foreach ($CountArtists as $Artist) { if (!isset($TopArtists[$Artist['id']])) { $TopArtists[$Artist['id']] = array('name'=>$Artist['name'], 'count'=>1); } else { $TopArtists[$Artist['id']]['count']++; } } } if ($Username) { if (!isset($Users[$UserID])) { $Users[$UserID] = array('name'=>$Username, 'count'=>1); } else { $Users[$UserID]['count']++; } } $DisplayName = $Number.' - '; 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)); } $DisplayName .= ''.$GroupName.''; if ($GroupYear > 0) { $DisplayName = "$DisplayName [$GroupYear]"; } if ($GroupVanityHouse) { $DisplayName .= ' [VH]'; } $SnatchedGroupClass = ($GroupFlags['IsSnatched'] ? ' snatched_group' : ''); // Start an output buffer, so we can store this output in $TorrentTable ob_start(); if (count($Torrents) > 1 || $GroupCategoryID == 1) { // Grouped torrents $ShowGroups = !(!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGrouping'] == 1); ?>
Unbookmark"; } else { echo "Bookmark"; } echo "\n"; echo Votes::vote_link($GroupID, $UserVotes[$GroupID]['Type']); ?>
format()?>
$Torrent) { if ($Torrent['Remastered'] && !$Torrent['RemasterYear']) { $FirstUnknown = !isset($FirstUnknown); } $SnatchedTorrentClass = ($Torrent['IsSnatched'] ? ' snatched_torrent' : ''); if ($Torrent['RemasterTitle'] != $LastRemasterTitle || $Torrent['RemasterYear'] != $LastRemasterYear || $Torrent['RemasterRecordLabel'] != $LastRemasterRecordLabel || $Torrent['RemasterCatalogueNumber'] != $LastRemasterCatalogueNumber || $FirstUnknown || $Torrent['Media'] != $LastMedia) { $EditionID++; ?> DL | FL | RP   »  > '.$GroupName.''; if ($Torrent['IsSnatched']) { $DisplayName .= ' ' . Format::torrent_label('Snatched!'); } if ($Torrent['FreeTorrent'] == '1') { $DisplayName .= ' ' . Format::torrent_label('Freeleech!'); } elseif ($Torrent['FreeTorrent'] == '2') { $DisplayName .= ' ' . Format::torrent_label('Neutral Leech!'); } elseif ($Torrent['PersonalFL']) { $DisplayName .= ' ' . Format::torrent_label('Personal Freeleech!'); } $SnatchedTorrentClass = ($Torrent['IsSnatched'] ? ' snatched_torrent' : ''); ?>
DL | FL | RP
format()?>
> 0) { $DisplayName .= Artists::display_artists(array('1' => $GroupArtists), false); } $DisplayName .= $GroupName; if ($GroupYear > 0) { $DisplayName = $DisplayName. " [$GroupYear]"; } ?>
  • <?=$DisplayName?>
  • 0 && $NumGroups >= $MaxGroups) || ($MaxGroupsPerUser > 0 && $NumGroupsByUser >= $MaxGroupsPerUser))) { $PreventAdditions = true; } // Silly hack for people who are on the old setting $CollageCovers = (isset($LoggedUser['CollageCovers']) ? $LoggedUser['CollageCovers'] : 25 * (abs($LoggedUser['HideCollage'] - 1))); $CollagePages = array(); // Pad it out if ($NumGroups > $CollageCovers) { for ($i = $NumGroups + 1; $i <= ceil($NumGroups / $CollageCovers) * $CollageCovers; $i++) { $Collage[] = '
  • '; } } 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($Name,'browse,collage,bbcode,voting,jquery,recommend'); ?>
    Cover art
    $CollageCovers) { ?>
    Torrents Size Snatches Seeders Leechers
    cache_value('collage_'.$CollageID, array(array($Name, $Description, array(), array(), $CommentList, $Deleted, $CollageCategoryID, $CreatorID, $Locked, $MaxGroups, $MaxGroupsPerUser, $Updated, $Subscribers)), 3600); ?>