From d26fa8c1e0886c813de5364ee6570c860c6ce12c Mon Sep 17 00:00:00 2001 From: Othmar Gsenger Date: Thu, 31 Mar 2011 19:05:23 +0000 Subject: hopfully repaired this after backup loss --- nzbget/pre_enqueue.pm | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 nzbget/pre_enqueue.pm (limited to 'nzbget/pre_enqueue.pm') diff --git a/nzbget/pre_enqueue.pm b/nzbget/pre_enqueue.pm new file mode 100644 index 0000000..dda8967 --- /dev/null +++ b/nzbget/pre_enqueue.pm @@ -0,0 +1,36 @@ +package nzbget::pre_enqueue; +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(['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("Download starten")])), + ); + print CGI::end_form; + print $menu->end_html(); + return Apache2::Const::OK; +} +1; -- cgit v1.2.3