// Include the necessary form class include SERVER_ROOT . '/classes/torrent_form.class.php'; $TorrentForm = new TORRENT_FORM(); $GenreTags = $Cache->get_value('genre_tags'); if (!$GenreTags) { $DB->query(' SELECT Name FROM tags WHERE TagType=\'genre\' ORDER BY Name'); $GenreTags = $DB->collect('Name'); $Cache->cache_value('genre_tags', $GenreTags, 3600 * 24); } $UploadForm = $Categories[$_GET['categoryid']]; switch ($UploadForm) { case 'Music': $TorrentForm->music_form($GenreTags); break; case 'Audiobooks': case 'Comedy': $TorrentForm->audiobook_form(); break; case 'Applications': case 'Comics': case 'E-Books': case 'E-Learning Videos': $TorrentForm->simple_form($_GET['categoryid']); break; default: echo 'Invalid action!'; }
$UploadForm = $Categories[$Properties['CategoryID']-1]; show_header('Edit torrent', 'upload'); show_message(); if(($LoggedUser['ID']!=$Properties['UserID'] && !check_perms('torrents_edit')) || $LoggedUser['DisableWiki']) { error(403); } if(!($Properties['Remastered'] && !$Properties['RemasterYear'] && $TorrentID > 1309521) || check_perms('edit_unknowns')) { $TorrentForm = new TORRENT_FORM($Properties, $Err, false); $TorrentForm->head(); switch ($UploadForm) { case 'Music': $TorrentForm->music_form(''); break; case 'Audiobooks': case 'Comedy': $TorrentForm->audiobook_form(); break; case 'Applications': case 'Comics': case 'E-Books': case 'E-Learning Videos': $TorrentForm->simple_form(); break; default: $TorrentForm->music_form('');