summaryrefslogtreecommitdiff
path: root/nzbget/log.pm
blob: 05670ec70dc43bbe4a9a4b535c0c3cef66a7d370 (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
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;