$Val) { if (strpos($FormatList, $Val) !== false) { $FormatArray[] = $Key; } } } $MediaArray = array(); if ($MediaList == 'Any') { $MediaArray = array_keys($Media); } else { $MediaTemp = explode('|', $MediaList); foreach ($Media as $Key => $Val) { if (in_array($Val, $MediaTemp)) { $MediaArray[] = $Key; } } } } $Tags = implode(', ', $Request['Tags']); } } if ($NewRequest && !empty($_GET['artistid']) && is_number($_GET['artistid'])) { $DB->query(" SELECT Name FROM artists_group WHERE artistid = ".$_GET['artistid']." LIMIT 1"); list($ArtistName) = $DB->next_record(); $ArtistForm = array( 1 => array(array('name' => trim($ArtistName))), 2 => array(), 3 => array() ); } elseif ($NewRequest && !empty($_GET['groupid']) && is_number($_GET['groupid'])) { $ArtistForm = Artists::get_artist($_GET['groupid']); $DB->query(" SELECT tg.Name, tg.Year, tg.ReleaseType, tg.WikiImage, GROUP_CONCAT(t.Name SEPARATOR ', '), tg.CategoryID FROM torrents_group AS tg JOIN torrents_tags AS tt ON tt.GroupID = tg.ID JOIN tags AS t ON t.ID = tt.TagID WHERE tg.ID = ".$_GET['groupid']); if (list($Title, $Year, $ReleaseType, $Image, $Tags, $CategoryID) = $DB->next_record()) { $GroupID = trim($_REQUEST['groupid']); } } View::show_header(($NewRequest ? 'Create a request' : 'Edit a request'), 'requests'); ?>