5 #script to modify/delete biblios
7 # modified 11/11/99 by chris@katipo.co.nz
10 # Copyright 2000-2002 Katipo Communications
12 # This file is part of Koha.
14 # Koha is free software; you can redistribute it and/or modify it under the
15 # terms of the GNU General Public License as published by the Free Software
16 # Foundation; either version 2 of the License, or (at your option) any later
19 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
20 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
21 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
23 # You should have received a copy of the GNU General Public License along with
24 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
25 # Suite 330, Boston, MA 02111-1307 USA
36 my $submit=$input->param('delete.x');
37 my $itemnum=$input->param('item');
38 my $bibitemnum=$input->param('bibitem');
40 print $input->redirect("/cgi-bin/koha/delitem.pl?itemnum=$itemnum&bibitemnum=$bibitemnum");
46 my $data=bibitemdata($bibitemnum);
48 my $item=itemnodata('blah','',$itemnum);
49 #my ($analytictitle)=analytic($biblionumber,'t');
50 #my ($analyticauthor)=analytic($biblionumber,'a');
52 print startmenu('catalogue');
57 #hash is set up with input name being the key then
58 #the value is a tab separated list, the first item being the input type
59 #$inputs{'Author'}="text\t$data->{'author'}\t0";
60 #$inputs{'Title'}="text\t$data->{'title'}\t1";
61 # FIXME - The Dewey code is a string, not a number. And "000" is a
62 # perfectly acceptable value.
63 my $dewey = $data->{'dewey'};
65 if ($dewey eq "000.") { $dewey = "";};
66 if ($dewey < 10){$dewey='00'.$dewey;}
67 if ($dewey < 100 && $dewey > 10){$dewey='0'.$dewey;}
72 $inputs{'Barcode'}="text\t$item->{'barcode'}\t0";
73 $inputs{'Class'}="hidden\t$data->{'classification'}$dewey$data->{'subclass'}\t2";
74 #$inputs{'Item Type'}="text\t$data->{'itemtype'}\t3";
75 #$inputs{'Subject'}="textarea\t$sub\t4";
76 $inputs{'Publisher'}="hidden\t$data->{'publishercode'}\t5";
77 #$inputs{'Copyright date'}="text\t$data->{'copyrightdate'}\t6";
78 $inputs{'ISBN'}="hidden\t$data->{'isbn'}\t7";
79 $inputs{'Publication Year'}="hidden\t$data->{'publicationyear'}\t8";
80 $inputs{'Pages'}="hidden\t$data->{'pages'}\t9";
81 $inputs{'Illustrations'}="hidden\t$data->{'illustration'}\t10";
82 #$inputs{'Series Title'}="text\t$data->{'seriestitle'}\t11";
83 #$inputs{'Additional Author'}="text\t$additional\t12";
84 #$inputs{'Subtitle'}="text\t$subtitle->[0]->{'subtitle'}\t13";
85 #$inputs{'Unititle'}="text\t$data->{'unititle'}\t14";
86 $inputs{'ItemNotes'}="textarea\t$item->{'itemnotes'}\t15";
87 #$inputs{'Serial'}="text\t$data->{'serial'}\t16";
88 $inputs{'Volume'}="hidden\t$data->{'volumeddesc'}\t17";
89 $inputs{'Home Branch'}="text\t$item->{'homebranch'}\t18";
90 $inputs{'Lost'}="radio\t$item->{'itemlost'}\t19";
91 #$inputs{'Analytic author'}="text\t\t18";
92 #$inputs{'Analytic title'}="text\t\t19";
94 $inputs{'bibnum'}="hidden\t$data->{'biblionumber'}\t20";
95 $inputs{'bibitemnum'}="hidden\t$data->{'biblioitemnumber'}\t21";
96 $inputs{'itemnumber'}="hidden\t$itemnum\t22";
101 <FONT SIZE=6><em>$data->{'title'} ($data->{'author'})</em></FONT><br>
102 <table border=0 cellspacing=0 cellpadding=5>
103 <tr valign=top bgcolor=white><td><form action=updateitem.pl method=post>
104 <table border=0 cellspacing=0 cellpadding=5>
105 <tr valign=top bgcolor=white><td>Barcode</td><td><input type=text name=Barcode value="$item->{'barcode'}" size=40></td></tr>
106 <input type=hidden name=Class value="$data->{'classification'}$dewey$data->{'subclass'}">
107 <input type=hidden name=Publisher value="$data->{'publisher'}">
108 <input type=hidden name=ISBN value="$data->{'isbn'}">
109 <input type=hidden name=Publication Year value="$data->{'publicationyear'}">
110 <input type=hidden name=Pages value="$data->{'pages'}">
111 <input type=hidden name=Illustrations value="$data->{'illustration'}">
112 <tr valign=top bgcolor=white><td>ItemNotes</td><td><textarea name=ItemNotes cols=40 rows=4>$item->{'itemnotes'}</textarea></td></tr>
113 <input type=hidden name=Volume value="$data->{'volumeddesc'}">
114 <tr valign=top bgcolor=white><td>Home Branch</td><td><input type=text name=Home Branch value="$item->{'homebranch'}" size=40></td></tr>
115 <tr valign=top bgcolor=white><td>Lost</td><td><input type=radio name=Lost value=1
118 if ($item->{'itemlost'} ==1){
123 <input type=radio name=Lost value=0
126 if ($item->{'itemlost'} ==0){
131 <tr valign=top bgcolor=white><td>Cancelled</td><td><input type=radio name=withdrawn value=1
134 if ($item->{'wthdrawn'} ==1){
139 <input type=radio name=withdrawn value=0
142 if ($item->{'wthdrawn'} ==0){
147 <input type=hidden name=bibnum value="$data->{'biblionumber'}">
148 <input type=hidden name=bibitemnum value="$data->{'biblioitemnumber'}">
149 <input type=hidden name=itemnumber value="$itemnum">
150 <tr valign=top bgcolor=white><td></td><td>
152 <input type=image name=submit src=/images/save-changes.gif border=0 width=187