blob: f4904c744b0f8306f8479663833ce1eba95275a2 (
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
29
30
31
|
#!/usr/bin/perl
use strict;
use local::nzbget;
use CGI qw(:standard);
use CGI::Carp 'fatalsToBrowser';
use URI::Escape;
print header;
use local::menu;
my $menu=new local::menu(%ENV);
print $menu->start_html('log');
my $cli = new local::nzbget;
print CGI::start_table();
my $resp = $cli->send_request('log',0,10) or die "Can't connect to nubget";
die $resp if not ref $resp;
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 $menu->end_html;
|