5 #script to print confirmation screen, then if accepted calls itself to insert data
6 #modified 2002/12/16 by hdl@ifrance.com : Templating
9 # Copyright 2000-2002 Katipo Communications
11 # This file is part of Koha.
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
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.
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
35 #get varibale that tells us whether to show confirmation page
37 my $insert=$input->param('insert');
39 my $template=gettemplate("newimember.tmpl");
42 my @names=$input->param;
43 foreach my $key (@names){
44 $data{$key}=$input->param($key);
48 my $string="The following compulsary fields have been left blank. Please push the back button
50 if ($data{'cardnumber_institution'} eq ''){
51 $string.="Cardnumber<br>";
54 if ($data{'institution_name'} eq ''){
55 $string.="Institution Name<br>";
58 if ($data{'address'} eq ''){
59 $string.="Postal Address<br>";
62 if ($data{'city'} eq ''){
66 if ($data{'contactname'} eq ''){
67 $string.="Contact Name";
72 #print startmenu('member');
74 $template->param( missingloop => ($ok==1));
75 $template->param( string => $string);
77 my $valid=checkdigit(\%env,$data{"cardnumber_institution"});
78 $template->param( invalid => ($valid !=1));
81 while (my ($key, $value) = each %data) {
85 $line{'value'}=$value;
86 push(@inputs, \%line);
88 $template->param(inputsloop => \@inputs);
91 print "Content-Type: text/html\n\n", $template->output;