5 #script to modify/delete biblios
7 # Copyright 2000-2002 Katipo Communications
9 # This file is part of Koha.
11 # Koha is free software; you can redistribute it and/or modify it under the
12 # terms of the GNU General Public License as published by the Free Software
13 # Foundation; either version 2 of the License, or (at your option) any later
16 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
17 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
18 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
20 # You should have received a copy of the GNU General Public License along with
21 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
22 # Suite 330, Boston, MA 02111-1307 USA
32 use C4::Interface::CGI::Output;
36 my $bibnum=$input->param('bibnum');
37 my $data=&bibdata($bibnum);
38 my ($subjectcount, $subject) = &getsubject($bibnum);
39 my ($subtitlecount, $subtitle) = &getsubtitle($bibnum);
40 my ($addauthorcount, $addauthor) = &getaddauthor($bibnum);
41 my $sub = $subject->[0]->{'subject'};
42 my $additional = $addauthor->[0]->{'author'};
44 my $submit=$input->param('submit.x');
46 print $input->redirect("/cgi-bin/koha/delbiblio.pl?biblio=$bibnum");
49 my ($template, $loggedinuser, $cookie)
50 = get_template_and_user({template_name => "modbib.tmpl",
54 flagsrequired => {acquisition => 1},
58 # have to get all subtitles, subjects and additional authors
59 $sub = join("|", map { $_->{'subject'} } @{$subject});
61 $additional = join("|", map { $_->{'author'} } @{$addauthor});
63 $dewey = $data->{'dewey'};
65 if ($dewey eq "000.") {
69 $dewey = '00' . $dewey;
71 if ($dewey < 100 && $dewey > 10) {
72 $dewey = '0' . $dewey;
79 $data->{'title'} = &tidyhtml($data->{'title'});
81 $template->param ( biblionumber => $bibnum,
82 biblioitemnumber => $data->{'biblioitemnumber'},
83 author => $data->{'author'},
84 title => $data->{'title'},
85 abstract => $data->{'abstract'},
87 copyrightdate => $data->{'copyrightdate'},
88 seriestitle => $data->{'seriestitle'},
89 additionalauthor => $additional,
90 subtitle => $data->{'subtitle'},
91 unititle => $data->{'unititle'},
92 notes => $data->{'bnotes'},
93 serial => $data->{'serial'});
95 output_html_with_http_headers $input, $cookie, $template->output;
99 $inp=~ s/\"/\"\;/g;