Removed hard coded directories (as reported by Ville Huhtala).
[koha.git] / renewscript.pl
blob78fd2762bdc6700c9650df268d297e7a3aa43ccf
1 #!/usr/bin/perl
3 #written 18/1/2000 by chris@katipo.co.nz
4 #script to renew items from the web
6 use CGI;
7 use C4::Circulation::Renewals2;
8 #get input
9 my $input= new CGI;
10 #print $input->header;
12 #print $input->dump;
14 my @names=$input->param();
15 my $count=@names;
16 my %data;
18 for (my $i=0;$i<$count;$i++){
19 if ($names[$i] =~ /renew/){
20 my $temp=$names[$i];
21 $temp=~ s/renew_item_//;
22 $data{$temp}=$input->param($names[$i]);
25 my %env;
26 my $bornum=$input->param("bornum");
27 while ( my ($key, $value) = each %data) {
28 # print "$key = $value\n";
29 if ($value eq 'y'){
30 #means we want to renew this item
31 #check its status
32 my $status=renewstatus(\%env,$bornum,$key);
33 # print $status;
34 if ($status == 1){
35 renewbook(\%env,$bornum,$key);
40 print $input->redirect("/cgi-bin/koha/moremember.pl?bornum=$bornum");