3 #script to place reserves/requests
4 #writen 2/1/00 by chris@katipo.oc.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 #print $input->header;
33 my $itemnumber=$input->param('itemnumber');
34 my @bibitems=$input->param('biblioitem');
35 my @reqbib=$input->param('reqbib');
36 my $biblionumber=$input->param('biblionumber');
37 my $borrower=$input->param('member');
38 my $notes=$input->param('notes');
39 my $branch=$input->param('pickup');
40 my @rank=$input->param('rank-request');
41 my $type=$input->param('type');
42 my $title=$input->param('title');
43 my $bornum=borrdata($borrower,'');
44 my $cataloger=$input->param('loggedinuser');
46 if ($type eq 'str8' && $bornum ne ''){
48 @bibitems=sort @bibitems;
51 $realbi[0]=$bibitems[0];
52 for (my $i=1;$i<$count;$i++){
54 if ($realbi[$i3] ne $bibitems[$i]){
55 $realbi[$i2]=$bibitems[$i];
65 for (my $i=0; $i<@reqbib; $i++){
66 if ($reqbib[$i] ne ''){
68 CreateReserve(\$env,$bornum->{'borrowernumber'},$cataloger,$biblionumber,'','',$branch,$const,$rank[0],$notes,$title,"",$reqbib[$i]);
72 print $input->redirect("request.pl?biblionumber=$biblionumber");
73 } elsif ($bornum eq ''){
74 print $input->header();
75 print "Invalid card number please try again";