From: truth_nz Date: Thu, 9 May 2002 03:01:40 +0000 (+0000) Subject: Update to catalogue to allow change of biblio abstracts. X-Git-Tag: start~260 X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=commitdiff_plain;h=cec2db30eafee1f8b82cbc3ceca16e086d56878a;p=koha_gimpoz Update to catalogue to allow change of biblio abstracts. Related modifications to acqui system to match changes in Acquisition.pm detail.pm changed to show abstract - still working on how to show url's --- diff --git a/acqui/addorder.pl b/acqui/addorder.pl index 04280a73ee..f2f0fa62a4 100755 --- a/acqui/addorder.pl +++ b/acqui/addorder.pl @@ -7,13 +7,8 @@ use strict; use CGI; use C4::Output; use C4::Acquisitions; -#use Date::Manip; my $input = new CGI; -#print $input->header; -#print startpage(); -#print startmenu('acquisitions'); -#print $input->dump; my $existing=$input->param('existing'); my $title=$input->param('title'); $title=~ s/\'/\\\'/g; @@ -39,7 +34,6 @@ my $bibitemnum; my $rrp=$input->param('rrp'); my $ecost=$input->param('ecost'); my $gst=$input->param('GST'); -#check to see if orderexists my $orderexists=$input->param('orderexists'); #check to see if biblio exists @@ -47,14 +41,18 @@ if ($quantity ne '0'){ if ($existing eq 'no'){ #if it doesnt create it - $bibnum = &newbiblio({ title => $title, - author =>$author, - copyright => $copyright }); + $bibnum = &newbiblio({ title => $title?$title:"", + author => $author?$author:"", + copyright => $copyright?$copyright:"" }); $bibitemnum = &newbiblioitem({ biblionumber => $bibnum, - itemtype => $itemtype, - isben => $isbn }); + itemtype => $itemtype?$itemtype:"", + isben => $isbn?$isbn:"" }); newsubtitle($bibnum); - modbiblio($bibnum,$title,$author,$copyright,$series); + modbiblio({ biblionumber => $bibnum, + title => $title?$title:"", + author => $author?$author:"", + copyrightdate => $copyright?$copyright:"", + series => $series?$series:"" }); } else { $bibnum=$input->param('biblio'); $bibitemnum=$input->param('bibitemnum'); @@ -62,21 +60,20 @@ if ($quantity ne '0'){ if ($bibitemnum eq '' || $itemtype ne $oldtype){ $bibitemnum=newbiblioitem($bibnum,$itemtype,$isbn); } - modbiblio($bibnum,$title,$author,$copyright,$series); + modbiblio({ biblionumber => $bibnum, + title => $title?$title:"", + author => $author?$author:"", + copyrightdate => $copyright?$copyright:"", + series => $series?$series:"" }); } - if ($orderexists ne ''){ + if ($orderexists ne '') { modorder($title,$ordnum,$quantity,$listprice,$bibnum,$basketno,$supplier,$who,$notes,$bookfund,$bibitemnum,$rrp,$ecost,$gst); }else { neworder($bibnum,$title,$ordnum,$basketno,$quantity,$listprice,$supplier,$who,$notes,$bookfund,$bibitemnum,$rrp,$ecost,$gst); } } else { - #print $input->header; - #print "del"; $bibnum=$input->param('biblio'); delorder($bibnum,$ordnum); } print $input->redirect("newbasket.pl?id=$supplier&basket=$basketno"); -#print $input->dump; -#print endmenu('acquisitions'); -#print endpage(); diff --git a/acqui/finishreceive.pl b/acqui/finishreceive.pl index 0dfa44e8dc..df99bc4e6d 100755 --- a/acqui/finishreceive.pl +++ b/acqui/finishreceive.pl @@ -13,14 +13,13 @@ my $input=new CGI; my $user=$input->remote_user; #print $input->dump; -my $biblio=$input->param('biblio'); +my $biblionumber = $input->param('biblio'); my $ordnum=$input->param('ordnum'); my $quantrec=$input->param('quantityrec'); my $quantity=$input->param('quantity'); my $notes=$input->param('notes'); my $cost=$input->param('cost'); my $invoiceno=$input->param('invoice'); -my $id=$input->param('id'); my $bibitemno=$input->param('biblioitemnum'); my $data=bibitemdata($bibitemno); my $publisher=$data->{'publishercode'}; @@ -37,12 +36,15 @@ my $branch=$input->param('branch'); my $bookfund=$input->param('bookfund'); my $itemtype=$input->param('format'); my $isbn=$input->param('ISBN'); -my $series=$input->param('Series'); -my $bookseller=$input->param('bookseller'); -$id=$bookseller; -my $title=$input->param('title'); -my $author=$input->param('author'); -my $copyright=$input->param('copyright'); +my $bookseller = $input->param('bookseller'); +my $id = $bookseller; +my $biblio = { + biblionumber => $biblionumber, + title => $input->param('title')?$input->param('title'):"", + author => $input->param('author')?$input->param('author'):"", + copyrightdate => $input->param('copyright')?$input->param('copyright'):"", + series => $input->param('Series')?$input->param('Series'):"" +}; # my $biblio if ($quantrec != 0){ $cost=$cost / $quantrec; @@ -59,12 +61,12 @@ if ($itemtype =~ /REF/){ if ($itemtype =~ /PER/){ # print "$bibitemno"; $class="Periodical"; - $bibitemno=newbiblioitem($biblio,$itemtype,$isbn,$volinf,$class); + $bibitemno=newbiblioitem($biblionumber,$itemtype,$isbn,$volinf,$class); # print "here $bibitemno"; } if ($quantity != 0){ - receiveorder($biblio,$ordnum,$quantrec,$user,$cost,$invoiceno,$bibitemno,$freight,$bookfund); - modbiblio($biblio,$title,$author,$copyright,$series); + receiveorder($biblionumber,$ordnum,$quantrec,$user,$cost,$invoiceno,$bibitemno,$freight,$bookfund); + modbiblio($biblio); modbibitem($bibitemno,$itemtype,$isbn,$publisher,$pubdate,$class,$dewey,$subclass,$illus,$pages,$volinf,$notes,$size); #print $notes; my $barcode=$input->param('barcode'); @@ -80,7 +82,7 @@ if ($quantity != 0){ # print $barcode; } my ($error) = newitems({ biblioitemnumber => $bibitemno, - biblionumber => $biblio, + biblionumber => $biblionumber, replacementprice => $replacement, price => $cost, booksellerid => $bookseller, @@ -99,6 +101,6 @@ if ($quantity != 0){ } } else { print $input->header; - delorder($biblio,$ordnum); + delorder($biblionumber,$ordnum); print $input->redirect("/acquisitions/"); } diff --git a/detail.pl b/detail.pl index ade8d0b9df..fb81c10f4a 100755 --- a/detail.pl +++ b/detail.pl @@ -13,26 +13,33 @@ my $type = $input->param('type'); my $bib = $input->param('bib'); my $title = $input->param('title'); my @items = &ItemInfo(undef, $bib, $type); +my @temp = split('\t', $items[0]); my $dat = &bibdata($bib); my $count = @items; -my ($count3, $addauthor) = &addauthor($bib); +my ($authorcount, $addauthor) = &addauthor($bib); my $additional = $addauthor->[0]->{'author'}; -my @temp = split('\t', $items[0]); my $main; my $secondary; +my $colour; -if ($type eq ''){ + +if ($type eq '') { $type = 'opac'; } # if # setup colours -if ($type eq 'opac'){ +if ($type eq 'opac') { $main = '#99cccc'; $secondary = '#efe5ef'; } else { $main = '#cccc99'; $secondary = '#ffffcc'; } # else +$colour = $secondary; + +for (my $i = 1; $i < $authorcount; $i++) { + $additional .= "|" . $addauthor->[$i]->{'author'}; +} # for print $input->header; print startpage(); @@ -40,14 +47,10 @@ print startmenu($type); if ($type ne 'opac'){ print << "EOF"; - + EOF } # if -for (my $i = 1; $i < $count3; $i++) { - $additional .= "|" . $addauthor->[$i]->{'author'}; -} # for - if ($type eq 'catmain'){ print mkheadr(3,"Catalogue Maintenance"); } # if @@ -56,51 +59,57 @@ if ($dat->{'author'} ne ''){ print mkheadr(3,"$dat->{'title'} ($dat->{'author'}) $temp[4]"); } else { print mkheadr(3,"$dat->{'title'} $temp[4]"); -} -print << "EOF"; - - +} # if +print << "EOF"; +
+ +EOF - - - - - - +print << "EOF"; + + + + - - + + +
EOF +} else { + print << "EOF"; + +EOF +} # else -if ($type ne 'opac'){ - print "background=\"/images/background-mem.gif\""; -} print << "EOF"; ->BIBLIO RECORD +BIBLIO RECORD EOF -if ($type ne 'opac'){ +if ($type ne 'opac') { print "$bib"; } -print << "EOF"; -
+EOF -
+if ($type ne 'opac') { + print << "EOF"; + + + + + EOF +} # if -if ($type ne 'opac'){ - print " - "; -} print << "EOF";
EOF -if ($type ne 'opac'){ -print << "EOF"; +if ($type ne 'opac') { + print << "EOF"; Subtitle: $dat->{'subtitle'}
Author: $dat->{'author'}
Additional Author: $additional
@@ -116,132 +125,168 @@ print << "EOF";

EOF -} -else { -if ($dat->{'subtitle'} ne ''){ - print "Subtitle: $dat->{'subtitle'}
"; -} -if ($dat->{'author'} ne ''){ - print "Author: $dat->{'author'}
"; -} -#Additional Author:
-if ($dat->{'seriestitle'} ne ''){ - print "Seriestitle: $dat->{'seriestitle'}
"; -} -if ($dat->{'subject'} ne ''){ - print "Subject: $dat->{'subject'}
"; -} -if ($dat->{'copyrightdate'} ne ''){ - print "Copyright: $dat->{'copyrightdate'}
"; -} -if ($dat->{'notes'} ne ''){ - print "Notes: $dat->{'notes'}
"; -} -if ($dat->{'unititle'} ne ''){ - print "Unititle: $dat->{'unititle'}
"; -} -#Analytical Author:
-#Analytical Title:
-if ($dat->{'serial'} ne '0'){ - print "Serial: Yes
"; -} -print "Total Number of Items: $count +} else { + if ($dat->{'subtitle'} ne ''){ + print "Subtitle: $dat->{'subtitle'}
"; + } # if + if ($dat->{'author'} ne ''){ + print "Author: $dat->{'author'}
"; + } # if + +# Additional Author:
+ if ($dat->{'seriestitle'} ne '') { + print "Seriestitle: $dat->{'seriestitle'}
"; + } # if + if ($dat->{'subject'} ne '') { + print "Subject: $dat->{'subject'}
"; + } # if + if ($dat->{'copyrightdate'} ne '') { + print "Copyright: $dat->{'copyrightdate'}
"; + } # if + if ($dat->{'notes'} ne '') { + print "Notes: $dat->{'notes'}
"; + } # if + if ($dat->{'unititle'} ne '') { + print "Unititle: $dat->{'unititle'}
"; + } # if + +# Analytical Author:
+# Analytical Title:
+ if ($dat->{'serial'} ne '0') { + print "Serial: Yes
"; + } # if + + print << "EOF"; +Total Number of Items: $count

-"; +EOF + +} # if -} print << "EOF"; - -

- - + EOF -my $i=0; print center(); print mktablehdr; -if ($type eq 'opac'){ - print mktablerow(6,$main,'Item Type','Class','Branch','Date Due','Last Seen'); +if ($type eq 'opac') { + print mktablerow(6,$main,'Item Type','Class','Branch','Date Due','Last Seen'); + if ($dat->{'url'} ne '') { + $dat->{'url'} =~ s/^http:\/\///; + print mktablerow(6, $colour, 'Website', 'WEB', 'Online', 'Available', "{'url'}\">$dat->{'url'}"); + } # if } else { - print mktablerow(6,$main,'Itemtype','Class','Location','Date Due','Last Seen','Barcode',"/images/background-mem.gif"); -} -my $colour=1; -while ($i < $count){ - - my @results = split('\t', $items[$i]); - if ($type ne 'opac'){ - $results[1]=mklink("/cgi-bin/koha/moredetail.pl?item=$results[5]&bib=$bib&bi=$results[8]&type=$type",$results[1]); - } - if ($results[2] eq ''){ - $results[2]='Available'; - } - if ($type eq 'catmain'){ - $results[10]=mklink("/cgi-bin/koha/maint/catmaintain.pl?type=fixitemtype&bi=$results[8]&item=$results[6]","Fix Itemtype"); - } - if ($colour == 1){ + print mktablerow(7,$main,'Itemtype','Class','Location','Date Due','Last Seen','Barcode',"","/images/background-mem.gif"); + if ($dat->{'url'} ne '') { + $dat->{'url'} =~ s/^http:\/\///; + print mktablerow(7, $colour, 'WEB', '', 'Online', 'Available', "{'url'}\">$dat->{'url'}"); + } # if +} # else + +$colour = 'white'; +for (my $i = 0; $i < $count; $i ++) { + + my @results = split('\t', $items[$i]); + + if ($type ne 'opac') { + $results[1] = mklink("/cgi-bin/koha/moredetail.pl?item=$results[5]&bib=$bib&bi=$results[8]&type=$type",$results[1]); + } # if + + if ($results[2] eq '') { + $results[2] = 'Available'; + } # if + + if ($type eq 'catmain'){ + $results[10] = mklink("/cgi-bin/koha/maint/catmaintain.pl?type=fixitemtype&bi=$results[8]&item=$results[6]","Fix Itemtype"); + } # if + if ($type ne 'opac'){ - if ($type eq 'catmain'){ - print mktablerow(8,$secondary,$results[6],$results[4],$results[3],$results[2],$results[7],$results[1],$results[9],$results[10]); - } else { - print mktablerow(7,$secondary,$results[6],$results[4],$results[3],$results[2],$results[7],$results[1],$results[9]); - } + if ($type eq 'catmain'){ + print mktablerow(8,$colour,$results[6],$results[4],$results[3],$results[2],$results[7],$results[1],$results[9],$results[10]); + } else { + print mktablerow(7,$colour,$results[6],$results[4],$results[3],$results[2],$results[7],$results[1],$results[9]); + } # else } else { - $results[6]=ItemType($results[6]); - print mktablerow(6,$secondary,$results[6],$results[4],$results[3],$results[2],$results[7],$results[9]); - } - $colour=0; - } else{ - if ($type ne 'opac'){ - if ($type eq 'catmain'){ - print mktablerow(8,'white',$results[6],$results[4],$results[3],$results[2],$results[7],$results[1],$results[9],$results[10]); - } else { - print mktablerow(7,'white',$results[6],$results[4],$results[3],$results[2],$results[7],$results[1],$results[9]); - } + $results[6] = ItemType($results[6]); + print mktablerow(6,$colour,$results[6],$results[4],$results[3],$results[2],$results[7],$results[9]); + } # else + + if ($colour eq $secondary) { + $colour = 'white'; } else { - $results[6]=ItemType($results[6]); - print mktablerow(6,'white',$results[6],$results[4],$results[3],$results[2],$results[7],$results[9]); - } - $colour=1; - } - $i++; -} + $colour = $secondary; + } # else + +} # for print mktableft(); print "

"; print mktablehdr(); -if ($type ne 'opac'){ -print << "EOF"; - -

HELP
+ +if ($type ne 'opac') { + print << "EOF"; + +

HELP
Update Biblio for all Items: Click on the Modify button [left] to amend the biblio. Any changes you make will update the record for all the items listed above.

Updating the Biblio for only ONE or SOME Items: EOF -if ($type eq 'catmain'){ -print << "EOF"; + if ($type eq 'catmain') { + print << "EOF"; If some of the items listed above need a different biblio, you need to click on the wrong item, then shift the group it belongs to, to the correct biblio. You will need to know the correct biblio number -

- - +

+ EOF -} else { -print << "EOF"; + } else { + print << "EOF"; If some of the items listed above need a different biblio, or are on the wrong biblio, you must use the acquisitions process to fix this. You will need to "re-order" the items, and delete them from this biblio. -

- - +

+ EOF -} -} + } # else +} # if + print mktableft(); print endcenter(); -print "
"; +print << "EOF"; +
+

+EOF + +if ($type ne 'opac') { + print << "EOF"; + + + + + + + +
Abstract
$dat->{'abstract'}
+EOF +} else { + if ($dat->{'abstract'} ne '') { + print << "EOF"; + + + + + + + +
Abstract
$dat->{'abstract'}
+EOF + } # if +} # else + print endmenu($type); print endpage(); diff --git a/modbib.pl b/modbib.pl index 71d97cccf1..f2c22fdca8 100755 --- a/modbib.pl +++ b/modbib.pl @@ -12,74 +12,118 @@ use C4::Output; my $input = new CGI; -my $bibnum=$input->param('bibnum'); -my $data=bibdata($bibnum); -my ($count,$subject)=subject($data->{'biblionumber'}); -my ($count2,$subtitle)=subtitle($data->{'biblionumber'}); -my ($count3,$addauthor)=addauthor($data->{'biblionumber'}); -my $submit=$input->param('submit.x'); -if ($submit eq ''){ - print $input->redirect("/cgi-bin/koha/delbiblio.pl?biblio=$bibnum"); -} +my $submit = $input->param('submit.x'); +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; + +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'); +# my ($analytictitle) = &analytic($biblionumber,'t'); +# my ($analyticauthor) = &analytic($biblionumber,'a'); print startpage(); print startmenu(); -my %inputs; -#have to get all subtitles, subjects and additional authors -my $sub=$subject->[0]->{'subject'}; -for (my $i=1;$i<$count;$i++){ - $sub=$sub."|".$subject->[$i]->{'subject'}; -} -my $additional=$addauthor->[0]->{'author'}; -for (my $i=1;$i<$count3;$i++){ - $additional=$additional."|".$addauthor->[$i]->{'author'}; -} +# 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 -#hash is set up with input name being the key then -#the value is a tab separated list, the first item being the input type -$inputs{'Author'}="text\t$data->{'author'}\t0"; -$data->{'title'}=tidyhtml($data->{'title'}); -$inputs{'Title'}="text\t$data->{'title'}\t1"; -my $dewey = $data->{'dewey'}; -$dewey =~ s/0+$//; -if ($dewey eq "000.") { $dewey = "";}; -if ($dewey < 10){$dewey='00'.$dewey;} -if ($dewey < 100 && $dewey > 10){$dewey='0'.$dewey;} -if ($dewey <= 0){ - $dewey=''; -} -$dewey=~ s/\.$//; -#$inputs{'Class'}="text\t$data->{'classification'}$dewey$data->{'subclass'}\t2"; -#$inputs{'Item Type'}="text\t$data->{'itemtype'}\t3"; -$inputs{'Subject'}="textarea\t$sub\t4"; -#$inputs{'Publisher'}="text\t$data->{'publishercode'}\t5"; -$inputs{'Copyright date'}="text\t$data->{'copyrightdate'}\t6"; -#$inputs{'ISBN'}="text\t$data->{'isbn'}\t7"; -#$inputs{'Publication Year'}="text\t$data->{'publicationyear'}\t8"; -#$inputs{'Pages'}="text\t$data->{'pages'}\t9"; -#$inputs{'Illustrations'}="text\t$data->{'illustration'}\t10"; -$inputs{'Series Title'}="text\t$data->{'seriestitle'}\t11"; -$inputs{'Additional Author'}="text\t$additional\t12"; -$inputs{'Subtitle'}="text\t$subtitle->[0]->{'subtitle'}\t13"; -$inputs{'Unititle'}="text\t$data->{'unititle'}\t14"; -$inputs{'Notes'}="textarea\t$data->{'notes'}\t15"; -$inputs{'Serial'}="text\t$data->{'serial'}\t16"; -#$inputs{'Volume'}="text\t$data->{'volumeddesc'}\t17"; -$inputs{'Analytic author'}="text\t\t18"; -$inputs{'Analytic title'}="text\t\t19"; +$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/\.$//; -$inputs{'bibnum'}="hidden\t$data->{'biblionumber'}\t20"; -$inputs{'bibitemnum'}="hidden\t$data->{'biblioitemnumber'}\t21"; +$data->{'title'} = &tidyhtml($data->{'title'}); +print << "EOF"; +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Author
Title
Abstract
Subject
Copyright Date
Series Title
Additional Author
Subtitle
Unititle
Notes
Serial
Analytic Author
Analytic Title
+
+ +
+EOF -print mkform3('updatebiblio.pl',%inputs); -#print mktablehdr(); -#print mktableft(); print endmenu(); print endpage(); diff --git a/updatebiblio.pl b/updatebiblio.pl index 51abf810d1..8ba684e13c 100755 --- a/updatebiblio.pl +++ b/updatebiblio.pl @@ -6,70 +6,70 @@ use strict; use C4::Acquisitions; use C4::Output; -my $input= new CGI; -#print $input->header; -#print $input->dump; +my $input = new CGI; +my $bibnum = checkinp($input->param('biblionumber')); +my $biblio = { + biblionumber => $bibnum, + title => $input->param('title')?$input->param('title'):"", + author => $input->param('author')?$input->param('author'):"", + abstract => $input->param('abstract')?$input->param('abstract'):"", + copyright => $input->param('copyrightdate')?$input->param('copyrightdate'):"", + seriestitle => $input->param('seriestitle')?$input->param('seriestitle'):"", + serial => $input->param('serial')?$input->param('serial'):"", + unititle => $input->param('unititle')?$input->param('unititle'):"", + notes => $input->param('notes')?$input->param('notes'):"", +}; # my $biblio +my $subtitle = checkinp($input->param('subtitle')); +my $subject = checkinp($input->param('subject')); +my $addauthor = checkinp($input->param('additionalauthor')); +my $force = $input->param('Force'); +my %data; +my @sub; +my @subs; +my @names; +my $count; +my $error; +&modbiblio($biblio); +&modsubtitle($bibnum, $subtitle); +&modaddauthor($bibnum, $addauthor); -my $title=checkinp($input->param('Title')); -my $author=checkinp($input->param('Author')); -my $bibnum=checkinp($input->param('bibnum')); -my $copyright=checkinp($input->param('Copyright')); -my $seriestitle=checkinp($input->param('Series')); -my $serial=checkinp($input->param('Serial')); -my $unititle=checkinp($input->param('Unititle')); -my $notes=checkinp($input->param('Notes')); +$subject = uc($subject); +@sub = split(/\|/, $subject); +$count = @sub; -modbiblio($bibnum,$title,$author,$copyright,$seriestitle,$serial,$unititle,$notes); +for (my $i = 0; $i < $count; $i++) { + $sub[$i] =~ s/ +$//; +} # for -my $subtitle=checkinp($input->param('Subtitle')); -modsubtitle($bibnum,$subtitle); - -my $subject=checkinp($input->param('Subject')); -$subject=uc $subject; -my @sub=split(/\|/,$subject); -#print @sub; -# - -my $addauthor=checkinp($input->param('Additional')); -modaddauthor($bibnum,$addauthor); -my $count1=@sub; - -for (my $i=0; $i<$count1; $i++){ - $sub[$i]=~ s/ +$//; -} - -#print $input->header; -my $force=$input->param('Force'); -my $error=modsubject($bibnum,$force,@sub); +$error = &modsubject($bibnum,$force,@sub); if ($error ne ''){ - print $input->header; - print startpage(); - print startmenu(); - print $error; - my @subs=split('\n',$error); - print "

Click submit to force the subject"; - my @names=$input->param; - my %data; - my $count=@names; - for (my $i=0;$i<$count;$i++){ - if ($names[$i] ne 'Force'){ - my $value=$input->param("$names[$i]"); - $data{$names[$i]}="hidden\t$value\t$i"; - } - } - $data{"Force"}="hidden\t$subs[0]\t$count"; - print mkform3('updatebiblio.pl',%data); - print endmenu(); - print endpage(); + print $input->header; + print startpage(); + print startmenu(); + print $error; + @subs = split('\n',$error); + print "

Click submit to force the subject"; + @names = $input->param; + $count = @names; + for (my $i = 0; $i < $count; $i++) { + if ($names[$i] ne 'Force') { + my $value = $input->param("$names[$i]"); + $data{$names[$i]} = "hidden\t$value\t$i"; + } # if + } # for + $data{"Force"} = "hidden\t$subs[0]\t$count"; + print mkform3('updatebiblio.pl', %data); + print endmenu(); + print endpage(); } else { - print $input->redirect("detail.pl?type=intra&bib=$bibnum"); -} + print $input->redirect("detail.pl?type=intra&bib=$bibnum"); +} # else sub checkinp{ my ($inp)=@_; - $inp=~ s/\'/\\\'/g; - $inp=~ s/\"/\\\"/g; + $inp =~ s/\'/\\\'/g; + $inp =~ s/\"/\\\"/g; return($inp); }