3 #script to print confirmation screen, then if accepted calls itself to insert data
6 # Copyright 2000-2002 Katipo Communications
8 # This file is part of Koha.
10 # Koha is free software; you can redistribute it and/or modify it under the
11 # terms of the GNU General Public License as published by the Free Software
12 # Foundation; either version 2 of the License, or (at your option) any later
15 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
16 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
17 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
19 # You should have received a copy of the GNU General Public License along with
20 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
21 # Suite 330, Boston, MA 02111-1307 USA
31 #get varibale that tells us whether to show confirmation page
33 my $insert=$input->param('insert');
37 my @names=$input->param;
38 foreach my $key (@names){
39 $data{$key}=$input->param($key);
43 my $string="The following compulsary fields have been left blank. Please push the back button
45 if ($data{'cardnumber_institution'} eq ''){
46 $string.="Cardnumber<br>";
49 if ($data{'institution_name'} eq ''){
50 $string.="Institution Name<br>";
53 if ($data{'address'} eq ''){
54 $string.="Postal Address<br>";
57 if ($data{'city'} eq ''){
61 if ($data{'contactname'} eq ''){
62 $string.="Contact Name";
67 print startmenu('member');
71 my $valid=checkdigit(\%env,$data{"cardnumber_institution"});
73 print "Invalid cardnumber";
78 while (my ($key, $value) = each %data) {
80 $inputs[$i]=["hidden","$key","$value"];
83 $inputs[$i]=["submit","submit","submit"];
84 print mkformnotable("/cgi-bin/koha/insertidata.pl",@inputs);
87 print endmenu('member');