Kumara - predecessor to Koha
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

97 linhas
5.1 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. my $type=$input->param('type');
  12. print startpage();
  13. print startmenu($type);
  14. my $blah;
  15. my $env;
  16. my $subject=$input->param('subject');
  17. #my $title=$input->param('title');
  18. my $main;
  19. my $secondary;
  20. if ($type eq 'opac'){
  21. $main='#99cccc';
  22. $secondary='#efe5ef';
  23. } else {
  24. $main='#99cc33';
  25. $secondary='#ffffcc';
  26. }
  27. my @items=subsearch(\$blah,$subject);
  28. #print @items;
  29. my $count=@items;
  30. my $i=0;
  31. print center();
  32. print mktablehdr;
  33. if ($type ne 'opac'){
  34. print mktablerow(5,$main,bold('TITLE'),bold('AUTHOR'),bold('COUNT'),bold('LOCATION'),' ',"/images/background-mem.gif");
  35. } else {
  36. print mktablerow(5,$main,bold('TITLE'),bold('AUTHOR'),bold('COUNT'),bold('BRANCH'),'   ');
  37. }
  38. my $colour=1;
  39. while ($i < $count){
  40. my @results=split('\t',$items[$i]);
  41. $results[0]=mklink("/cgi-bin/koha/detail.pl?bib=$results[2]&type=$type",$results[0]);
  42. my $word=$results[1];
  43. $word=~ s/ //g;
  44. $word=~ s/\,/\,%20/;
  45. $results[1]=mklink("/cgi-bin/koha/search.pl?author=$word&type=$type",$results[1]);
  46. my ($count,$lcount,$nacount,$fcount,$scount)=itemcount($env,$results[2]);
  47. $results[3]=$count;
  48. if ($nacount > 0){
  49. $results[4]=$results[4]."On Loan";
  50. if ($nacount > 1){
  51. $results[4].=" $nacount";
  52. }
  53. $results[4].=" ";
  54. }
  55. if ($lcount > 0){
  56. $results[4]=$results[4]." Levin";
  57. if ($lcount > 1){
  58. $results[4].=" $lcount";
  59. }
  60. $results[4].=" ";
  61. }
  62. if ($fcount > 0){
  63. $results[4]=$results[4]." Foxton";
  64. if ($fcount > 1){
  65. $results[4].=" $fcount";
  66. }
  67. $results[4].=" ";
  68. }
  69. if ($scount > 0){
  70. $results[4]=$results[4]." Shannon";
  71. if ($scount > 1){
  72. $results[4].=" $scount";
  73. }
  74. $results[4].=" ";
  75. }
  76. if ($type ne 'opac'){
  77. $results[6]=mklink("/cgi-bin/koha/request.pl?bib=$results[2]","Request");
  78. }
  79. if ($colour == 1){
  80. print mktablerow(5,$secondary,$results[0],$results[1],$results[3],$results[4],$results[6]);
  81. $colour=0;
  82. } else{
  83. print mktablerow(5,'white',$results[0],$results[1],$results[3],$results[4],$results[6]);
  84. $colour=1;
  85. }
  86. $i++;
  87. }
  88. print endcenter();
  89. print mktableft();
  90. print endmenu($type);
  91. print endpage();