1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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;
|