/************************************************************************ ||------------|| Edit torrent group wiki page ||-----------------------|| This page is the page that is displayed when someone feels like editing a torrent group's wiki page. It is called when $_GET['action'] == 'edit'. $_GET['groupid'] is the ID of the torrent group and must be set. The page inserts a new revision into the wiki_torrents table, and clears the cache for the torrent group page. ************************************************************************/ $GroupID = $_GET['groupid']; if (!is_number($GroupID) || !$GroupID) { error(0); } // Get the torrent group name and the body of the last revision $DB->query(" SELECT tg.Name, wt.Image, wt.Body, tg.WikiImage, tg.WikiBody, tg.Year, tg.RecordLabel, tg.CatalogueNumber, tg.ReleaseType, tg.CategoryID, tg.VanityHouse FROM torrents_group AS tg LEFT JOIN wiki_torrents AS wt ON wt.RevisionID = tg.RevisionID WHERE tg.ID = '$GroupID'"); if ($DB->record_count() == 0) { error(404); } list($Name, $Image, $Body, $WikiImage, $WikiBody, $Year, $RecordLabel, $CatalogueNumber, $ReleaseType, $CategoryID, $VanityHouse) = $DB->next_record(); if (!$Body) { $Body = $WikiBody; $Image = $WikiImage; } View::show_header('Edit torrent group'); // Start printing form ?>