From d467a100b27b1d9022b04820481e372cdd59bd7c Mon Sep 17 00:00:00 2001 From: rangi Date: Thu, 15 Mar 2001 10:11:33 +0000 Subject: [PATCH] Script to shift a group to another biblio, called as part of catalogue maintenance --- maint/shiftbib.pl | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100755 maint/shiftbib.pl diff --git a/maint/shiftbib.pl b/maint/shiftbib.pl new file mode 100755 index 0000000000..5b41af5dc9 --- /dev/null +++ b/maint/shiftbib.pl @@ -0,0 +1,48 @@ +#!/usr/bin/perl + +#script to do some serious catalogue maintainance +#written 22/11/00 +# by chris@katipo.co.nz + +use strict; +use CGI; +use C4::Output; +use C4::Database; +use C4::Maintainance; + +my $input = new CGI; +print $input->header; +my $type=$input->param('type'); +my $bi=$input->param('bi'); +my $bib=$input->param('bib'); +my $type=$input->param('type'); +print startpage(); +print startmenu('catalog'); + +if ($type eq 'change'){ + my $biblionumber=$input->param('biblionumber'); + my $dbh=C4Connect; + my $query="Select * from biblio where biblionumber=$biblionumber"; + my $sth=$dbh->prepare($query); + $sth->execute; + my $data=$sth->fetchrow_hashref; + print "Shifting group $bi to biblio $biblionumber
+ Title:$data->{'title'}
+ Author:$data->{'author'}

+ Are you sure? +

+ "; + print "Yes"; +} elsif ($type eq 'update'){ + shiftgroup($bib,$bi); + print "Shifted"; +} else { + print "Shifting Group $bi from biblio $bib to

"; + print "

"; + print ""; + print ""; + print "
"; + print "
"; +} +print endmenu('catalog'); +print endpage(); -- 2.11.0