diff options
author | Othmar Gsenger <otti@wirdorange.org> | 2011-03-31 19:05:23 +0000 |
---|---|---|
committer | Othmar Gsenger <otti@wirdorange.org> | 2011-03-31 19:05:23 +0000 |
commit | d26fa8c1e0886c813de5364ee6570c860c6ce12c (patch) | |
tree | 418120693100150b0443d3d880f945aaa45a0d22 /nzbget/log.pm | |
parent | added support for browsing by category (diff) |
hopfully repaired this after backup loss
Diffstat (limited to 'nzbget/log.pm')
-rw-r--r-- | nzbget/log.pm | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/nzbget/log.pm b/nzbget/log.pm new file mode 100644 index 0000000..05670ec --- /dev/null +++ b/nzbget/log.pm @@ -0,0 +1,29 @@ +package nzbget::log; +use strict; +use Apache2::Const -compile => qw(OK); +use local::nzbget; +use CGI qw(:standard); +use CGI::Carp 'fatalsToBrowser'; +use URI::Escape; + + +sub handler { + 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) + { + print Tr(td[$row->{Text}]); + } + print CGI::end_table(); + print $menu->end_html; + return Apache2::Const::OK; +} + +1; |