summaryrefslogtreecommitdiff
path: root/nzbget/search_upload.pm
diff options
context:
space:
mode:
Diffstat (limited to 'nzbget/search_upload.pm')
-rw-r--r--nzbget/search_upload.pm37
1 files changed, 37 insertions, 0 deletions
diff --git a/nzbget/search_upload.pm b/nzbget/search_upload.pm
new file mode 100644
index 0000000..de3e10f
--- /dev/null
+++ b/nzbget/search_upload.pm
@@ -0,0 +1,37 @@
+package nzbget::search_upload;
+use strict;
+use Apache2::Const -compile => qw(OK);
+use CGI qw(:standard);
+use CGI::Carp 'fatalsToBrowser';
+use local::db;
+use local::menu;
+
+sub handler
+{
+ my @cat = local::db::category->retrieve_all();
+ die "Ungültige category" if not @cat;
+
+ print header;
+ my $menu = new local::menu(%ENV);
+ print $menu->start_html('nzbget pre_enqueue');
+ print CGI::start_form(-action=>'enqueue');
+ print table({class=>'nohigh'},
+ Tr(td(param('title'))),
+ Tr(td(param('description'))),
+ ),
+ table({class=>'nohigh'},
+ Tr(td(['nzb file',filefield('file')])),
+ Tr(td(['name',textfield('name')])),
+ Tr(td(['category',
+ CGI::popup_menu(
+ -name=>'cat',
+ -values=>[0,map {$_->name()} @cat],
+ -labels => {0=>'---', map { ($_->category_id() => $_->name() ) } @cat}
+ )])),
+ Tr(td([' ',submit("Download starten")])),
+ );
+ print CGI::end_form;
+ print $menu->end_html();
+ return Apache2::Const::OK;
+}
+1;