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.

63 lines
3.3 KiB

  1. #!/usr/bin/perl
  2. #script to display detailed information
  3. #written 8/11/99
  4. use strict;
  5. #use DBI;
  6. use C4::Search;
  7. use CGI;
  8. use C4::Output;
  9. my $input = new CGI;
  10. print $input->header;
  11. print startpage();
  12. print startmenu();
  13. my $blah;
  14. my $env;
  15. my $subject=$input->param('subject');
  16. #my $title=$input->param('title');
  17. my @items=subsearch(\$blah,$subject);
  18. #print @items;
  19. my $count=@items;
  20. my $i=0;
  21. print center();
  22. print mktablehdr;
  23. print mktablerow(4,'#99cc33',bold('TITLE'),bold('AUTHOR'),bold('COUNT'),bold('LOCATION'),"/images/background-mem.gif");
  24. my $colour=1;
  25. while ($i < $count){
  26. my @results=split('\t',$items[$i]);
  27. $results[0]=mklink("/cgi-bin/kumara/detail.pl?bib=$results[2]",$results[0]);
  28. my $word=$results[1];
  29. $word=~ s/ //g;
  30. $word=~ s/\,/\,%20/;
  31. $results[1]=mklink("/cgi-bin/kumara/search.pl?author=$word",$results[1]);
  32. my ($count,$lcount,$nacount,$fcount,$scount)=itemcount($env,$results[2]);
  33. $results[3]=$count;
  34. if ($nacount > 0){
  35. $results[4]=$results[4]."On Loan 1";
  36. }
  37. if ($lcount > 0){
  38. $results[4]=$results[4]." L$lcount";
  39. }
  40. if ($fcount > 0){
  41. $results[4]=$results[4]." F$fcount";
  42. }
  43. if ($scount > 0){
  44. $results[4]=$results[4]." S$scount";
  45. }
  46. if ($colour == 1){
  47. print mktablerow(4,'#ffffcc',$results[0],$results[1],$results[3],$results[4]);
  48. $colour=0;
  49. } else{
  50. print mktablerow(4,'white',$results[0],$results[1],$results[3],$results[4]);
  51. $colour=1;
  52. }
  53. $i++;
  54. }
  55. print endcenter();
  56. print mktableft();
  57. print endmenu();
  58. print endpage();