Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 78 lines (68 sloc) 2.256 kb
d0374d0 Initial revision
rangi authored
1 #!/usr/bin/perl
2
3 #script to place reserves/requests
4 #writen 2/1/00 by chris@katipo.oc.nz
5
1e67687 Added copyright statement to all .pl and .pm files
tonnesen authored
6
7 # Copyright 2000-2002 Katipo Communications
8 #
9 # This file is part of Koha.
10 #
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
14 # version.
15 #
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.
19 #
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
23
d0374d0 Initial revision
rangi authored
24 use strict;
25 #use DBI;
26 use C4::Search;
27 use CGI;
28 use C4::Output;
29 use C4::Reserves2;
30
31 my $input = new CGI;
32 #print $input->header;
33
34 my @bibitems=$input->param('biblioitem');
35 my @reqbib=$input->param('reqbib');
36 my $biblio=$input->param('biblio');
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 if ($type eq 'str8' && $bornum ne ''){
eb78ea1 minor changes to comments etc....
finlayt authored
45 my $count=@bibitems;
46 @bibitems=sort @bibitems;
47 my $i2=1;
48 my @realbi;
49 $realbi[0]=$bibitems[0];
d0374d0 Initial revision
rangi authored
50 for (my $i=1;$i<$count;$i++){
eb78ea1 minor changes to comments etc....
finlayt authored
51 my $i3=$i2-1;
52 if ($realbi[$i3] ne $bibitems[$i]){
53 $realbi[$i2]=$bibitems[$i];
54 $i2++;
55 }
d0374d0 Initial revision
rangi authored
56 }
b29f498 Fixing a call to cgi->dump to be Dump
rangi authored
57
d0374d0 Initial revision
rangi authored
58 my $env;
59
60 my $const;
61 if ($input->param('request') eq 'any'){
62 $const='a';
63 CreateReserve(\$env,$branch,$bornum->{'borrowernumber'},$biblio,$const,\@realbi,$rank[0],$notes,$title);
64 } elsif ($reqbib[0] ne ''){
65 $const='o';
66 CreateReserve(\$env,$branch,$bornum->{'borrowernumber'},$biblio,$const,\@reqbib,$rank[0],$notes,$title);
67 } else {
68 CreateReserve(\$env,$branch,$bornum->{'borrowernumber'},$biblio,'a',\@realbi,$rank[0],$notes,$title);
69 }
70 #print @realbi;
71
72 print $input->redirect("request.pl?bib=$biblio");
73 } elsif ($bornum eq ''){
74 print $input->header();
75 print "Invalid card number please try again";
b29f498 Fixing a call to cgi->dump to be Dump
rangi authored
76 print $input->Dump;
d0374d0 Initial revision
rangi authored
77 }
Something went wrong with that request. Please try again.