Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 144 lines (122 sloc) 5.036 kb
d0374d0 Initial revision
rangi authored
1 #!/usr/bin/perl
2
3 #script to modify/delete biblios
4 #written 8/11/99
5 # modified 11/11/99 by chris@katipo.co.nz
6
7 use strict;
8
9 use C4::Search;
10 use CGI;
11 use C4::Output;
12 use C4::Acquisitions;
13
14 my $input = new CGI;
15 my $submit=$input->param('delete.x');
16 my $itemnum=$input->param('item');
17 my $bibitemnum=$input->param('bibitem');
18 if ($submit ne ''){
19 print $input->redirect("/cgi-bin/koha/delitem.pl?itemnum=$itemnum&bibitemnum=$bibitemnum");
20 }
21
22 print $input->header;
23 #print $input->dump;
24
25 my $data=bibitemdata($bibitemnum);
26
27 my $item=itemnodata('blah','',$itemnum);
28 #my ($analytictitle)=analytic($biblionumber,'t');
29 #my ($analyticauthor)=analytic($biblionumber,'a');
30 print startpage();
31 print startmenu();
32 my %inputs;
33
34
35
36 #hash is set up with input name being the key then
37 #the value is a tab separated list, the first item being the input type
38 #$inputs{'Author'}="text\t$data->{'author'}\t0";
39 #$inputs{'Title'}="text\t$data->{'title'}\t1";
40 my $dewey = $data->{'dewey'};
41 $dewey =~ s/0+$//;
42 if ($dewey eq "000.") { $dewey = "";};
43 if ($dewey < 10){$dewey='00'.$dewey;}
44 if ($dewey < 100 && $dewey > 10){$dewey='0'.$dewey;}
45 if ($dewey <= 0){
46 $dewey='';
47 }
48 $dewey=~ s/\.$//;
49 $inputs{'Barcode'}="text\t$item->{'barcode'}\t0";
50 $inputs{'Class'}="hidden\t$data->{'classification'}$dewey$data->{'subclass'}\t2";
51 #$inputs{'Item Type'}="text\t$data->{'itemtype'}\t3";
52 #$inputs{'Subject'}="textarea\t$sub\t4";
53 $inputs{'Publisher'}="hidden\t$data->{'publishercode'}\t5";
54 #$inputs{'Copyright date'}="text\t$data->{'copyrightdate'}\t6";
55 $inputs{'ISBN'}="hidden\t$data->{'isbn'}\t7";
56 $inputs{'Publication Year'}="hidden\t$data->{'publicationyear'}\t8";
57 $inputs{'Pages'}="hidden\t$data->{'pages'}\t9";
58 $inputs{'Illustrations'}="hidden\t$data->{'illustration'}\t10";
59 #$inputs{'Series Title'}="text\t$data->{'seriestitle'}\t11";
60 #$inputs{'Additional Author'}="text\t$additional\t12";
61 #$inputs{'Subtitle'}="text\t$subtitle->[0]->{'subtitle'}\t13";
62 #$inputs{'Unititle'}="text\t$data->{'unititle'}\t14";
63 $inputs{'ItemNotes'}="textarea\t$item->{'itemnotes'}\t15";
64 #$inputs{'Serial'}="text\t$data->{'serial'}\t16";
65 $inputs{'Volume'}="hidden\t$data->{'volumeddesc'}\t17";
66 $inputs{'Home Branch'}="text\t$item->{'homebranch'}\t18";
67 $inputs{'Lost'}="radio\t$item->{'itemlost'}\t19";
68 #$inputs{'Analytic author'}="text\t\t18";
69 #$inputs{'Analytic title'}="text\t\t19";
70
71 $inputs{'bibnum'}="hidden\t$data->{'biblionumber'}\t20";
72 $inputs{'bibitemnum'}="hidden\t$data->{'biblioitemnumber'}\t21";
73 $inputs{'itemnumber'}="hidden\t$itemnum\t22";
74
75
76
77 print <<printend
78 <FONT SIZE=6><em>$data->{'title'} ($data->{'author'})</em></FONT><br>
79 <table border=0 cellspacing=0 cellpadding=5>
80 <tr valign=top bgcolor=white><td><form action=updateitem.pl method=post>
81 <table border=0 cellspacing=0 cellpadding=5>
82 <tr valign=top bgcolor=white><td>Barcode</td><td><input type=text name=Barcode value="$item->{'barcode'}" size=40></td></tr>
83 <input type=hidden name=Class value="$data->{'classification'}$dewey$data->{'subclass'}">
84 <input type=hidden name=Publisher value="$data->{'publisher'}">
85 <input type=hidden name=ISBN value="$data->{'isbn'}">
86 <input type=hidden name=Publication Year value="$data->{'publicationyear'}">
87 <input type=hidden name=Pages value="$data->{'pages'}">
88 <input type=hidden name=Illustrations value="$data->{'illustration'}">
89 <tr valign=top bgcolor=white><td>ItemNotes</td><td><textarea name=ItemNotes cols=40 rows=4>$item->{'itemnotes'}</textarea></td></tr>
90 <input type=hidden name=Volume value="$data->{'volumeddesc'}">
91 <tr valign=top bgcolor=white><td>Home Branch</td><td><input type=text name=Home Branch value="$item->{'homebranch'}" size=40></td></tr>
92 <tr valign=top bgcolor=white><td>Lost</td><td><input type=radio name=Lost value=1
93 printend
94 ;
95 if ($item->{'itemlost'} ==1){
96 print " checked ";
97 }
98 print <<printend
99 >Yes
100 <input type=radio name=Lost value=0
101 printend
102 ;
103 if ($item->{'itemlost'} ==0){
104 print " checked ";
105 }
106 print <<printend
107 >No</td></tr>
108 <tr valign=top bgcolor=white><td>Cancelled</td><td><input type=radio name=withdrawn value=1
109 printend
110 ;
111 if ($item->{'wthdrawn'} ==1){
112 print " checked ";
113 }
114 print <<printend
115 >Yes
116 <input type=radio name=withdrawn value=0
117 printend
118 ;
119 if ($item->{'wthdrawn'} ==0){
120 print " checked ";
121 }
122 print <<printend
123 >No</td></tr>
124 <input type=hidden name=bibnum value="$data->{'biblionumber'}">
125 <input type=hidden name=bibitemnum value="$data->{'biblioitemnumber'}">
126 <input type=hidden name=itemnumber value="$itemnum">
127 <tr valign=top bgcolor=white><td></td><td>
128
129 <input type=image name=submit src=/images/save-changes.gif border=0 width=187
130 height=42></td></tr>
131 </table>
132 </form></td></tr>
133 </table>
134
135 printend
136 ;
137
138
139
140
141
142 print endmenu();
143 print endpage();
Something went wrong with that request. Please try again.