summaryrefslogtreecommitdiff
path: root/search.pl
diff options
context:
space:
mode:
Diffstat (limited to 'search.pl')
-rwxr-xr-xsearch.pl51
1 files changed, 0 insertions, 51 deletions
diff --git a/search.pl b/search.pl
deleted file mode 100755
index d63d944..0000000
--- a/search.pl
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/usr/bin/perl
-use strict;
-use CGI qw(:standard);
-use CGI::Carp 'fatalsToBrowser';
-use URI::Escape;
-use local::params;
-use local::nzbindex;
-use local::menu;
-
-print header;
-my $menu= new local::menu(%ENV);
-print $menu->start_html('nzbget status');
-
-print CGI::start_table();
-
-print CGI::start_form(-action=>'/cgi-bin/nzbget/search.pl');
-print
- table({class=>'nohigh'},
- Tr(td(['Search',textfield({size=>100,name=>'q'}),])),
- Tr(td(['min Size',textfield({size=>5,name=>'minsize'}).' MB'])),
- Tr(td(['max Size',textfield({size=>5, name=>'maxsize'}).' MB'.hidden('more',1)])),
- Tr(td(['results',CGI::popup_menu(
- -name => 'max',
- -values => ['25','100','500'],
- -default => '25',
- -labels => {25=>'25',100=>'100',500=>500}
- ) ])),
- Tr(td(['',submit()])),
- Tr(td([qw/   /])),
-);
-print CGI::end_form;
-my $param_obj=new local::params;
-if ($param_obj->has_params())
-{
- my $nzbindex=new local::nzbindex;
- my @search = $nzbindex->search($param_obj->get_as_hash());
- if (@search)
- {
- print CGI::start_table();
- foreach my $item (@search) {
- print Tr(td([
- a({href=>"./pre_enqueue.pl?url=".uri_escape($item->{url})."&name=".uri_escape(param('q'))."&description=".uri_escape($item->{description})."&title=".uri_escape($item->{title})},$item->{title}).' '.
- $item->{description}]));
- }
- print CGI::end_table();
- } else {
- print hr().'nothing found';
- }
-}
-print $menu->end_html;
-