$VERSION = 0.01;
@ISA = qw(Exporter);
-@EXPORT = qw(&listsubjects &updatesub &shiftgroup &deletedbib &undeletebib);
+@EXPORT = qw(&listsubjects &updatesub &shiftgroup &deletedbib &undeletebib
+&updatetype);
%EXPORT_TAGS = ( ); # eg: TAG => [ qw!name1 name2! ],
# your exported package globals go here,
$dbh->disconnect;
}
-
+sub updatetype{
+ my ($bi,$type)=@_;
+ my $dbh=C4Connect;
+ my $sth=$dbh->prepare("Update biblioitems set itemtype='$type' where biblioitemnumber=$bi");
+ $sth->execute;
+ $sth->finish;
+ $dbh->disconnect;
+}
END { } # module clean-up code here (global destructor)
undeletebib($bib);
print "Succesfully undeleted";
print "<p><a href=/cgi-bin/koha/maint/catmaintain.pl>Back to Catalogue Maintenance</a>";
+} elsif ($type eq 'fixitemtype'){
+ my $bi=$input->param('bi');
+ my $item=$input->param('item');
+ print "<form method=post action=/cgi-bin/koha/maint/catmaintain.pl>";
+ print "<input type=hidden name=bi value=$bi>";
+ print "<input type=hidden name=type value=updatetype>";
+ print "Itemtype:<input type=text name=itemtype value=$item><br>\n";
+ print "<input type=submit value=Change>";
+ print "</form>";
+} elsif ($type eq 'updatetype'){
+ my $bi=$input->param('bi');
+ my $itemtype=$input->param('itemtype');
+ updatetype($bi,$itemtype);
+ print "Updated successfully";
+ print "<p><a href=/cgi-bin/koha/maint/catmaintain.pl>Back to Catalogue Maintenance</a>";
} else {
print "<B>Subject Maintenance</b><br>";
print "<form action=/cgi-bin/koha/maint/catmaintain.pl method=post>";