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
|
#!/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();
|