Kumara - predecessor to Koha
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
831 B

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