3 #script to do some serious catalogue maintainance
5 # by chris@katipo.co.nz
15 my $type=$input->param('type');
16 my $bi=$input->param('bi');
17 my $bib=$input->param('bib');
18 my $type=$input->param('type');
20 print startmenu('catalog');
22 if ($type eq 'change'){
23 my $biblionumber=$input->param('biblionumber');
25 my $query="Select * from biblio where biblionumber=$biblionumber";
26 my $sth=$dbh->prepare($query);
28 my $data=$sth->fetchrow_hashref;
29 print "Shifting group $bi to biblio $biblionumber<br>
30 Title:$data->{'title'}<br>
31 Author:$data->{'author'}<p>
35 print "<a href=/cgi-bin/koha/maint/shiftbib.pl?type=update&bi=$bi&bib=$biblionumber>Yes</a>";
36 } elsif ($type eq 'update'){
40 print "Shifting Group $bi from biblio $bib to <p>";
41 print "<form action=/cgi-bin/koha/maint/shiftbib.pl method=post>";
42 print "<input name=bi type=hidden value=$bi>";
43 print "<input type=hidden name=type value=change>";
44 print "<input type=text name=biblionumber><br>";
45 print "<input type=submit value=change></form>";
47 print endmenu('catalog');