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.

179 lines
5.4 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. #setup colours
  14. my $main;
  15. my $secondary;
  16. if ($type eq 'opac'){
  17. $main='#99cccc';
  18. $secondary='#efe5ef';
  19. } else {
  20. $main='#cccc99';
  21. $secondary='#ffffcc';
  22. }
  23. print startpage();
  24. print startmenu($type);
  25. my $blah;
  26. my $bib=$input->param('bib');
  27. my $title=$input->param('title');
  28. my $bi=$input->param('bi');
  29. my $data=bibitemdata($bi);
  30. my (@items)=itemissues($bi);
  31. #print @items;
  32. my $count=@items;
  33. my $i=0;
  34. print center();
  35. my $dewey = $data->{'dewey'};
  36. $dewey =~ s/0+$//;
  37. if ($dewey eq "000.") { $dewey = "";};
  38. if ($dewey < 10){$dewey='00'.$dewey;}
  39. if ($dewey < 100 && $dewey > 10){$dewey='0'.$dewey;}
  40. if ($dewey <= 0){
  41. $dewey='';
  42. }
  43. $dewey=~ s/\.$//;
  44. print <<printend
  45. <br>
  46. <a href=/cgi-bin/koha/request.pl?bib=$bib><img src=/images/requests.gif width=120 height=42 border=0 align=right border=0></a>
  47. <FONT SIZE=6><em><a href=/cgi-bin/koha/detail.pl?bib=$bib&type=intra>$data->{'title'} ($data->{'author'})</a></em></FONT><P>
  48. <p>
  49. <form action=/cgi-bin/koha/modbibitem.pl>
  50. <input type=hidden name=bibitem value=$bi>
  51. <input type=hidden name=biblio value=$bib>
  52. <!-------------------BIBLIO ITEM------------>
  53. <TABLE CELLSPACING=0 CELLPADDING=5 border=1 align=left>
  54. <TR VALIGN=TOP>
  55. <td bgcolor="99cc33" background="/images/background-mem.gif" ><B>$data->{'biblioitemnumber'} GROUP - $data->{'description'} </b> </TD>
  56. </TR>
  57. <tr VALIGN=TOP >
  58. <TD width=210 >
  59. <INPUT TYPE="image" name="submit" VALUE="modify" height=42 WIDTH=93 BORDER=0 src="/images/modify-mem.gif">
  60. <INPUT TYPE="image" name="delete" VALUE="delete" height=42 WIDTH=93 BORDER=0 src="/images/delete-mem.gif">
  61. <br>
  62. <FONT SIZE=2 face="arial, helvetica">
  63. <b>Biblionumber:</b> $bib<br>
  64. <b>Item Type:</b> $data->{'itemtype'}<br>
  65. <b>Loan Length:</b> $data->{'loanlength'}<br>
  66. <b>Rental Charge:</b> $data->{'rentalcharge'}<br>
  67. <b>Classification:</b> $data->{'classification'}$dewey$data->{'subclass'}<br>
  68. <b>ISBN:</b> $data->{'isbn'}<br>
  69. <b>Publisher:</b> $data->{'publishercode'} <br>
  70. <b>Place:</b> $data->{'place'}<br>
  71. <b>Date:</b> $data->{'publicationyear'}<br>
  72. <b>Volume:</b> $data->{'volumeddesc'}<br>
  73. <b>Pages:</b> $data->{'pages'}<br>
  74. <b>Illus:</b> $data->{'illus'}<br>
  75. <b>Size:</b> $data->{'size'}<br>
  76. <b>Notes:</b> $data->{'notes'}<br>
  77. <b>No. of Items:</b> $count
  78. </font>
  79. </TD>
  80. </tr>
  81. </table>
  82. </form>
  83. printend
  84. ;
  85. for (my $i=0;$i<$count;$i++){
  86. print <<printend
  87. <img src="/images/holder.gif" width=16 height=300 align=left>
  88. <TABLE CELLSPACING=0 CELLPADDING=5 border=1 align=left width=220 >
  89. <TR VALIGN=TOP>
  90. <td bgcolor="99cc33" background="/images/background-mem.gif"><B>BARCODE $items[$i]->{'barcode'}</b></TD>
  91. </TR>
  92. <tr VALIGN=TOP >
  93. <TD width=220 >
  94. <form action=/cgi-bin/koha/moditem.pl method=post>
  95. <input type=hidden name=bibitem value=$bi>
  96. <input type=hidden name=item value=$items[$i]->{'itemnumber'}>
  97. <INPUT TYPE="image" name="submit" VALUE="modify" height=42 WIDTH=93 BORDER=0 src="/images/modify-mem.gif">
  98. <INPUT TYPE="image" name="delete" VALUE="delete" height=42 WIDTH=93 BORDER=0 src="/images/delete-mem.gif">
  99. <br>
  100. printend
  101. ;
  102. $items[$i]->{'itemlost'}=~ s/0/No/;
  103. $items[$i]->{'itemlost'}=~ s/1/Yes/;
  104. $items[$i]->{'withdrawn'}=~ s/0/No/;
  105. $items[$i]->{'withdrawn'}=~ s/1/Yes/;
  106. $items[$i]->{'replacementprice'}+=0.00;
  107. my $year=substr($items[$i]->{'timestamp0'},0,4);
  108. my $mon=substr($items[$i]->{'timestamp0'},4,2);
  109. my $day=substr($items[$i]->{'timestamp0'},6,2);
  110. $items[$i]->{'timestamp0'}="$day/$mon/$year";
  111. my @temp=split('-',$items[$i]->{'dateaccessioned'});
  112. $items[$i]->{'dateaccessioned'}="$temp[2]/$temp[1]/$temp[0]";
  113. @temp=split('-',$items[$i]->{'datelastseen'});
  114. $items[$i]->{'datelastseen'}="$temp[2]/$temp[1]/$temp[0]";
  115. print <<printend
  116. <FONT SIZE=2 face="arial, helvetica">
  117. <b>Home Branch:</b> $items[$i]->{'homebranch'}<br>
  118. <b>Last seen:</b> $items[$i]->{'datelastseen'}<br>
  119. <b>Last borrowed:</b> $items[$i]->{'timestamp0'}<br>
  120. printend
  121. ;
  122. if ($items[$i] eq 'Available'){
  123. print "<b>Currently on issue to:</b><br>";
  124. } else {
  125. print "<b>Currently on issue to:</b> <a href=/cgi-bin/koha/moremember.pl?bornum=$items[$i]->{'borrower0'}>$items[$i]->{'card'}</a><br>";
  126. }
  127. print <<printend
  128. <b>Last Borrower 1:</b> $items[$i]->{'card0'}<br>
  129. <b>Last Borrower 2:</b> $items[$i]->{'card1'}<br>
  130. <b>Current Branch:</b> $items[$i]->{'holdingbranch'}<br>
  131. <b>Replacement Price:</b> $items[$i]->{'replacementprice'}<br>
  132. <b>Item lost:</b> $items[$i]->{'itemlost'}<br>
  133. <b>paid by:</b><br>
  134. <b>Notes:</b> $items[$i]->{'itemnotes'}<br>
  135. <b>Renewals:</b> $items[$i]->{'renewals'}<br>
  136. <b>Accession Date: $items[$i]->{'dateaccessioned'}<br>
  137. printend
  138. ;
  139. if ($items[$i]->{'wthdrawn'} eq '1'){
  140. $items[$i]->{'wthdrawn'}="Yes";
  141. } else {
  142. $items[$i]->{'wthdrawn'}="No";
  143. }
  144. print <<printend
  145. <b>Cancelled: $items[$i]->{'wthdrawn'}<br>
  146. <b>Total Issues:</b> $items[$i]->{'issues'}<br>
  147. <b>Group Number:</b> $bi <br>
  148. <b>Biblio number:</b> $bib <br>
  149. </font>
  150. </TD>
  151. </tr>
  152. </table>
  153. </form>
  154. printend
  155. ;
  156. }
  157. print <<printend
  158. <p>
  159. </form>
  160. printend
  161. ;
  162. print endcenter();
  163. print endmenu($type);
  164. print endpage();