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