3 #script to print confirmation screen, then if accepted calls itself to insert data
13 #get varibale that tells us whether to show confirmation page
15 my $insert=$input->param('insert');
19 my @names=$input->param;
20 foreach my $key (@names){
21 $data{$key}=$input->param($key);
25 my $string="The following compulsary fields have been left blank. Please push the back button
27 if ($data{'cardnumber_institution'} eq ''){
28 $string.="Cardnumber<br>";
31 if ($data{'institution_name'} eq ''){
32 $string.="Institution Name<br>";
35 if ($data{'address'} eq ''){
36 $string.="Postal Address<br>";
39 if ($data{'city'} eq ''){
43 if ($data{'contactname'} eq ''){
44 $string.="Contact Name";
49 print startmenu
('member');
53 my $valid=checkdigit
(\
%env,$data{"cardnumber_institution"});
55 print "Invalid cardnumber";
60 while (my ($key, $value) = each %data) {
62 $inputs[$i]=["hidden","$key","$value"];
65 $inputs[$i]=["submit","submit","submit"];
66 print mkformnotable
("/cgi-bin/koha/insertidata.pl",@inputs);
69 print endmenu
('member');