query(' SELECT tg.ID as GroupID, tg.CategoryID, tg.Name AS Title, tg.NameJP AS Title_JP, tg.Year, tg.Studio, tg.Series, tg.CatalogueNumber, tg.Pages, tg.DLSiteID, tg.WikiImage AS Image, tg.WikiBody AS GroupDescription FROM torrents_group AS tg LEFT JOIN torrents AS t ON t.GroupID = tg.ID WHERE tg.ID = '.$_GET['groupid'].' GROUP BY tg.ID'); if ($DB->has_results()) { list($Properties) = $DB->to_array(false, MYSQLI_BOTH); $UploadForm = $Categories[$Properties['CategoryID'] - 1]; $Properties['CategoryName'] = $Categories[$Properties['CategoryID'] - 1]; $Properties['Artists'] = Artists::get_artist($_GET['groupid']); $DB->query(" SELECT GROUP_CONCAT(tags.Name SEPARATOR ', ') AS TagList FROM torrents_tags AS tt JOIN tags ON tags.ID = tt.TagID WHERE tt.GroupID = '$_GET[groupid]'"); list($Properties['TagList']) = $DB->next_record(); } else { unset($_GET['groupid']); } if (!empty($_GET['requestid']) && is_number($_GET['requestid'])) { $Properties['RequestID'] = $_GET['requestid']; } } elseif (empty($Properties) && isset($_GET['requestid']) && is_number($_GET['requestid'])) { $DB->query(' SELECT ID AS RequestID, CategoryID, Title AS Title, TitleJP AS TitleJP, CatalogueNumber, DLSiteID, Image FROM requests WHERE ID = '.$_GET['requestid']); list($Properties) = $DB->to_array(false, MYSQLI_BOTH); $UploadForm = $Categories[$Properties['CategoryID'] - 1]; $Properties['CategoryName'] = $Categories[$Properties['CategoryID'] - 1]; $Properties['Artists'] = Requests::get_artists($_GET['requestid']); $Properties['TagList'] = implode(', ', Requests::get_tags($_GET['requestid'])[$_GET['requestid']]); } if (!empty($ArtistForm)) { $Properties['Artists'] = $ArtistForm; } require(SERVER_ROOT.'/classes/torrent_form.class.php'); $TorrentForm = new TORRENT_FORM($Properties ?? false, $Err ?? false); $GenreTags = $Cache->get_value('genre_tags'); if (!$GenreTags) { $DB->query(" SELECT Name FROM tags WHERE TagType = 'genre' ORDER BY Name"); $GenreTags = $DB->collect('Name'); $Cache->cache_value('genre_tags', $GenreTags, 3600 * 6); } $DB->query(' SELECT Name, Comment, Time FROM do_not_upload ORDER BY Sequence'); $DNU = $DB->to_array(); $DB->query('SELECT MAX(Time) FROM do_not_upload'); list($Updated) = $DB->next_record(); $DB->query(" SELECT IF(MAX(Time) IS NULL OR MAX(Time) < '$Updated', 1, 0) FROM torrents WHERE UserID = ".$LoggedUser['ID']); list($NewDNU) = $DB->next_record(); $HideDNU = check_perms('torrents_hide_dnu') && !$NewDNU; //DNU list disabled in below CSS ?> ' : '')?> head(); switch ($UploadForm) { case 'Movies': $TorrentForm->movies_form($GenreTags); break; case 'Anime': $TorrentForm->anime_form($Properties['CategoryID']); break; case 'Manga': $TorrentForm->manga_form(); break; case 'Games': $TorrentForm->game_form($Properties['CategoryID']); break; case 'Other': $TorrentForm->simple_form($Properties['CategoryID']); break; default: $TorrentForm->movies_form($GenreTags); } $TorrentForm->foot(); ?>