3 #script to do some serious catalogue maintainance
5 # by chris@katipo.co.nz
8 # Copyright 2000-2002 Katipo Communications
10 # This file is part of Koha.
12 # Koha is free software; you can redistribute it and/or modify it under the
13 # terms of the GNU General Public License as published by the Free Software
14 # Foundation; either version 2 of the License, or (at your option) any later
17 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
18 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
19 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
21 # You should have received a copy of the GNU General Public License along with
22 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
23 # Suite 330, Boston, MA 02111-1307 USA
33 my $type=$input->param('type');
34 my $bi=$input->param('bi');
35 my $bib=$input->param('bib');
36 my $type=$input->param('type'); # FIXME - Redundant
38 print startmenu('catalog');
40 if ($type eq 'change'){
41 my $biblionumber=$input->param('biblionumber');
42 my $dbh = C4::Context->dbh;
43 my $sth=$dbh->prepare("Select * from biblio where biblionumber=?");
44 $sth->execute($biblionumber);
45 my $data=$sth->fetchrow_hashref;
46 print "Shifting group $bi to biblio $biblionumber<br>
47 Title:$data->{'title'}<br>
48 Author:$data->{'author'}<p>
52 print "<a href=/cgi-bin/koha/maint/shiftbib.pl?type=update&bi=$bi&bib=$biblionumber>Yes</a>";
53 } elsif ($type eq 'update'){
57 print "Shifting Group $bi from biblio $bib to <p>";
58 print "<form action=/cgi-bin/koha/maint/shiftbib.pl method=post>";
59 print "<input name=bi type=hidden value=$bi>";
60 print "<input type=hidden name=type value=change>";
61 print "<input type=text name=biblionumber><br>";
62 print "<input type=submit value=change></form>";
64 print endmenu('catalog');