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.

232 lines
6.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. #whether it is called from the opac of the intranet
  12. my $type=$input->param('type');
  13. if ($type eq ''){
  14. $type='intra';
  15. }
  16. #setup colours
  17. my $main;
  18. my $secondary;
  19. if ($type eq 'opac'){
  20. $main='#99cccc';
  21. $secondary='#efe5ef';
  22. } else {
  23. $main='#cccc99';
  24. $secondary='#ffffcc';
  25. }
  26. print startpage();
  27. print startmenu($type);
  28. #print $type;
  29. my $blah;
  30. my $bib=$input->param('bib');
  31. my $title=$input->param('title');
  32. if ($type ne 'opac'){
  33. print "<a href=request.pl?bib=$bib><img height=42 WIDTH=120 BORDER=0 src=\"/images/requests.gif\" align=right border=0></a>";
  34. }
  35. my @items=ItemInfo(\$blah,$bib,$type);
  36. my $dat=bibdata($bib);
  37. my $count=@items;
  38. my ($count3,$addauthor)=addauthor($bib);
  39. my $additional=$addauthor->[0]->{'author'};
  40. for (my $i=1;$i<$count3;$i++){
  41. $additional=$additional."|".$addauthor->[$i]->{'author'};
  42. }
  43. my @temp=split('\t',$items[0]);
  44. print mkheadr(3,"$dat->{'title'} ($dat->{'author'}) $temp[4]");
  45. print <<printend
  46. <TABLE CELLSPACING=0 CELLPADDING=5 border=1 align=left width="220">
  47. <!-----------------BIBLIO RECORD TABLE--------->
  48. <form action=/cgi-bin/koha/modbib.pl method=post>
  49. <input type=hidden name=bibnum value=$bib>
  50. <TR VALIGN=TOP>
  51. <td bgcolor="$main"
  52. printend
  53. ;
  54. if ($type ne 'opac'){
  55. print "background=\"/images/background-mem.gif\"";
  56. }
  57. print <<printend
  58. ><B>BIBLIO RECORD
  59. printend
  60. ;
  61. if ($type ne 'opac'){
  62. print "$bib";
  63. }
  64. print <<printend
  65. </TD></TR>
  66. <tr VALIGN=TOP >
  67. <TD>
  68. printend
  69. ;
  70. if ($type ne 'opac'){
  71. print "<INPUT TYPE=\"image\" name=\"submit\" VALUE=\"modify\" height=42 WIDTH=93 BORDER=0 src=\"/images/modify-mem.gif\">
  72. <INPUT TYPE=\"image\" name=\"delete\" VALUE=\"delete\" height=42 WIDTH=93 BORDER=0 src=\"/images/delete-mem.gif\">";
  73. }
  74. print <<printend
  75. <br>
  76. <FONT SIZE=2 face="arial, helvetica">
  77. printend
  78. ;
  79. if ($type ne 'opac'){
  80. print <<printend
  81. <b>Subtitle:</b> $dat->{'subtitle'}<br>
  82. <b>Author:</b> $dat->{'author'}<br>
  83. <b>Additional Author:</b> $additional<br>
  84. <b>Series Title:</b> $dat->{'seriestitle'}<br>
  85. <b>Subject:</b> $dat->{'subject'}<br>
  86. <b>Copyright:</b> $dat->{'copyrightdate'}<br>
  87. <b>Notes:</b> $dat->{'notes'}<br>
  88. <b>Unititle:</b> $dat->{'unititle'}<br>
  89. <b>Analytical Author:</b> <br>
  90. <b>Analytical Title:</b> <br>
  91. <b>Serial:</b> $dat->{'serial'}<br>
  92. <b>Total Number of Items:</b> $count
  93. <p>
  94. printend
  95. ;
  96. }
  97. else {
  98. if ($dat->{'subtitle'} ne ''){
  99. print "<b>Subtitle:</b> $dat->{'subtitle'}<br>";
  100. }
  101. if ($dat->{'author'} ne ''){
  102. print "<b>Author:</b> $dat->{'author'}<br>";
  103. }
  104. #Additional Author: <br>
  105. if ($dat->{'seriestitle'} ne ''){
  106. print "<b>Seriestitle:</b> $dat->{'seriestitle'}<br>";
  107. }
  108. if ($dat->{'subject'} ne ''){
  109. print "<b>Subject:</b> $dat->{'subject'}<br>";
  110. }
  111. if ($dat->{'copyrightdate'} ne ''){
  112. print "<b>Copyright:</b> $dat->{'copyrightdate'}<br>";
  113. }
  114. if ($dat->{'notes'} ne ''){
  115. print "<b>Notes:</b> $dat->{'notes'}<br>";
  116. }
  117. if ($dat->{'unititle'} ne ''){
  118. print "<b>Unititle:</b> $dat->{'unititle'}<br>";
  119. }
  120. #Analytical Author: <br>
  121. #Analytical Title: <br>
  122. if ($dat->{'serial'} ne '0'){
  123. print "<b>Serial:</b> Yes<br>";
  124. }
  125. print "<b>Total Number of Items:</b> $count
  126. <p>
  127. ";
  128. }
  129. print <<printend
  130. </form>
  131. </font></TD>
  132. </TR>
  133. </TABLE>
  134. <img src="/images/holder.gif" width=16 height=300 align=left>
  135. printend
  136. ;
  137. #print @items;
  138. my $i=0;
  139. print center();
  140. print mktablehdr;
  141. if ($type eq 'opac'){
  142. print mktablerow(6,$main,'Item Type','Class','Branch','Date Due','Last Seen');
  143. } else {
  144. print mktablerow(6,$main,'Itemtype','Class','Location','Date Due','Last Seen','Barcode',"/images/background-mem.gif");
  145. }
  146. my $colour=1;
  147. while ($i < $count){
  148. # print $items[$i],"<br>";
  149. my @results=split('\t',$items[$i]);
  150. if ($type ne 'opac'){
  151. $results[1]=mklink("/cgi-bin/koha/moredetail.pl?item=$results[5]&bib=$bib&bi=$results[8]",$results[1]);
  152. }
  153. if ($results[2] eq ''){
  154. $results[2]='Available';
  155. }
  156. if ($colour == 1){
  157. if ($type ne 'opac'){
  158. # if ($results[6] eq 'PER'){
  159. print mktablerow(7,$secondary,$results[6],$results[4],$results[3],$results[2],$results[7],$results[1],$results[9]);
  160. # } else {
  161. # print mktablerow(6,$secondary,$results[6],$results[4],$results[3],$results[2],$results[7],$results[1]);
  162. # }
  163. } else {
  164. $results[6]=ItemType($results[6]);
  165. # if ($results[6] =~ /Periodical/){
  166. print mktablerow(6,$secondary,$results[6],$results[4],$results[3],$results[2],$results[7],$results[9]);
  167. # } else {
  168. # print mktablerow(5,$secondary,$results[6],$results[4],$results[3],$results[2],$results[7]);
  169. # }
  170. }
  171. $colour=0;
  172. } else{
  173. if ($type ne 'opac'){
  174. # if ($results[6] eq 'PER'){
  175. print mktablerow(7,'white',$results[6],$results[4],$results[3],$results[2],$results[7],$results[1],$results[9]);
  176. # }else{
  177. # print mktablerow(6,'white',$results[6],$results[4],$results[3],$results[2],$results[7],$results[1]);
  178. # }
  179. } else {
  180. $results[6]=ItemType($results[6]);
  181. # if ($results[6] =~ /Periodical/){
  182. print mktablerow(6,'white',$results[6],$results[4],$results[3],$results[2],$results[7],$results[9]);
  183. # } else {
  184. # print mktablerow(5,'white',$results[6],$results[4],$results[3],$results[2],$results[7]);
  185. # }
  186. }
  187. $colour=1;
  188. }
  189. $i++;
  190. }
  191. print mktableft();
  192. print "<p>";
  193. print mktablehdr();
  194. if ($type ne 'opac'){
  195. print <<printend
  196. <TR VALIGN=TOP>
  197. <TD bgcolor="99cc33" background="/images/background-mem.gif" colspan=2><p><b>HELP</b><br>
  198. <b>Update Biblio for all Items:</b> Click on the <b>Modify</b> button [left] to amend the biblio. Any changes you make will update the record for <b>all</b> the items listed above. <p>
  199. <b>Updating the Biblio for only ONE or SOME Items:</b> If some of the items listed above need a different biblio, or are on the wrong biblio, you must use the <a href="acquisitions/">acquisitions</a> process to fix this. You will need to "re-order" the items, and delete them from this biblio.<p>
  200. </TR>
  201. printend
  202. ;
  203. }
  204. print mktableft();
  205. print endcenter();
  206. print "<br clear=all>";
  207. print endmenu($type);
  208. print endpage();