3 # This is a completely new Z3950 clients search using async ZOOM -TG 02/11/06
4 # Copyright 2000-2002 Katipo Communications
6 # This is a new Z3950 authority search using the current Z3950 bibliographic search as a model 07/05/2013
7 # Parts Copyright 2013 Prosentient Systems
9 # This file is part of Koha.
11 # Koha is free software; you can redistribute it and/or modify it under the
12 # terms of the GNU General Public License as published by the Free Software
13 # Foundation; either version 2 of the License, or (at your option) any later
16 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
17 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
18 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
20 # You should have received a copy of the GNU General Public License along
21 # with Koha; if not, write to the Free Software Foundation, Inc.,
22 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
35 my $dbh = C4::Context->dbh;
36 my $error = $input->param('error');
37 my $nameany = $input->param('nameany');
38 my $authorany = $input->param('authorany');
39 my $authorcorp = $input->param('authorcorp');
40 my $authorpersonal = $input->param('authorpersonal');
41 my $authormeetingcon = $input->param('authormeetingcon');
42 my $title = $input->param('title');
43 my $uniformtitle = $input->param('uniformtitle');
44 my $subject = $input->param('subject');
45 my $subjectsubdiv = $input->param('subjectsubdiv');
46 my $srchany = $input->param('srchany');
47 my $op = $input->param('op')||'';
48 my $page = $input->param('current_page') || 1;
49 $page = $input->param('goto_page') if $input->param('changepage_goto');
51 my ( $template, $loggedinuser, $cookie ) = get_template_and_user({
52 template_name => "cataloguing/z3950_auth_search.tmpl",
56 flagsrequired => { catalogue => 1 },
61 authorany => $authorany,
62 authorcorp => $authorcorp,
63 authorpersonal => $authorpersonal,
64 authormeetingcon => $authormeetingcon,
66 uniformtitle => $uniformtitle,
68 subjectsubdiv => $subjectsubdiv,
72 if ( $op ne "do_search" ) {
73 my $sth = $dbh->prepare("SELECT id,host,name,checked FROM z3950servers WHERE recordtype = 'authority' ORDER BY rank, name");
75 my $serverloop = $sth->fetchall_arrayref( {} );
77 serverloop => $serverloop,
80 output_html_with_http_headers $input, $cookie, $template->output;
84 my @id = $input->param('id');
86 # empty server list -> report and exit
87 $template->param( emptyserverlist => 1 );
88 output_html_with_http_headers $input, $cookie, $template->output;
93 random => $input->param('random') || rand(1000000000),
97 authorany => $authorany,
98 authorcorp => $authorcorp,
99 authorpersonal => $authorpersonal,
100 authormeetingcon => $authormeetingcon,
102 uniformtitle => $uniformtitle,
104 subjectsubdiv => $subjectsubdiv,
107 Z3950SearchAuth($pars, $template);
108 output_html_with_http_headers $input, $cookie, $template->output;