5 #script to modify/delete groups
8 # modified 11/11/99 by chris@katipo.co.nz
9 # modified 18/4/00 by chris@katipo.co.nz
11 # Copyright 2000-2002 Katipo Communications
13 # This file is part of Koha.
15 # Koha is free software; you can redistribute it and/or modify it under the
16 # terms of the GNU General Public License as published by the Free Software
17 # Foundation; either version 2 of the License, or (at your option) any later
20 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
21 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
22 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
24 # You should have received a copy of the GNU General Public License along with
25 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
26 # Suite 330, Boston, MA 02111-1307 USA
38 my $bibitemnum=$input->param('bibitem');
39 my $data=bibitemdata($bibitemnum);
40 my $biblio=$input->param('biblio');
41 my $submit=$input->param('submit.x');
43 print $input->redirect("deletebiblioitem.pl?biblioitemnumber=$bibitemnum&biblionumber=$biblio");
46 my $template = gettemplate("modbibitem.tmpl");
50 #hash is set up with input name being the key then
51 #the value is a tab separated list, the first item being the input type
52 #$inputs{'Author'}="text\t$data->{'author'}\t0";
53 #$inputs{'Title'}="text\t$data->{'title'}\t1";
54 my $dewey = $data->{'dewey'};
56 if ($dewey eq "000.") { $dewey = "";};
57 if ($dewey < 10){$dewey='00'.$dewey;}
58 if ($dewey < 100 && $dewey > 10){$dewey='0'.$dewey;}
63 $inputs{'Class'}="text\t$data->{'classification'}$dewey$data->{'subclass'}\t2";
64 $inputs{'Item Type'}="text\t$data->{'itemtype'}\t3";
65 $inputs{'URL'}="text\t$data->{'url'}\t4";
66 $inputs{'Publisher'}="text\t$data->{'publishercode'}\t5";
67 #$inputs{'Copyright date'}="text\t$data->{'copyrightdate'}\t6";
68 $inputs{'ISBN'}="text\t$data->{'isbn'}\t7";
69 $inputs{'Publication Year'}="text\t$data->{'publicationyear'}\t8";
70 $inputs{'Pages'}="text\t$data->{'pages'}\t9";
71 $inputs{'Illustrations'}="text\t$data->{'illustration'}\t10";
72 #$inputs{'Series Title'}="text\t$data->{'seriestitle'}\t11";
73 #$inputs{'Additional Author'}="text\t$additional\t12";
74 #$inputs{'Subtitle'}="text\t$subtitle->[0]->{'subtitle'}\t13";
75 #$inputs{'Unititle'}="text\t$data->{'unititle'}\t14";
76 #$inputs{'Notes'}="textarea\t$data->{'notes'}\t15";
77 #$inputs{'Serial'}="text\t$data->{'serial'}\t16";
78 $inputs{'Volume'}="text\t$data->{'volumeddesc'}\t17";
79 #$inputs{'Analytic author'}="text\t\t18";
80 #$inputs{'Analytic title'}="text\t\t19";
82 $inputs{'bibnum'}="hidden\t$data->{'biblionumber'}\t20";
83 $inputs{'bibitemnum'}="hidden\t$data->{'biblioitemnumber'}\t21";
85 $template->param( biblionumber => $data->{'biblionumber'},
86 title => $data->{'title'},
87 author => $data->{'author'},
88 description => $data->{'description'});
90 my ($count,@bibitems)=bibitems($data->{'biblionumber'});
94 for (my $i=0;$i<$count;$i++){
96 $line{biblioitemnumber} = $bibitems[$i]->{'biblioitemnumber'};
97 $line{description} = $bibitems[$i]->{'description'};
98 $line{isbn} = $bibitems[$i]->{'isbn'};
99 push(@bibitemloop,\%line);
101 $template->param(bibitemloop =>\@bibitemloop);
104 #my $notesinput=$input->textfield(-name=>'Notes', -default=>$data->{'bnotes'}, -size=>20);
105 $template->param(bnotes=>$data->{'bnotes'});
107 $template->param(itemtype => $data->{'itemtype'});
109 $template->param(url => $data->{'url'});
110 $template->param(classification => $data->{'classification'},
112 subclass => $data->{'subclass'},
113 publishercode => $data->{'publishercode'},
114 place => $data->{'place'},
115 isbn => $data->{'isbn'},
116 publicationyear => $data->{'publicationyear'},
117 pages => $data->{'pages'},
118 illustration => $data->{'illustration'},
119 volumeddesc => $data->{'volumeddesc'},
120 size => $data->{'size'},
121 biblionumber => $data->{'biblionumber'},
122 biblioitemnumber => $data->{'biblioitemnumber'});
124 my (@items)=itemissues($data->{'biblioitemnumber'});
128 for (my $i=0;$i<$count;$i++){
130 $items[$i]->{'datelastseen'} = slashifyDate($items[$i]->{'datelastseen'});
131 $line{barcode}=$items[$i]->{'barcode'};
132 $line{itemnumber}=$items[$i]->{'itemnumber'};
133 $line{biblionumber}=$data->{'biblionumber'};
134 $line{biblioitemnumber}=$data->{'biblioitemnumber'};
135 $line{holdingbranch}=$items[$i]->{'holdingbranch'};
136 $line{datelastseen}=$items[$i]->{'datelastseen'};
137 push(@itemloop,\%line);
139 $template->param(itemloop => \@itemloop);
140 print "Content-Type: text/html\n\n", $template->output;