From bfe64279ef452c141c2acf8de6bec594ad0bc014 Mon Sep 17 00:00:00 2001 From: tipaul Date: Tue, 17 Jan 2006 16:32:41 +0000 Subject: [PATCH] Removing useless scripts : the MARC=OFF scripts are in acqui.simple for instance. Not sure of this removal, reintroduce them if needed... --- delbiblio.pl | 49 ------------- deletebiblioitem.pl | 39 ---------- delitem.pl | 42 ----------- modbib.pl | 101 -------------------------- modbibitem.pl | 154 ---------------------------------------- moditem.pl | 135 ----------------------------------- updatebibitem.pl | 201 ---------------------------------------------------- updatebiblio.pl | 106 --------------------------- updateitem.pl | 159 ----------------------------------------- 9 files changed, 986 deletions(-) delete mode 100755 delbiblio.pl delete mode 100755 deletebiblioitem.pl delete mode 100755 delitem.pl delete mode 100755 modbib.pl delete mode 100755 modbibitem.pl delete mode 100755 moditem.pl delete mode 100755 updatebibitem.pl delete mode 100755 updatebiblio.pl delete mode 100755 updateitem.pl diff --git a/delbiblio.pl b/delbiblio.pl deleted file mode 100755 index d696467e88..0000000000 --- a/delbiblio.pl +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/perl - -#script to delete biblios -#written 2/5/00 -#by chris@katipo.co.nz - - -# Copyright 2000-2002 Katipo Communications -# -# This file is part of Koha. -# -# Koha is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# -# Koha is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, -# Suite 330, Boston, MA 02111-1307 USA - -use strict; - -use C4::Search; -use CGI; -use C4::Output; -use C4::Biblio; - -my $input = new CGI; -#print $input->header; - - -my $biblio=$input->param('biblio'); -# check no items attached -my $count=C4::Biblio::itemcount($biblio); - - -#print $count; -if ($count > 0){ - print $input->header; - print "This biblio has $count items attached, please delete them before deleting this biblio

