blob: 84ccbd143c151a6e0dfc5e9273b266874d29ce39 (
plain) (
blame)
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 local::nzbget;
use CGI qw(:standard);
use CGI::Carp 'fatalsToBrowser';
use URI::Escape;
print header;
print start_html('nzbget status');
my $cli = new local::nzbget;
print CGI::start_table();
my $resp = $cli->send_request('log',0,10) or die "Can't connect to nubget";
foreach my $row (@{ $resp->value})
{
print Tr(td[$row->{Text}]);
# foreach my $key (keys %$row)
# {
# if (ref $row->{$key} eq 'ARRAY')
# {
# print Tr(td([$key,join(',',@{$row->{$key}})]));
# } else {
# print Tr(td([$key,$row->{$key}]));
# }
# }
}
print CGI::end_table();
print end_html;
|