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.

64 lines
3.5 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 $type=$input->param('type');
  18. my @items=subsearch(\$blah,$subject);
  19. #print @items;
  20. my $count=@items;
  21. my $i=0;
  22. print center();
  23. print mktablehdr;
  24. print mktablerow(4,'#99cc33',bold('TITLE'),bold('AUTHOR'),bold('COUNT'),bold('LOCATION'),"/images/background-mem.gif");
  25. my $colour=1;
  26. while ($i < $count){
  27. my @results=split('\t',$items[$i]);
  28. $results[0]=mklink("/cgi-bin/kumara/detail.pl?bib=$results[2]",$results[0]);
  29. my $word=$results[1];
  30. $word=~ s/ //g;
  31. $word=~ s/\,/\,%20/;
  32. $results[1]=mklink("/cgi-bin/kumara/search.pl?author=$word",$results[1]);
  33. my ($count,$lcount,$nacount,$fcount,$scount)=itemcount($env,$results[2]);
  34. $results[3]=$count;
  35. if ($nacount > 0){
  36. $results[4]=$results[4]."On Loan 1";
  37. }
  38. if ($lcount > 0){
  39. $results[4]=$results[4]." L$lcount";
  40. }
  41. if ($fcount > 0){
  42. $results[4]=$results[4]." F$fcount";
  43. }
  44. if ($scount > 0){
  45. $results[4]=$results[4]." S$scount";
  46. }
  47. $results[6]=mklink("/cgi-bin/koha/request.pl?bib=$results[2]","Request");
  48. if ($colour == 1){
  49. print mktablerow(5,'#ffffcc',$results[0],$results[1],$results[3],$results[4],$results[6]);
  50. $colour=0;
  51. } else{
  52. print mktablerow(5,'white',$results[0],$results[1],$results[3],$results[4],$results[6]);
  53. $colour=1;
  54. }
  55. $i++;
  56. }
  57. print endcenter();
  58. print mktableft();
  59. print endmenu();
  60. print endpage();