summaryrefslogtreecommitdiff
path: root/pre_enqueue.pl
diff options
context:
space:
mode:
Diffstat (limited to 'pre_enqueue.pl')
-rwxr-xr-xpre_enqueue.pl28
1 files changed, 28 insertions, 0 deletions
diff --git a/pre_enqueue.pl b/pre_enqueue.pl
new file mode 100755
index 0000000..7b3df63
--- /dev/null
+++ b/pre_enqueue.pl
@@ -0,0 +1,28 @@
+#!/usr/bin/perl
+use strict;
+use CGI qw(:standard);
+use CGI::Carp 'fatalsToBrowser';
+use local::db;
+
+my @cat = local::db::category->retrieve_all();
+die "Ungültige category" if not @cat;
+
+print header;
+print start_html('nzbget pre_enqueue');
+print CGI::start_form(-action=>'/cgi-bin/nzbget/enqueue.pl');
+print table(
+ Tr(td(param('title'))),
+ Tr(td(param('description'))),
+),
+table(
+ Tr(td(['name',textfield('name').hidden('description',param('description')).hidden('url',param('url')).hidden('title',param('title'))])),
+ Tr(td(['category',
+ CGI::popup_menu(
+ -name=>'cat',
+ -values=>[0,map {$_->name()} @cat],
+ -labels => {0=>'---', map { ($_->category_id() => $_->name() ) } @cat}
+ )])),
+ Tr(td([submit()])),
+);
+print CGI::end_form;
+print end_html();