Gazelle/sections/ajax/upload.php

43 lines
871 B
PHP
Raw Normal View History

2011-03-28 14:21:28 +00:00
<?
// echo out the slice of the form needed for the selected upload type ($_GET['section']).
// Include the necessary form class
2013-05-27 08:00:58 +00:00
include(SERVER_ROOT.'/classes/torrent_form.class.php');
2011-03-28 14:21:28 +00:00
$TorrentForm = new TORRENT_FORM();
$GenreTags = $Cache->get_value('genre_tags');
2013-04-20 08:01:01 +00:00
if (!$GenreTags) {
2013-05-30 08:00:30 +00:00
$DB->query('
SELECT Name
FROM tags
WHERE TagType=\'genre\'
ORDER BY Name');
$GenreTags = $DB->collect('Name');
2013-04-20 08:01:01 +00:00
$Cache->cache_value('genre_tags', $GenreTags, 3600 * 24);
2011-03-28 14:21:28 +00:00
}
$UploadForm = $Categories[$_GET['categoryid']];
2013-04-20 08:01:01 +00:00
switch ($UploadForm) {
2011-03-28 14:21:28 +00:00
case 'Music':
$TorrentForm->music_form($GenreTags);
break;
2013-02-22 08:00:24 +00:00
2011-03-28 14:21:28 +00:00
case 'Audiobooks':
case 'Comedy':
$TorrentForm->audiobook_form();
break;
2013-02-22 08:00:24 +00:00
2011-03-28 14:21:28 +00:00
case 'Applications':
case 'Comics':
case 'E-Books':
case 'E-Learning Videos':
$TorrentForm->simple_form($_GET['categoryid']);
break;
default:
2013-04-20 08:01:01 +00:00
echo 'Invalid action!';
2011-03-28 14:21:28 +00:00
}
?>