5 #written 18/1/2000 by chris@katipo.co.nz
6 #script to renew items from the web
9 # Copyright 2000-2002 Katipo Communications
11 # This file is part of Koha.
13 # Koha is free software; you can redistribute it and/or modify it under the
14 # terms of the GNU General Public License as published by the Free Software
15 # Foundation; either version 2 of the License, or (at your option) any later
18 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
19 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
20 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
22 # You should have received a copy of the GNU General Public License along with
23 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
24 # Suite 330, Boston, MA 02111-1307 USA
27 use C4::Circulation::Circ2;
30 my @names = $input->param();
33 # find items to renew, all items or a selection of items
36 # create a look-up table to check efficiently parameter availability
37 my %is_param = map {$_ => 1} @names;
40 if ($is_param{renew_all}) {
41 @data = $input->param('all_items[]');
44 @data = $input->param('items[]');
51 my $cardnumber = $input->param("cardnumber");
52 my $bornum = $input->param("bornum");
54 foreach my $itemno (@data) {
55 #check status before renewing issue
56 if (renewstatus(\%env,$bornum,$itemno)){
57 renewbook(\%env,$bornum,$itemno);
62 # redirection to the referrer page
64 if ($input->param('destination') eq "circ"){
65 print $input->redirect(
66 '/cgi-bin/koha/circ/circulation.pl?findborrower='.$cardnumber
70 print $input->redirect(
71 '/cgi-bin/koha/members/moremember.pl?bornum='.$bornum