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.

71 lines
1.7 KiB

  1. #!/usr/bin/perl
  2. use C4::Database;
  3. use CGI;
  4. use strict;
  5. use C4::Acquisitions;
  6. use C4::Output;
  7. my $input= new CGI;
  8. print $input->header;
  9. #print $input->dump;
  10. my $title=checkinp($input->param('Title'));
  11. my $author=checkinp($input->param('Author'));
  12. my $bibnum=checkinp($input->param('bibnum'));
  13. my $copyright=checkinp($input->param('Copyright'));
  14. my $seriestitle=checkinp($input->param('Series'));
  15. my $serial=checkinp($input->param('Serial'));
  16. my $unititle=checkinp($input->param('Unititle'));
  17. my $notes=checkinp($input->param('Notes'));
  18. modbiblio($bibnum,$title,$author,$copyright,$seriestitle,$serial,$unititle,$notes);
  19. my $subtitle=checkinp($input->param('Subtitle'));
  20. modsubtitle($bibnum,$subtitle);
  21. my $subject=checkinp($input->param('Subject'));
  22. $subject=uc $subject;
  23. my @sub=split(/\|/,$subject);
  24. #print @sub;
  25. #
  26. my $addauthor=checkinp($input->param('Additional'));
  27. modaddauthor($bibnum,$addauthor);
  28. #print $input->header;
  29. my $force=$input->param('Force');
  30. my $error=modsubject($bibnum,$force,@sub);
  31. if ($error ne ''){
  32. print $input->header;
  33. print startpage();
  34. print startmenu();
  35. print $error;
  36. my @subs=split('\n',$error);
  37. print "<p> Click submit to force the subject";
  38. my @names=$input->param;
  39. my %data;
  40. my $count=@names;
  41. for (my $i=0;$i<$count;$i++){
  42. if ($names[$i] ne 'Force'){
  43. my $value=$input->param("$names[$i]");
  44. $data{$names[$i]}="hidden\t$value\t$i";
  45. }
  46. }
  47. $data{"Force"}="hidden\t$subs[0]\t$count";
  48. print mkform3('updatebiblio.pl',%data);
  49. print endmenu();
  50. print endpage();
  51. } else {
  52. print $input->redirect("detail.pl?type=intra&bib=$bibnum");
  53. }
  54. sub checkinp{
  55. my ($inp)=@_;
  56. $inp=~ s/\'/\\\'/g;
  57. $inp=~ s/\"/\\\"/g;
  58. return($inp);
  59. }