$CollageID = $_GET['collageid'];
if(!is_number($CollageID)) { error(0); }
$DB->query("SELECT Name, UserID, CategoryID FROM collages WHERE ID='$CollageID'");
list($Name, $UserID, $CategoryID) = $DB->next_record();
if($CategoryID == 0 && $UserID!=$LoggedUser['ID'] && !check_perms('site_collages_delete')) { error(403); }
$DB->query("SELECT ct.GroupID,
ct.UserID,
ct.Sort
FROM collages_torrents AS ct
JOIN torrents_group AS tg ON tg.ID=ct.GroupID
WHERE ct.CollageID='$CollageID'
ORDER BY ct.Sort");
$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();
}
show_header('Manage collage '.$Name);
?>
Sort |
Torrent |
User |
Submit |
$Number = 0;
foreach ($TorrentList as $GroupID=>$Group) {
list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TagList, $ReleaseType, $GroupVanityHouse, $Torrents, $GroupArtists, $ExtendedArtists) = array_values($Group);
list($GroupID2, $UserID, $Sort) = array_values($CollageDataList[$GroupID]);
$Number++;
$DisplayName = $Number.' - ';
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]'; }
?>
}
?>
show_footer() ?>