SERVER_ROOT/sections/torrents/functions.php"; // If we're not coming from torrents.php, check we're being returned because of an error. if (!isset($_GET['id']) || !is_number($_GET['id'])) { if (!isset($Err)) { error(404); } } else { $TorrentID = $_GET['id']; $DB->prepared_query(" SELECT tg.`category_id`, t.`GroupID`, u.`Username` FROM `torrents_group` AS tg LEFT JOIN `torrents` AS t ON t.`GroupID` = tg.`id` LEFT JOIN `users_main` AS u ON t.`UserID` = u.`ID` WHERE t.`ID` = " . $_GET['id']); list($CategoryID, $GroupID, $Username) = $DB->next_record(); $Artists = Artists::get_artist($GroupID); $TorrentCache = get_group_info($GroupID, true); $GroupDetails = $TorrentCache[0]; $TorrentList = $TorrentCache[1]; // Resolve the torrentlist to the one specific torrent being reported foreach ($TorrentList as &$Torrent) { // Remove unneeded entries if ($Torrent['ID'] != $TorrentID) { unset($TorrentList[$Torrent['ID']]); } } // Group details list($WikiBody, $WikiImage, $GroupID, $GroupName, $GroupTitle2, $GroupNameJP, $GroupYear, $GroupStudio, $GroupSeries, $GroupCatalogueNumber, $GroupCategoryID, $GroupDLSite, $GroupTime, $TorrentTags, $TorrentTagIDs, $TorrentTagUserIDs, $Screenshots, $GroupFlags) = array_values($GroupDetails); $DisplayName = $GroupName; $AltName = $GroupName; // Goes in the alt text of the image $Title = $GroupName; // Goes in
Reported torrent | Size | ↻ | ↑ | ↓ |