- "; -} else { - delbiblio($biblio); - print $input->redirect("/cgi-bin/koha/loadmodules.pl?module=search"); -} diff --git a/deletebiblioitem.pl b/deletebiblioitem.pl deleted file mode 100755 index 53cbd06b3f..0000000000 --- a/deletebiblioitem.pl +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/perl - - -# Copyright 2000-2002 Katipo Communications -# -# This file is part of Koha. -# -# Koha is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# -# Koha is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, -# Suite 330, Boston, MA 02111-1307 USA - -use strict; -use C4::Biblio; # For &deletebiblioitem -use CGI; - -my $input = new CGI; -my $biblionumber = $input->param('biblionumber'); -my $biblioitemnumber = $input->param('biblioitemnumber'); - -if (! $biblionumber) { - print $input->redirect("/catalogue/"); - -} elsif (! $biblioitemnumber) { - print $input->param("detail.pl?type=intra&bib=$biblionumber"); - -} else { - &deletebiblioitem($biblioitemnumber); - - print $input->redirect("detail.pl?type=intra&bib=$biblionumber"); -} # else diff --git a/delitem.pl b/delitem.pl deleted file mode 100755 index 33bfcf26a8..0000000000 --- a/delitem.pl +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/perl - -#script to delete items -#written 2/5/00 -#by chris@katipo.co.nz - - -# Copyright 2000-2002 Katipo Communications -# -# This file is part of Koha. -# -# Koha is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# -# Koha is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, -# Suite 330, Boston, MA 02111-1307 USA - -use strict; - -use C4::Search; -use CGI; -use C4::Output; -use C4::Biblio; -use C4::Auth; - -my $input = new CGI; -my $flagsrequired; -$flagsrequired->{editcatalogue}=1; -my ($loggedinuser, $cookie, $sessionID) = checkauth($input, 0, $flagsrequired); - -#print $input->header; -my $item=$input->param('itemnum'); -delitem($item); -my $bibitemnum=$input->param('bibitemnum'); -print $input->redirect("/cgi-bin/koha/moredetail.pl?bi=$bibitemnum"); diff --git a/modbib.pl b/modbib.pl deleted file mode 100755 index 4e02339c0f..0000000000 --- a/modbib.pl +++ /dev/null @@ -1,101 +0,0 @@ -#!/usr/bin/perl - -# $Id$ - -#script to modify/delete biblios - -# Copyright 2000-2002 Katipo Communications -# -# This file is part of Koha. -# -# Koha is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# -# Koha is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, -# Suite 330, Boston, MA 02111-1307 USA - -use strict; - -use C4::Biblio; -use CGI; -use C4::Output; -use HTML::Template; -use C4::Auth; -use C4::Context; -use C4::Interface::CGI::Output; - -my $input = new CGI; - -my $bibnum=$input->param('bibnum'); -my $data=&bibdata($bibnum); -my ($subjectcount, $subject) = &getsubject($bibnum); -my ($subtitlecount, $subtitle) = &getsubtitle($bibnum); -my ($addauthorcount, $addauthor) = &getaddauthor($bibnum); -my $sub = $subject->[0]->{'subject'}; -my $additional = $addauthor->[0]->{'author'}; -my $dewey; -my $submit=$input->param('submit.x'); -if ($submit eq '') { - print $input->redirect("/cgi-bin/koha/delbiblio.pl?biblio=$bibnum"); -} # if - -my ($template, $loggedinuser, $cookie) - = get_template_and_user({template_name => "modbib.tmpl", - query => $input, - type => "intranet", - authnotrequired => 0, - flagsrequired => {acquisition => 1}, - debug => 1, - }); - -# have to get all subtitles, subjects and additional authors -$sub = join("|", map { $_->{'subject'} } @{$subject}); - -$additional = join("|", map { $_->{'author'} } @{$addauthor}); - -$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'}); - -$template->param ( biblionumber => $bibnum, - biblioitemnumber => $data->{'biblioitemnumber'}, - author => $data->{'author'}, - title => $data->{'title'}, - abstract => $data->{'abstract'}, - subject => $sub, - copyrightdate => $data->{'copyrightdate'}, - seriestitle => $data->{'seriestitle'}, - additionalauthor => $additional, - subtitle => $data->{'subtitle'}, - unititle => $data->{'unititle'}, - notes => $data->{'bnotes'}, - serial => $data->{'serial'}); - -output_html_with_http_headers $input, $cookie, $template->output; - -sub tidyhtml { - my ($inp)=@_; - $inp=~ s/\"/\"\;/g; - return($inp); -} diff --git a/modbibitem.pl b/modbibitem.pl deleted file mode 100755 index 07b37568d7..0000000000 --- a/modbibitem.pl +++ /dev/null @@ -1,154 +0,0 @@ -#!/usr/bin/perl - -# $Id$ - -#script to modify/delete groups - -#written 8/11/99 -# modified 11/11/99 by chris@katipo.co.nz -# modified 18/4/00 by chris@katipo.co.nz - -# Copyright 2000-2002 Katipo Communications -# -# This file is part of Koha. -# -# Koha is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# -# Koha is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, -# Suite 330, Boston, MA 02111-1307 USA - -use strict; -require Exporter; - -use C4::Output; -use C4::Koha; -use CGI; -use HTML::Template; -use C4::Date; -use C4::Biblio; -use C4::Acquisition; -use C4::Auth; -use C4::Interface::CGI::Output; - -my $input = new CGI; -my $bibitemnum=$input->param('bibitem'); -my $data=bibitemdata($bibitemnum); -my $biblio=$input->param('biblio'); -my $submit=$input->param('submit'); -if ($submit eq ''){ - print $input->redirect("deletebiblioitem.pl?biblioitemnumber=$bibitemnum&biblionumber=$biblio"); -} - -my ($template, $loggedinuser, $cookie) = get_template_and_user({ - template_name => 'modbibitem.tmpl', - query => $input, - type => "intranet", - authnotrequired => 0, - flagsrequired => {catalogue => 1}, - }); - - -my %inputs; - -#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"; -#$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{'URL'}="text\t$data->{'url'}\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"; - -$inputs{'bibnum'}="hidden\t$data->{'biblionumber'}\t20"; -$inputs{'bibitemnum'}="hidden\t$data->{'biblioitemnumber'}\t21"; - -$template->param( biblionumber => $data->{'biblionumber'}, - title => $data->{'title'}, - author => $data->{'author'}, - description => $data->{'description'}, - loggedinuser => $loggedinuser, - ); - -my ($count,@bibitems)=bibitems($data->{'biblionumber'}); - -my @bibitemloop; - -for (my $i=0;$i<$count;$i++){ - my %line; - $line{biblioitemnumber} = $bibitems[$i]->{'biblioitemnumber'}; - $line{description} = $bibitems[$i]->{'description'}; - $line{isbn} = $bibitems[$i]->{'isbn'}; - push(@bibitemloop,\%line); -} -$template->param(bibitemloop =>\@bibitemloop); - - -#my $notesinput=$input->textfield(-name=>'Notes', -default=>$data->{'bnotes'}, -size=>20); -$template->param(bnotes=>$data->{'bnotes'}); - -$template->param(itemtype => $data->{'itemtype'}); - -$template->param(url => $data->{'url'}); -$template->param(classification => $data->{'classification'}, - dewey => $dewey, - subclass => $data->{'subclass'}, - publishercode => $data->{'publishercode'}, - place => $data->{'place'}, - isbn => $data->{'isbn'}, - publicationyear => $data->{'publicationyear'}, - pages => $data->{'pages'}, - illustration => $data->{'illustration'}, - volumeddesc => $data->{'volumeddesc'}, - size => $data->{'size'}, - biblionumber => $data->{'biblionumber'}, - biblioitemnumber => $data->{'biblioitemnumber'}); - -my (@items)=itemissues($data->{'biblioitemnumber'}); -#print @items; -my @itemloop; -my $count=@items; -for (my $i=0;$i<$count;$i++){ - my %line; - $items[$i]->{'datelastseen'} = format_date($items[$i]->{'datelastseen'}); - $line{barcode}=$items[$i]->{'barcode'}; - $line{itemnumber}=$items[$i]->{'itemnumber'}; - $line{biblionumber}=$data->{'biblionumber'}; - $line{biblioitemnumber}=$data->{'biblioitemnumber'}; - $line{holdingbranch}=$items[$i]->{'holdingbranch'}; - $line{datelastseen}=$items[$i]->{'datelastseen'}; - push(@itemloop,\%line); -} -$template->param(itemloop => \@itemloop); -print "Content-Type: text/html\n\n", $template->output; - diff --git a/moditem.pl b/moditem.pl deleted file mode 100755 index cfeffd7511..0000000000 --- a/moditem.pl +++ /dev/null @@ -1,135 +0,0 @@ -#!/usr/bin/perl - -# $Id$ - - -#script to modify/delete biblios -#written 8/11/99 -# modified 11/11/99 by chris@katipo.co.nz -# modified 12/16/02 by hdl@ifrance.com : Templating - -# Copyright 2000-2002 Katipo Communications -# -# This file is part of Koha. -# -# Koha is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# -# Koha is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, -# Suite 330, Boston, MA 02111-1307 USA - -use strict; -require Exporter; - -use C4::Search; -use CGI; -use C4::Output; -#use C4::Acquisitions; -use C4::Biblio; -use HTML::Template; -use C4::Koha; -use C4::Acquisition; -use C4::Auth; -use C4::Interface::CGI::Output; - -my $input = new CGI; -my $submit=$input->param('delete.x'); -my $itemnum=$input->param('item'); -my $bibitemnum=$input->param('bibitem'); -if ($submit ne ''){ - print $input->redirect("/cgi-bin/koha/delitem.pl?itemnum=$itemnum&bibitemnum=$bibitemnum"); -} - -my $data=bibitemdata($bibitemnum); - -my $item=getbibliofromitemnumber('blah','',$itemnum); -#my ($analytictitle)=analytic($biblionumber,'t'); -#my ($analyticauthor)=analytic($biblionumber,'a'); - - -my ($template, $loggedinuser, $cookie) = get_template_and_user({ - template_name => 'moditem.tmpl', - query => $input, - type => "intranet", - authnotrequired => 0, - flagsrequired => {catalogue => 1}, - }); - -my %inputs; - - - -#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"; -#$inputs{'Title'}="text\t$data->{'title'}\t1"; -# FIXME - The Dewey code is a string, not a number. And "000" is a -# perfectly acceptable value. -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/\.$//; - -# 12/16/2002 hdl@ifrance.com : all these inputs seem unused !!! - -$inputs{'Barcode'}="text\t$item->{'barcode'}\t0"; -$inputs{'Class'}="hidden\t$data->{'classification'}$dewey$data->{'subclass'}\t2"; -#$inputs{'Item Type'}="text\t$data->{'itemtype'}\t3"; -#$inputs{'Subject'}="textarea\t$sub\t4"; -$inputs{'Publisher'}="hidden\t$data->{'publishercode'}\t5"; -#$inputs{'Copyright date'}="text\t$data->{'copyrightdate'}\t6"; -$inputs{'ISBN'}="hidden\t$data->{'isbn'}\t7"; -$inputs{'Publication Year'}="hidden\t$data->{'publicationyear'}\t8"; -$inputs{'Pages'}="hidden\t$data->{'pages'}\t9"; -$inputs{'Illustrations'}="hidden\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{'ItemNotes'}="textarea\t$item->{'itemnotes'}\t15"; -#$inputs{'Serial'}="text\t$data->{'serial'}\t16"; -$inputs{'Volume'}="hidden\t$data->{'volumeddesc'}\t17"; -$inputs{'Home Branch'}="text\t$item->{'homebranch'}\t18"; -$inputs{'Lost'}="radio\t$item->{'itemlost'}\t19"; -#$inputs{'Analytic author'}="text\t\t18"; -#$inputs{'Analytic title'}="text\t\t19"; -$inputs{'bibnum'}="hidden\t$data->{'biblionumber'}\t20"; -$inputs{'bibitemnum'}="hidden\t$data->{'biblioitemnumber'}\t21"; -$inputs{'itemnumber'}="hidden\t$itemnum\t22"; - -#12/16/2002 hdl@ifrance.com : end of comment - - - -#12/16/2002 hdl@ifrance.com : templating -$template->param( title => $data->{'title'}, - author => $data->{'author'}, - barcode => $item->{'barcode'}, - classification => "$data->{'classification'}$dewey$data->{'subclass'}", - publisher => $data->{'publisher'}, - publicationyear => $data->{'publicationyear'}, - pages => $data->{'pages'}, - illustration => $data->{'illustration'}, - itemnotes => $item->{'itemnotes'}, - volumedesc => $data->{'volumedesc'}, - homebranch => $data->{'homebranch'}, - itemlost => ($item->{'itemlost'} ==1), - itemwithdrawn => ($item->{'wthdrawn'} ==1), - biblionumber => $data->{'biblionumber'}, - biblioitemnumber => $data->{'biblioitemnumber'}, - itemnumber => $itemnum); - -print "Content-Type: text/html\n\n", $template->output; -#12/16/2002 hdl@ifrance.com : templating diff --git a/updatebibitem.pl b/updatebibitem.pl deleted file mode 100755 index 210d47f2b8..0000000000 --- a/updatebibitem.pl +++ /dev/null @@ -1,201 +0,0 @@ -#!/usr/bin/perl - -# $Id$ - -# Copyright 2000-2002 Katipo Communications -# -# This file is part of Koha. -# -# Koha is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# -# Koha is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, -# Suite 330, Boston, MA 02111-1307 USA - -use CGI; -use strict; -use C4::Biblio; -use C4::Output; -use C4::Search; - -my $input= new CGI; -#print $input->header; -#print $input->Dump; - -my $bibitemnum = checkinp($input->param('bibitemnum')); -my $bibnum = checkinp($input->param('bibnum')); -my $itemtype = checkinp($input->param('Item')); -my $url = checkinp($input->param('url')); -my $isbn = checkinp($input->param('ISBN')); -my $publishercode = checkinp($input->param('Publisher')); -my $publicationdate = checkinp($input->param('Publication')); -my $class = checkinp($input->param('Class')); -my $illus = checkinp($input->param('Illustrations')); -my $pages = checkinp($input->param('Pages')); -my $volumeddesc = checkinp($input->param('Volume')); -my $notes = checkinp($input->param('Notes')); -my $size = checkinp($input->param('Size')); -my $place = checkinp($input->param('Place')); -my $classification; -my $dewey; -my $subclass; - -if ($itemtype ne 'NF') { - $classification=$class; -} # if - -if ($class =~/[0-9]+/) { -# print $class; - $dewey= $class; - $dewey=~ s/[a-z]+//gi; - my @temp; - if ($class =~ /\./) { - @temp=split(/[0-9]+\.[0-9]+/,$class); - } else { - @temp=split(/[0-9]+/,$class); - } # else - $classification=$temp[0]; - $subclass=$temp[1]; -# print $classification,$dewey,$subclass; -} else { - $dewey=''; - $subclass=''; -} # else - -my (@items) = &itemissues($bibitemnum); -#print @items; -my $count = @items; -#print $count; -my @barcodes; - -my $existing=$input->param('existing'); -if ($existing eq 'YES'){ -# print "yes"; - my $group=$input->param('existinggroup'); - #go thru items assing selected ones to group - for (my $i=0;$i<$count;$i++){ - my $temp="check_group_".$items[$i]->{'barcode'}; - my $barcode=$input->param($temp); - if ($barcode ne ''){ - moditem({ biblionumber => $bibnum, - notforloan => $items[$i]->{'notforloan'}, - itemnumber => $items[$i]->{'itemnumber'}, - group => $group - }); -# print "modify $items[$i]->{'itemnumber'} $group"; - } - } - $bibitemnum=$group; -} else { - my $flag; - my $flag2; - for (my $i=0;$i<$count;$i++){ - my $temp="check_group_".$items[$i]->{'barcode'}; - $barcodes[$i]=$input->param($temp); - if ($barcodes[$i] eq ''){ - $flag="notall"; - } else { - $flag2="leastone"; - } - } - my $loan; - if ($flag eq 'notall' && $flag2 eq 'leastone'){ - $bibitemnum = &newbiblioitem({ - biblionumber => $bibnum, - itemtype => $itemtype?$itemtype:"", - url => $url?$url:"", - isbn => $isbn?$isbn:"", - publishercode => $publishercode?$publishercode:"", - publicationyear => $publicationdate?$publicationdate:"", - volumeddesc => $volumeddesc?$volumeddesc:"", - classification => $classification?$classification:"", - dewey => $dewey?$dewey:"", - subclass => $subclass?$subclass:"", - illus => $illus?$illus:"", - pages => $pages?$pages:"", - notes => $notes?$notes:"", - size => $size?$size:"", - place => $place?$place:"" }); - if ($itemtype =~ /REF/){ - $loan=1; - } else { - $loan=0; - } - for (my $i=0;$i<$count;$i++){ - if ($barcodes[$i] ne ''){ - moditem({ biblionumber => $bibnum, - loan => $loan, - itemnumber => $items[$i]->{'itemnumber'}, - bibitemnum => $bibitemnum - }); - } - } - - } elsif ($flag2 eq 'leastone') { - &modbibitem({ - biblioitemnumber => $bibitemnum, - biblionumber => $bibnum, - itemtype => $itemtype?$itemtype:"", - url => $url?$url:"", - isbn => $isbn?$isbn:"", - publishercode => $publishercode?$publishercode:"", - publicationyear => $publicationdate?$publicationdate:"", - classification => $classification?$classification:"", - dewey => $dewey?$dewey:"", - subclass => $subclass?$subclass:"", - illus => $illus?$illus:"", - pages => $pages?$pages:"", - volumeddesc => $volumeddesc?$volumeddesc:"", - notes => $notes?$notes:"", - size => $size?$size:"", - place => $place?$place:"" }); - if ($itemtype =~ /REF/){ - $loan=1; - } else { - $loan=0; - } - for (my $i=0;$i<$count;$i++){ - if ($barcodes[$i] ne ''){ - moditem( {biblionumber => $bibnum, - loan => $loan, - itemnumber => $items[$i]->{'itemnumber'}, - bibitemnum => $bibitemnum - }); - } - } - - } else { - &modbibitem({ - biblioitemnumber => $bibitemnum, - itemtype => $itemtype?$itemtype:"", - url => $url?$url:"", - isbn => $isbn?$isbn:"", - publishercode => $publishercode?$publishercode:"", - publicationyear => $publicationdate?$publicationdate:"", - classification => $classification?$classification:"", - dewey => $dewey?$dewey:"", - subclass => $subclass?$subclass:"", - illus => $illus?$illus:"", - pages => $pages?$pages:"", - volumeddesc => $volumeddesc?$volumeddesc:"", - notes => $notes?$notes:"", - size => $size?$size:"", - place => $place?$place:"" }); - } # else -} -print $input->redirect("moredetail.pl?type=intra&bib=$bibnum&bi=$bibitemnum"); - - -sub checkinp{ - my ($inp)=@_; - $inp=~ s/\'/\\\'/g; - $inp=~ s/\"/\\\"/g; - return($inp); -} diff --git a/updatebiblio.pl b/updatebiblio.pl deleted file mode 100755 index c8a607d0bd..0000000000 --- a/updatebiblio.pl +++ /dev/null @@ -1,106 +0,0 @@ -#!/usr/bin/perl - - -# Copyright 2000-2002 Katipo Communications -# -# This file is part of Koha. -# -# Koha is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# -# Koha is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, -# Suite 330, Boston, MA 02111-1307 USA - -use strict; -require Exporter; -use C4::Context; -use C4::Output; # contains gettemplate -use C4::Search; -use C4::Auth; -use C4::Interface::CGI::Output; -use CGI; -use C4::Biblio; -use C4::Output; -use HTML::Template; - -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'):"", - copyrightdate => $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; - -&modsubtitle($bibnum, $subtitle); -&modaddauthor($bibnum, $addauthor); - -$subject = uc($subject); -@sub = split(/\||\n/, $subject); -$count = @sub; - -for (my $i = 0; $i < $count; $i++) { - $sub[$i] =~ s/ +$//; -} # for - -$error = &modsubject($bibnum,$force,@sub); - -&modbiblio($biblio); - -if ($error ne ''){ - my ($template, $loggedinuser, $cookie) = get_template_and_user({ - template_name => "updatebiblio.tmpl", - query => $input, - type => "intranet", - flagsrequired => {catalogue => 1}, - }); - - - my @subs=split('\n',$error); - my @names=$input->param; - my $count=@names; - my @dataloop; - for (my $i=0;$i<$count;$i++) { - if ($names[$i] ne 'Force') { - my %line; - $line{'value'}=$input->param("$names[$i]"); - $line{'name'}=$names[$i]; - push(@dataloop, \%line); - } # if - } # for - $template->param(substring =>$subs[0], - error =>$error, - dataloop => \@dataloop); - print "Content-Type: text/html\n\n", $template->output; -} else { - print $input->redirect("detail.pl?type=intra&bib=$bibnum"); -} # else - -sub checkinp{ - my ($inp)=@_; - $inp=~ s/\'/\\\'/g; - $inp=~ s/\"/\\\"/g; - return($inp); -} diff --git a/updateitem.pl b/updateitem.pl deleted file mode 100755 index 8115f1cd43..0000000000 --- a/updateitem.pl +++ /dev/null @@ -1,159 +0,0 @@ -#!/usr/bin/perl - -# $Id$ - -# Copyright 2000-2002 Katipo Communications -# -# This file is part of Koha. -# -# Koha is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# -# Koha is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, -# Suite 330, Boston, MA 02111-1307 USA - -use strict; -use CGI; -use C4::Context; -use C4::Biblio; -use C4::Output; -use C4::Circulation::Circ2; -use C4::Accounts2; - -my $env; -my $input= new CGI; - -my $bibnum=checkinp($input->param('bibnum')); -my $itemnum=checkinp($input->param('itemnumber')); -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('ItemNotes')); - -#need to do barcode check -my $barcode=$input->param('Barcode'); - -my $bibitemnum=checkinp($input->param('bibitemnum')); -my $itemtype=checkinp($input->param('Item')); -my $isbn=checkinp($input->param('ISBN')); -my $publishercode=checkinp($input->param('Publisher')); -my $publicationdate=checkinp($input->param('Publication')); -my $class=checkinp($input->param('Class')); -my $homebranch=checkinp($input->param('Home')); -my $lost=$input->param('Lost'); -my $wthdrawn=$input->param('withdrawn'); -my $classification; -my $dewey; -my $subclass; -my $override=$input->param('override'); -if ($itemtype ne 'NF'){ - $classification=$class; -} -if ($class =~/[0-9]+/){ - $dewey= $class; - $dewey=~ s/[a-z]+//gi; - my @temp; - if ($class =~ /\./){ - @temp=split(/[0-9]+\.[0-9]+/,$class); - } else { - @temp=split(/[0-9]+/,$class); - } - $classification=$temp[0]; - $subclass=$temp[1]; -}else{ - $dewey=''; -} -my $illus=checkinp($input->param('Illustrations')); -my $pages=checkinp($input->param('Pages')); -my $volumeddesc=checkinp($input->param('Volume')); - -if ($wthdrawn == 0 && $override ne 'yes'){ - moditem( { biblionumber => $bibnum, - loan =>'loan', - itemnum => $itemnum, - bibitemnum => $bibitemnum, - barcode => $barcode, - notes => $notes, - homebranch => $homebranch, - lost => $lost, - wthdranw => $wthdrawn - }); - if ($lost ==1){ - my $dbh = C4::Context->dbh; - my $sth=$dbh->prepare("Select * from issues where (itemnumber=?) and (returndate is null)"); - $sth->execute($itemnum); - my $data=$sth->fetchrow_hashref; - if ($data->{'borrowernumber'} ne '') { - #item on issue add replacement cost to borrowers record - my $accountno=getnextacctno($env,$data->{'borrowernumber'},$dbh); - my $item=getiteminformation($env, $itemnum); - my $sth2=$dbh->prepare("Insert into accountlines - (borrowernumber,accountno,date,amount,description,accounttype,amountoutstanding,itemnumber) - values - (?,?,now(),?,?,'L',?,?)"); - $sth2->execute($data->{'borrowernumber'},$accountno,$item->{'replacementprice'}, - "Lost Item $item->{'title'} $item->{'barcode'}", - $item->{'replacementprice'},$itemnum); - $sth2->finish; - } - $sth->finish; - } - print $input->redirect("moredetail.pl?type=intra&bib=$bibnum&bi=$bibitemnum"); -} else { - -# print "marking cancelled"; - #need to check if it is on reserve or issued - my $dbh = C4::Context->dbh; - my $flag=0; - my ($resbor,$resrec)=C4::Reserves2::CheckReserves($env,$dbh,$itemnum); - # print $resbor; - if ($resbor){ - print $input->header; - print "The biblio or biblioitem this item belongs to has a reserve on it"; - $flag=1; - } - my $sth=$dbh->prepare("Select * from issues where (itemnumber=?) and (returndate is null)"); - $sth->execute($itemnum); - my $data=$sth->fetchrow_hashref; - if ($data->{'borrowernumber'} ne '') { - print $input->header; - print "

Item is on issue"; - $flag=1; - } - $sth->finish; - if ($flag == 1){ - my $url=$input->self_url; - $url.="&override=yes"; - print "

Cancel Anyway   or Back"; - }else { - moditem({ biblionumber => $bibnum, - loan => 'loan', - itemnum => $itemnum, - bibitemnum => $bibitemnum, - barcode => $barcode, - notes => $notes, - homebranch => $homebranch, - lost => $lost, - wthdrawn => $wthdrawn - }); - print $input->redirect("moredetail.pl?type=intra&bib=$bibnum&bi=$bibitemnum"); - } -} -#print $bibitemnum; - -sub checkinp{ - my ($inp)=@_; - $inp=~ s/\'/\\\'/g; - $inp=~ s/\"/\\\"/g; - return($inp); -} - -#sub checkissue{ -- 2.11.0