$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);
}
if ($CategoryID !== array_search(ARTIST_COLLAGE, $CollageCats)) {
error(403);
}
$DB->query("
SELECT
ca.ArtistID,
ag.Name,
um.ID AS UserID,
um.Username,
ca.Sort
FROM collages_artists AS ca
JOIN artists_group AS ag ON ag.ArtistID = ca.ArtistID
LEFT JOIN users_main AS um ON um.ID = ca.UserID
WHERE ca.CollageID = '$CollageID'
ORDER BY ca.Sort");
$Artists = $DB->to_array('ArtistID', MYSQLI_ASSOC);
View::show_header("Manage collage $Name", 'jquery-ui,jquery.tablesorter.min,sort');
?>
View::show_footer(); ?>