5 #script to modify/delete biblios
7 # modified 11/11/99 by chris@katipo.co.nz
8 # modified 12/16/2002 by hdl@ifrance.com : templating
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
37 my $bibnum=$input->param('bibnum');
38 my $data=&bibdata($bibnum);
39 my ($subjectcount, $subject) = &subject($data->{'biblionumber'});
40 my ($subtitlecount, $subtitle) = &subtitle($data->{'biblionumber'});
41 my ($addauthorcount, $addauthor) = &addauthor($data->{'biblionumber'});
42 my $sub = $subject->[0]->{'subject'};
43 my $additional = $addauthor->[0]->{'author'};
45 my $submit=$input->param('submit.x');
47 print $input->redirect("/cgi-bin/koha/delbiblio.pl?biblio=$bibnum");
50 #print $input->header;
51 # my ($analytictitle) = &analytic($biblionumber,'t');
52 # my ($analyticauthor) = &analytic($biblionumber,'a');
54 #print startmenu('catalogue');
55 my $template = gettemplate("modbib.tmpl");
57 # have to get all subtitles, subjects and additional authors
58 $sub = join("|", map { $_->{'subject'} } @{$subject});
60 $additional = join("|", map { $_->{'author'} } @{$addauthor});
62 $dewey = $data->{'dewey'};
64 if ($dewey eq "000.") {
68 $dewey = '00' . $dewey;
70 if ($dewey < 100 && $dewey > 10) {
71 $dewey = '0' . $dewey;
78 $data->{'title'} = &tidyhtml($data->{'title'});
80 $template->param ( biblionumber => $data->{'biblionumber'});
81 $template->param ( biblioitemnumber => $data->{'biblioitemnumber'});
82 $template->param ( author => $data->{'author'});
83 $template->param ( title => $data->{'title'});
84 $template->param ( abstract => $data->{'abstract'});
85 $template->param ( subject => $sub);
86 $template->param ( copyrightdate => $data->{'copyrightdate'});
87 $template->param ( seriestitle => $data->{'seriestitle'});
88 $template->param ( additionalauthor => $additional);
89 $template->param ( subtitle => $data->{'subtitle'});
90 $template->param ( untitle => $data->{'untitle'});
91 $template->param ( notes => $data->{'notes'});
92 $template->param ( serial => $data->{'serial'});
94 print "Content-Type: text/html\n\n", $template->output;
98 $inp=~ s/\"/\"\;/g;