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
36 use C4::Interface::CGI::Output;
40 my $bibnum=$input->param('bibnum');
41 my $data=&bibdata($bibnum);
42 my ($subjectcount, $subject) = &subject($bibnum);
43 my ($subtitlecount, $subtitle) = &subtitle($bibnum);
44 my ($addauthorcount, $addauthor) = &addauthor($bibnum);
45 my $sub = $subject->[0]->{'subject'};
46 my $additional = $addauthor->[0]->{'author'};
48 my $submit=$input->param('submit.x');
50 print $input->redirect("/cgi-bin/koha/delbiblio.pl?biblio=$bibnum");
53 my ($template, $loggedinuser, $cookie)
54 = get_template_and_user({template_name => "modbib.tmpl",
58 flagsrequired => {acquisition => 1},
62 # have to get all subtitles, subjects and additional authors
63 $sub = join("|", map { $_->{'subject'} } @{$subject});
65 $additional = join("|", map { $_->{'author'} } @{$addauthor});
67 $dewey = $data->{'dewey'};
69 if ($dewey eq "000.") {
73 $dewey = '00' . $dewey;
75 if ($dewey < 100 && $dewey > 10) {
76 $dewey = '0' . $dewey;
83 $data->{'title'} = &tidyhtml($data->{'title'});
85 $template->param ( biblionumber => $bibnum,
86 biblioitemnumber => $data->{'biblioitemnumber'},
87 author => $data->{'author'},
88 title => $data->{'title'},
89 abstract => $data->{'abstract'},
91 copyrightdate => $data->{'copyrightdate'},
92 seriestitle => $data->{'seriestitle'},
93 additionalauthor => $additional,
94 subtitle => $data->{'subtitle'},
95 unititle => $data->{'unititle'},
96 notes => $data->{'notes'},
97 serial => $data->{'serial'});
99 output_html_with_http_headers $input, $cookie, $template->output;
103 $inp=~ s/\"/\"\;/g;