Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 72 lines (59 sloc) 2.366 kb
d0374d00 » rangi
2000-12-19 Initial revision
1 #!/usr/bin/perl
2
7197a373 » arensb
2002-10-13 Added magic RCS comment.
3 # $Id$
4
d0374d00 » rangi
2000-12-19 Initial revision
5 #script to do a borrower enquiery/brin up borrower details etc
6 #written 20/12/99 by chris@katipo.co.nz
7
1e676877 » tonnesen
2002-08-14 Added copyright statement to all .pl and .pm files
8
9 # Copyright 2000-2002 Katipo Communications
10 #
11 # This file is part of Koha.
12 #
13 # Koha is free software; you can redistribute it and/or modify it under the
14 # terms of the GNU General Public License as published by the Free Software
15 # Foundation; either version 2 of the License, or (at your option) any later
16 # version.
17 #
18 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
19 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
20 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
21 #
22 # You should have received a copy of the GNU General Public License along with
23 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
24 # Suite 330, Boston, MA 02111-1307 USA
25
d0374d00 » rangi
2000-12-19 Initial revision
26 use strict;
27 use C4::Output;
28 use CGI;
29 use C4::Search;
0f24c709 » dnmeid
2002-09-17 templatified:set templatedirectory in koha.conf to use the templates
30 use HTML::Template;
d0374d00 » rangi
2000-12-19 Initial revision
31
32 my $input = new CGI;
0f24c709 » dnmeid
2002-09-17 templatified:set templatedirectory in koha.conf to use the templates
33
d6f6462b » arensb
2002-10-10 Use the default theme if it wasn't given as a CGI parameter.
34 my $theme = $input->param('theme') || "default";
35 # only used if allowthemeoverride is set
0f24c709 » dnmeid
2002-09-17 templatified:set templatedirectory in koha.conf to use the templates
36 my %tmpldata = pathtotemplate ( template => 'member.tmpl', theme => $theme, language => 'fi' );
d6f6462b » arensb
2002-10-10 Use the default theme if it wasn't given as a CGI parameter.
37 # FIXME - Error-checking
7197a373 » arensb
2002-10-13 Added magic RCS comment.
38 my $template = HTML::Template->new( filename => $tmpldata{'path'},
0f24c709 » dnmeid
2002-09-17 templatified:set templatedirectory in koha.conf to use the templates
39 die_on_bad_params => 0,
40 loop_context_vars => 1 );
41
d0374d00 » rangi
2000-12-19 Initial revision
42 my $member=$input->param('member');
43 $member=~ s/\,//g;
44
45 my $env;
46 my ($count,$results)=BornameSearch($env,$member,'web');
0f24c709 » dnmeid
2002-09-17 templatified:set templatedirectory in koha.conf to use the templates
47
48 my @resultsdata;
d0374d00 » rangi
2000-12-19 Initial revision
49 for (my $i=0; $i < $count; $i++){
50 #find out stats
51 my ($od,$issue,$fines)=borrdata2($env,$results->[$i]{'borrowernumber'});
0f24c709 » dnmeid
2002-09-17 templatified:set templatedirectory in koha.conf to use the templates
52
53 my %row = (
54 borrowernumber => $results->[$i]{'borrowernumber'},
55 cardnumber => $results->[$i]{'cardnumber'},
56 surname => $results->[$i]{'surname'},
57 firstname => $results->[$i]{'firstname'},
58 categorycode => $results->[$i]{'categorycode'},
59 streetaddress => $results->[$i]{'streetaddress'},
60 city => $results->[$i]{'city'},
61 odissue => "$od/$issue",
62 fines => $fines,
63 borrowernotes => $results->[$i]{'borrowernotes'});
64 push(@resultsdata, \%row);
d0374d00 » rangi
2000-12-19 Initial revision
65 }
0f24c709 » dnmeid
2002-09-17 templatified:set templatedirectory in koha.conf to use the templates
66
67 $template->param( startmenumember => join ('', startmenu('member')),
68 endmenumember => join ('', endmenu('member')),
69 member => $member,
70 resultsloop => \@resultsdata );
7197a373 » arensb
2002-10-13 Added magic RCS comment.
71
0f24c709 » dnmeid
2002-09-17 templatified:set templatedirectory in koha.conf to use the templates
72 print "Content-Type: text/html\n\n", $template->output;
Something went wrong with that request. Please try again.