4 # Copyright 2000-2002 Katipo Communications
6 # This file is part of Koha.
8 # Koha is free software; you can redistribute it and/or modify it under the
9 # terms of the GNU General Public License as published by the Free Software
10 # Foundation; either version 2 of the License, or (at your option) any later
13 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
14 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
15 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License along with
18 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
19 # Suite 330, Boston, MA 02111-1307 USA
24 use C4::Output; # contains gettemplate
27 use C4::Interface::CGI::Output;
34 my $bibnum = checkinp($input->param('biblionumber'));
36 biblionumber => $bibnum,
37 title => $input->param('title')?$input->param('title'):"",
38 author => $input->param('author')?$input->param('author'):"",
39 abstract => $input->param('abstract')?$input->param('abstract'):"",
40 copyrightdate => $input->param('copyrightdate')?$input->param('copyrightdate'):"",
41 seriestitle => $input->param('seriestitle')?$input->param('seriestitle'):"",
42 serial => $input->param('serial')?$input->param('serial'):"",
43 unititle => $input->param('unititle')?$input->param('unititle'):"",
44 notes => $input->param('notes')?$input->param('notes'):"",
46 my $subtitle = checkinp($input->param('subtitle'));
47 my $subject = checkinp($input->param('subject'));
48 my $addauthor = checkinp($input->param('additionalauthor'));
49 my $force = $input->param('Force');
57 &modsubtitle($bibnum, $subtitle);
58 &modaddauthor($bibnum, $addauthor);
60 $subject = uc($subject);
61 @sub = split(/\|/, $subject);
64 for (my $i = 0; $i < $count; $i++) {
68 $error = &modsubject($bibnum,$force,@sub);
73 my ($template, $loggedinuser, $cookie) = get_template_and_user({
74 template_name => "updatebiblio.tmpl",
77 flagsrequired => {catalogue => 1},
81 my @subs=split('\n',$error);
82 my @names=$input->param;
85 for (my $i=0;$i<$count;$i++) {
86 if ($names[$i] ne 'Force') {
88 $line{'value'}=$input->param("$names[$i]");
89 $line{'name'}=$names[$i];
90 push(@dataloop, \%line);
93 $template->param(substring =>$subs[0],
95 dataloop => \@dataloop);
96 print "Content-Type: text/html\n\n", $template->output;
98 print $input->redirect("detail.pl?type=intra&bib=$bibnum");