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.

41 lines
982 B

  1. #!/usr/bin/perl
  2. #script to modify reserves/requests
  3. #written 2/1/00 by chris@katipo.oc.nz
  4. #last update 27/1/2000 by chris@katipo.co.nz
  5. use strict;
  6. #use DBI;
  7. use C4::Search;
  8. use CGI;
  9. use C4::Output;
  10. use C4::Reserves2;
  11. my $input = new CGI;
  12. #print $input->header;
  13. #print $input->dump;
  14. my @rank=$input->param('rank-request');
  15. my @biblio=$input->param('biblio');
  16. my @borrower=$input->param('borrower');
  17. my @branch=$input->param('pickup');
  18. my $count=@rank;
  19. my $del=0;
  20. for (my $i=0;$i<$count;$i++){
  21. if ($rank[$i] ne 'del' && $del == 0){
  22. updatereserves($rank[$i],$biblio[$i],$borrower[$i],0,$branch[$i]); #from C4::Reserves2
  23. } elsif ($rank[$i] eq 'del'){
  24. updatereserves($rank[$i],$biblio[$i],$borrower[$i],1); #from C4::Reserves2
  25. $del=1;
  26. }
  27. }
  28. my $from=$input->param('from');
  29. if ($from eq 'borrower'){
  30. print $input->redirect("/cgi-bin/koha/moremember.pl?bornum=$borrower[0]");
  31. } else {
  32. print $input->redirect("/cgi-bin/koha/request.pl?bib=$biblio[0]");
  33. }