3 #script to set up screen for modification of borrower details
4 #written 20/12/99 by chris@katipo.co.nz
7 # Copyright 2000-2002 Katipo Communications
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 with
21 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
22 # Suite 330, Boston, MA 02111-1307 USA
32 my $template = gettemplate("members/jmemberentry.tmpl");
34 my $member=$input->param('bornum');
36 $member=NewBorrowerNumber();
38 my $type=$input->param('type');
40 my $data=borrdata('',$member);
42 my @titles = ('Miss', 'Mrs', 'Ms', 'Mr', 'Dr', 'Sir');
43 # FIXME - Assumes English. This ought to be made part of i18n.
46 my $title = shift @titles;
47 my %row = ('title' => $title);
48 if ($data->{'title'} eq $title) {
49 $row{'selected'}=' selected';
53 push(@titledata, \%row);
56 # get the data for children
57 my $cmember1=NewBorrowerNumber();
59 for (my $i=0;$i<3;$i++){
61 $row{'cmember'}=$cmember1+$i;
64 push(@cmemdata, \%row);
68 $template->param( startmenumember => startmenu('member'),
69 endmenumember => endmenu('member'),
71 firstname => $data->{'firstname'},
72 surname => $data->{'surname'},
73 cardnumber => $data->{'cardnumber'},
74 area => $data->{'area'},
75 city => $data->{'city'},
76 address => $data->{'address'},
77 streetaddress => $data->{'streetaddress'},
78 streetcity => $data->{'streetcity'},
79 phone => $data->{'phone'},
80 phoneday => $data->{'phoneday'},
81 faxnumber => $data->{'faxnumber'},
82 emailaddress => $data->{'emailaddress'},
83 contactname => $data->{'contactname'},
84 altphone => $data->{'altphone'},
85 titleloop => \@titledata,
86 cmemloop => \@cmemdata );
88 print "Content-Type: text/html\n\n", $template->output;