s.LastVisit GROUP BY c.ID"; } else { $sql = "SELECT c.ID, c.Name, c.NumTorrents, s.LastVisit FROM collages AS c JOIN users_collage_subs AS s ON s.CollageID = c.ID LEFT JOIN collages_torrents AS ct ON ct.CollageID = c.ID WHERE s.UserID = ".$LoggedUser['ID']." AND c.Deleted='0' GROUP BY c.ID"; } $DB->query($sql); $NumResults = $DB->record_count(); $CollageSubs = $DB->to_array(); ?>

Subscribed collages

No subscribed collages
query("SELECT ct.GroupID, tg.WikiImage, tg.CategoryID FROM collages_torrents AS ct JOIN torrents_group AS tg ON ct.GroupID = tg.ID WHERE ct.CollageID = $CollageID AND ct.AddedOn > '$LastVisit' ORDER BY ct.AddedOn"); $NewTorrentCount = $DB->record_count(); //$NewTorrents = $DB->to_array(); //$Artists = get_artists($GroupID); $GroupIDs = $DB->collect('GroupID'); $CollageDataList=$DB->to_array('GroupID', MYSQLI_ASSOC); if(count($GroupIDs)>0) { $TorrentList = get_groups($GroupIDs); $TorrentList = $TorrentList['matches']; } else { $TorrentList = array(); } $Artists = get_artists($GroupIDs); $Number = 0; // foreach ($NewTorrents as $TorrentGroup) { // list($GroupID, $GroupName, $GroupYear, $ReleaseType, $RecordLabel, $CatalogueNumber, $WikiImage) = $TorrentGroup; // $DisplayName = display_artists($Artists[$GroupID]); // $AltName=$GroupName; foreach ($TorrentList as $GroupID => $Group) { list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TagList, $ReleaseType, $GroupVanityHouse, $Torrents, $GroupArtists, $ExtendedArtists) = array_values($Group); list($GroupID2, $Image, $GroupCategoryID) = array_values($CollageDataList[$GroupID]); unset($DisplayName); $TagList = explode(' ',str_replace('_','.',$TagList)); $TorrentTags = array(); foreach($TagList as $Tag) { if(!isset($Tags[$Tag])) { $Tags[$Tag] = array('name'=>$Tag, 'count'=>1); } else { $Tags[$Tag]['count']++; } $TorrentTags[]=''.$Tag.''; } $PrimaryTag = $TagList[0]; $TorrentTags = implode(', ', $TorrentTags); $TorrentTags='
'.$TorrentTags.'
'; if (!empty($ExtendedArtists[1]) || !empty($ExtendedArtists[4]) || !empty($ExtendedArtists[5]) || !empty($ExtendedArtists[6])) { unset($ExtendedArtists[2]); unset($ExtendedArtists[3]); $DisplayName .= display_artists($ExtendedArtists); } elseif(count($GroupArtists)>0) { $DisplayName .= display_artists(array('1'=>$GroupArtists)); } $DisplayName .= ''.$GroupName.''; if($GroupYear>0) { $DisplayName = $DisplayName. ' ['. $GroupYear .']';} if($GroupVanityHouse) { $DisplayName .= ' [VH]'; } // Start an output buffer, so we can store this output in $TorrentTable ob_start(); if(count($Torrents)>1 || $GroupCategoryID==1) { ?>
<?=$AltName?> <?=$Categories[$GroupCategoryID-1]?> $Torrent) { if ($Torrent['Remastered'] && !$Torrent['RemasterYear']) { $FirstUnknown = !isset($FirstUnknown); } if($Torrent['RemasterTitle'] != $LastRemasterTitle || $Torrent['RemasterYear'] != $LastRemasterYear || $Torrent['RemasterRecordLabel'] != $LastRemasterRecordLabel || $Torrent['RemasterCatalogueNumber'] != $LastRemasterCatalogueNumber || $FirstUnknown || $Torrent['Media'] != $LastMedia) { if($Torrent['Remastered'] && $Torrent['RemasterYear'] != 0) { $EditionID++; $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']); ?> [DL]   »  > '.$GroupName.''; if(!empty($Torrent['FreeTorrent'])) { $DisplayName .=' Freeleech!'; } ?>
[DL | RP] >
( new torrent)      [Catch up]   [Unsubscribe]
Torrents Size Snatches Seeders Leechers