/* * This is the frontend of reporting a torrent, it's what users see when * they visit reportsv2.php?id=xxx */ include(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->query(" SELECT tg.CategoryID, t.GroupID FROM torrents_group AS tg LEFT JOIN torrents AS t ON t.GroupID = tg.ID WHERE t.ID = " . $_GET['id']); list($CategoryID, $GroupID) = $DB->next_record(); if (empty($CategoryID) || empty($GroupID)) { // Deleted torrent header("Location: log.php?search=Torrent+" . $TorrentID); die(); } $Artists = Artists::get_artist($GroupID); $TorrentCache = get_group_info($GroupID, true, $RevisionID); $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, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $ReleaseType, $GroupCategoryID, $GroupTime, $GroupVanityHouse, $TorrentTags, $TorrentTagIDs, $TorrentTagUserIDs, $TagPositiveVotes, $TagNegativeVotes, $GroupFlags) = array_values($GroupDetails); $DisplayName = $GroupName; $AltName = $GroupName; // Goes in the alt text of the image $Title = $GroupName; // goes in
Reported torrent | Size |