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.

148 lines
4.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. #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. print <<printend
  36. <br>
  37. <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>
  38. <FONT SIZE=6><em>$data->{'title'} ($data->{'author'})</em></FONT><P>
  39. <p>
  40. <form action=/cgi-bin/koha/modbib.pl>
  41. <input type=hidden name=bibitem value=$bi>
  42. <!-------------------BIBLIO ITEM------------>
  43. <TABLE CELLSPACING=0 CELLPADDING=5 border=1 align=left>
  44. <TR VALIGN=TOP>
  45. <td bgcolor="99cc33" background="/images/background-mem.gif" ><B>$data->{'biblioitemnumber'} GROUP - $data->{'description'} </b> </TD>
  46. </TR>
  47. <tr VALIGN=TOP >
  48. <TD width=210 >
  49. <INPUT TYPE="image" name="submit" VALUE="modify" height=42 WIDTH=93 BORDER=0 src="/images/modify-mem.gif">
  50. <INPUT TYPE="image" name="submit" VALUE="modify" height=42 WIDTH=93 BORDER=0 src="/images/delete-mem.gif">
  51. <br>
  52. <FONT SIZE=2 face="arial, helvetica">
  53. <b>Biblionumber:</b> $bib<br>
  54. <b>Item Type:</b> $data->{'itemtype'}<br>
  55. <b>Loan Length:</b> $data->{'loanlength'}<br>
  56. <b>Rental Charge:</b> $data->{'rentalcharge'}<br>
  57. <b>Classification:</b> $data->{'classification'}$data->{'dewey'}$data->{'subclass'}<br>
  58. <b>ISBN:</b> $data->{'isbn'}<br>
  59. <b>Publisher:</b> $data->{'publishercode'} <br>
  60. <b>Place:</b><br>
  61. <b>Date:</b> $data->{'publicationdate'}<br>
  62. <b>Pages:</b> $data->{'pages'}<br>
  63. <b>Illus:</b> $data->{'illus'}<br>
  64. <b>No. of Items:</b> $count
  65. </font>
  66. </TD>
  67. </tr>
  68. </table>
  69. printend
  70. ;
  71. for (my $i=0;$i<$count;$i++){
  72. print <<printend
  73. <img src="/images/holder.gif" width=16 height=250 align=left>
  74. <TABLE CELLSPACING=0 CELLPADDING=5 border=1 align=left width=220 >
  75. <TR VALIGN=TOP>
  76. <td bgcolor="99cc33" background="/images/background-mem.gif"><B>BARCODE $items[$i]->{'barcode'}</b></TD>
  77. </TR>
  78. <tr VALIGN=TOP >
  79. <TD width=220 >
  80. <INPUT TYPE="image" name="submit" VALUE="modify" height=42 WIDTH=93 BORDER=0 src="/images/modify-mem.gif">
  81. <INPUT TYPE="image" name="submit" VALUE="modify" height=42 WIDTH=93 BORDER=0 src="/images/delete-mem.gif">
  82. <br>
  83. printend
  84. ;
  85. $items[$i]->{'itemlost'}=~ s/0/No/;
  86. $items[$i]->{'itemlost'}=~ s/1/Yes/;
  87. $items[$i]->{'withdrawn'}=~ s/0/No/;
  88. $items[$i]->{'withdrawn'}=~ s/1/Yes/;
  89. $items[$i]->{'replacementprice'}+=0.00;
  90. my $year=substr($items[$i]->{'timestamp0'},0,4);
  91. my $mon=substr($items[$i]->{'timestamp0'},4,2);
  92. my $day=substr($items[$i]->{'timestamp0'},6,2);
  93. $items[$i]->{'timestamp0'}="$day/$mon/$year";
  94. my @temp=split('-',$items[$i]->{'dateaccessioned'});
  95. $items[$i]->{'dateaccessioned'}="$temp[2]/$temp[1]/$temp[0]";
  96. @temp=split('-',$items[$i]->{'datelastseen'});
  97. $items[$i]->{'datelastseen'}="$temp[2]/$temp[1]/$temp[0]";
  98. print <<printend
  99. <FONT SIZE=2 face="arial, helvetica">
  100. <b>Home Branch:</b> $items[$i]->{'homebranch'}<br>
  101. <b>Last seen:</b> $items[$i]->{'datelastseen'}<br>
  102. <b>Last borrowed:</b> $items[$i]->{'timestamp0'}<br>
  103. <b>Currently on issue to:</b> <a href=/cgi-bin/koha/moremember.pl?bornum=$items[$i]->{'borrower0'}>$items[$i]->{'card0'}</a><br>
  104. <b>Last Borrower 1:</b> $items[$i]->{'card'}<br>
  105. <b>Last Borrower 2:</b> $items[$i]->{'card1'}<br>
  106. <b>Current Branch:</b> $items[$i]->{'holdingbranch'}<br>
  107. <b>Replacement Price:</b> $items[$i]->{'replacementprice'}<br>
  108. <b>Item lost:</b> $items[$i]->{'itemlost'}<br>
  109. <b>paid by:</b><br>
  110. <b>Notes:</b> $items[$i]->{'itemnotes'}<br>
  111. <b>Renewals:</b> $items[$i]->{'renewals'}<br>
  112. <b>Requests:</b> put in current reserves<br>
  113. waiting: <br>
  114. <b>Accession Date: $items[$i]->{'dateaccessioned'}<br>
  115. <b>Cancelled: $items[$i]->{'withdrawn'}<br>
  116. <b>Total Issues:</b> $items[$i]->{'issues'}<br>
  117. <b>Group Number:</b> $bi <br>
  118. <b>Biblio number:</b> $bib <br>
  119. </font>
  120. </TD>
  121. </tr>
  122. </table>
  123. printend
  124. ;
  125. }
  126. print <<printend
  127. <p>
  128. </form>
  129. printend
  130. ;
  131. print endcenter();
  132. print endmenu($type);
  133. print endpage();