/************************************************************************ ||------------|| Edit artist wiki page ||------------------------------|| This page is the page that is displayed when someone feels like editing an artist's wiki page. It is called when $_GET['action'] == 'edit'. $_GET['artistid'] is the ID of the artist, and must be set. The page inserts a new revision into the wiki_artists table, and clears the cache for the artist page. ************************************************************************/ $GroupID = $_GET['groupid']; if(!is_number($GroupID) || !$GroupID) { error(0); } // Get the artist 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 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) = $DB->next_record(); if(!$Body) { $Body = $WikiBody; $Image = $WikiImage; } show_header('Edit torrent group'); // Start printing form ?>