-
Notifications
You must be signed in to change notification settings - Fork 54
/
detail.pl
executable file
·250 lines (226 loc) · 6.79 KB
/
detail.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
#!/usr/bin/perl
#script to display detailed information
#written 8/11/99
use strict;
#use DBI;
use C4::Search;
use CGI;
use C4::Output;
my $input = new CGI;
print $input->header;
#whether it is called from the opac of the intranet
my $type=$input->param('type');
if ($type eq ''){
$type='intra';
}
#setup colours
my $main;
my $secondary;
if ($type eq 'opac'){
$main='#99cccc';
$secondary='#efe5ef';
} else {
$main='#cccc99';
$secondary='#ffffcc';
}
print startpage();
print startmenu($type);
#print $type;
my $blah;
my $bib=$input->param('bib');
my $title=$input->param('title');
if ($type ne 'opac'){
print "<a href=request.pl?bib=$bib><img height=42 WIDTH=120 BORDER=0 src=\"/images/requests.gif\" align=right border=0></a>";
}
my @items=ItemInfo(\$blah,$bib,$type);
my $dat=bibdata($bib);
my $count=@items;
my ($count3,$addauthor)=addauthor($bib);
my $additional=$addauthor->[0]->{'author'};
for (my $i=1;$i<$count3;$i++){
$additional=$additional."|".$addauthor->[$i]->{'author'};
}
my @temp=split('\t',$items[0]);
if ($type eq 'catmain'){
print mkheadr(3,"Catalogue Maintenance");
}
if ($dat->{'author'} ne ''){
print mkheadr(3,"$dat->{'title'} ($dat->{'author'}) $temp[4]");
} else {
print mkheadr(3,"$dat->{'title'} $temp[4]");
}
print <<printend
<TABLE CELLSPACING=0 CELLPADDING=5 border=1 align=left width="220">
<!-----------------BIBLIO RECORD TABLE--------->
<form action=/cgi-bin/koha/modbib.pl method=post>
<input type=hidden name=bibnum value=$bib>
<TR VALIGN=TOP>
<td bgcolor="$main"
printend
;
if ($type ne 'opac'){
print "background=\"/images/background-mem.gif\"";
}
print <<printend
><B>BIBLIO RECORD
printend
;
if ($type ne 'opac'){
print "$bib";
}
print <<printend
</TD></TR>
<tr VALIGN=TOP >
<TD>
printend
;
if ($type ne 'opac'){
print "<INPUT TYPE=\"image\" name=\"submit\" VALUE=\"modify\" height=42 WIDTH=93 BORDER=0 src=\"/images/modify-mem.gif\">
<INPUT TYPE=\"image\" name=\"delete\" VALUE=\"delete\" height=42 WIDTH=93 BORDER=0 src=\"/images/delete-mem.gif\">";
}
print <<printend
<br>
<FONT SIZE=2 face="arial, helvetica">
printend
;
if ($type ne 'opac'){
print <<printend
<b>Subtitle:</b> $dat->{'subtitle'}<br>
<b>Author:</b> $dat->{'author'}<br>
<b>Additional Author:</b> $additional<br>
<b>Series Title:</b> $dat->{'seriestitle'}<br>
<b>Subject:</b> $dat->{'subject'}<br>
<b>Copyright:</b> $dat->{'copyrightdate'}<br>
<b>Notes:</b> $dat->{'notes'}<br>
<b>Unititle:</b> $dat->{'unititle'}<br>
<b>Analytical Author:</b> <br>
<b>Analytical Title:</b> <br>
<b>Serial:</b> $dat->{'serial'}<br>
<b>Total Number of Items:</b> $count
<p>
printend
;
}
else {
if ($dat->{'subtitle'} ne ''){
print "<b>Subtitle:</b> $dat->{'subtitle'}<br>";
}
if ($dat->{'author'} ne ''){
print "<b>Author:</b> $dat->{'author'}<br>";
}
#Additional Author: <br>
if ($dat->{'seriestitle'} ne ''){
print "<b>Seriestitle:</b> $dat->{'seriestitle'}<br>";
}
if ($dat->{'subject'} ne ''){
print "<b>Subject:</b> $dat->{'subject'}<br>";
}
if ($dat->{'copyrightdate'} ne ''){
print "<b>Copyright:</b> $dat->{'copyrightdate'}<br>";
}
if ($dat->{'notes'} ne ''){
print "<b>Notes:</b> $dat->{'notes'}<br>";
}
if ($dat->{'unititle'} ne ''){
print "<b>Unititle:</b> $dat->{'unititle'}<br>";
}
#Analytical Author: <br>
#Analytical Title: <br>
if ($dat->{'serial'} ne '0'){
print "<b>Serial:</b> Yes<br>";
}
print "<b>Total Number of Items:</b> $count
<p>
";
}
print <<printend
</form>
</font></TD>
</TR>
</TABLE>
<img src="/images/holder.gif" width=16 height=300 align=left>
printend
;
#print @items;
my $i=0;
print center();
print mktablehdr;
if ($type eq 'opac'){
print mktablerow(6,$main,'Item Type','Class','Branch','Date Due','Last Seen');
} else {
print mktablerow(6,$main,'Itemtype','Class','Location','Date Due','Last Seen','Barcode',"/images/background-mem.gif");
}
my $colour=1;
while ($i < $count){
# print $items[$i],"<br>";
my @results=split('\t',$items[$i]);
if ($type ne 'opac'){
$results[1]=mklink("/cgi-bin/koha/moredetail.pl?item=$results[5]&bib=$bib&bi=$results[8]&type=$type",$results[1]);
}
if ($results[2] eq ''){
$results[2]='Available';
}
if ($type eq 'catmain'){
$results[10]=mklink("/cgi-bin/koha/maint/catmaintain.pl?type=fixitemtype&bi=$results[8]&item=$results[6]","Fix Itemtype");
}
if ($colour == 1){
if ($type ne 'opac'){
if ($type eq 'catmain'){
print mktablerow(8,$secondary,$results[6],$results[4],$results[3],$results[2],$results[7],$results[1],$results[9],$results[10]);
} else {
print mktablerow(7,$secondary,$results[6],$results[4],$results[3],$results[2],$results[7],$results[1],$results[9]);
}
} else {
$results[6]=ItemType($results[6]);
print mktablerow(6,$secondary,$results[6],$results[4],$results[3],$results[2],$results[7],$results[9]);
}
$colour=0;
} else{
if ($type ne 'opac'){
if ($type eq 'catmain'){
print mktablerow(8,'white',$results[6],$results[4],$results[3],$results[2],$results[7],$results[1],$results[9],$results[10]);
} else {
print mktablerow(7,'white',$results[6],$results[4],$results[3],$results[2],$results[7],$results[1],$results[9]);
}
} else {
$results[6]=ItemType($results[6]);
print mktablerow(6,'white',$results[6],$results[4],$results[3],$results[2],$results[7],$results[9]);
}
$colour=1;
}
$i++;
}
print mktableft();
print "<p>";
print mktablehdr();
if ($type ne 'opac'){
print <<printend
<TR VALIGN=TOP>
<TD bgcolor="99cc33" background="/images/background-mem.gif" colspan=2><p><b>HELP</b><br>
<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>
<b>Updating the Biblio for only ONE or SOME Items:</b>
printend
;
if ($type eq 'catmain'){
print <<printend
If some of the items listed above need a different biblio,
you need to click on the wrong item, then shift the group it belongs to, to the correct biblio.
You will need to know the correct biblio number
<p>
</TR>
printend
;
} else {
print <<printend
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>
</TR>
printend
;
}
}
print mktableft();
print endcenter();
print "<br clear=all>";
print endmenu($type);
print endpage();