prepare_query(" SELECT tg.`title`, tg.`subject`, tg.`object`, wt.`Image`, wt.`Body`, tg.`picture`, tg.`description`, tg.`year`, tg.`workgroup`, tg.`location`, tg.`identifier`, tg.`category_id` FROM `torrents_group` AS tg LEFT JOIN `wiki_torrents` AS wt ON wt.`RevisionID` = tg.`revision_id` WHERE tg.`id` = '$group_id' "); $DB->exec_prepared_query(); if (!$DB->has_results()) { error(404); } list($title, $subject, $object, $Image, $Body, $picture, $description, $published, $workgroup, $location, $identifier, $category_id) = $DB->next_record(); $DB->prepare_query(" SELECT `id`, `user_id`, `timestamp`, `doi` FROM `literature` WHERE `group_id` = '$group_id' "); $DB->exec_prepared_query(); if ($DB->has_results()) { $Screenshots = []; while ($S = $DB->next_record(MYSQLI_ASSOC, true)) { $Screenshots[] = $S; } } $Artists = Artists::get_artists(array($group_id))[$group_id]; if (!$Body) { $Body = $description; $Image = $picture; } View::show_header( 'Edit torrent group', 'upload,vendor/easymde.min', 'vendor/easymde.min' ); ?>