#!/usr/bin/perl #script to modify/delete biblios #written 8/11/99 # modified 11/11/99 by chris@katipo.co.nz use strict; use C4::Search; use CGI; use C4::Output; my $input = new CGI; my $bibnum=$input->param('bibnum'); my $data=&bibdata($bibnum); my ($subjectcount, $subject) = &subject($data->{'biblionumber'}); my ($subtitlecount, $subtitle) = &subtitle($data->{'biblionumber'}); my ($addauthorcount, $addauthor) = &addauthor($data->{'biblionumber'}); my $sub = $subject->[0]->{'subject'}; my $additional = $addauthor->[0]->{'author'}; my %inputs; my $dewey; my $submit=$input->param('submit.x'); if ($submit eq '') { print $input->redirect("/cgi-bin/koha/delbiblio.pl?biblio=$bibnum"); } # if print $input->header; # my ($analytictitle) = &analytic($biblionumber,'t'); # my ($analyticauthor) = &analytic($biblionumber,'a'); print startpage(); print startmenu('catalogue'); my %inputs; # have to get all subtitles, subjects and additional authors for (my $i = 1; $i < $subjectcount; $i++) { $sub = $sub . "|" . $subject->[$i]->{'subject'}; } # for for (my $i = 1; $i < $addauthorcount; $i++) { $additional = $additional . "|" . $addauthor->[$i]->{'author'}; } # for $dewey = $data->{'dewey'}; $dewey =~ s/0+$//; if ($dewey eq "000.") { $dewey = ""; } # if if ($dewey < 10) { $dewey = '00' . $dewey; } # if if ($dewey < 100 && $dewey > 10) { $dewey = '0' . $dewey; } # if if ($dewey <= 0){ $dewey=''; } # if $dewey = ~ s/\.$//; $data->{'title'} = &tidyhtml($data->{'title'}); print << "EOF"; Modify Website Links
EOF print endmenu(); print endpage(); sub tidyhtml { my ($inp)=@_; $inp=~ s/\"/\"\;/g; return($inp); }