From rangi@usw-pr-cvs1.sourceforge.net Tue Mar 13 14:39:22 2001 From: Chris Cornack To: koha-devel@lists.koha-community.org Subject: [Koha-devel] CVS: koha/maint catmaintain.pl,NONE,1.1 Date: Tue, 13 Mar 2001 14:41:23 -0800 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1986838048731709547==" --===============1986838048731709547== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Update of /cvsroot/koha/koha/maint In directory usw-pr-cvs1:/tmp/cvs-serv13629/maint Added Files: catmaintain.pl=20 Log Message: Shifted catmaintain.pl to a dir that can be easily passowrd protected --- NEW FILE --- #!/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 =3D new CGI; print $input->header; my $type=3D$input->param('type'); print startpage(); print startmenu('catalog'); my $blah; my $num=3D0; my $offset=3D0; if ($type eq 'allsub'){ my $sub=3D$input->param('sub'); my ($count,$results)=3Dlistsubjects($sub,$num,$offset); for (my $i=3D0;$i<$count;$i++){ my $sub2=3D$results->[$i]->{'subject'}; $sub2=3D~ s/ /%20/g; print "\"$results->[$i]->{'subject'}\"
\= n"; } } elsif ($type eq 'modsub'){ my $sub=3D$input->param('sub'); print "
"; print "Subject:\n"; print ""; print ""; print ""; # print "Mod= ify"; print ""; print "

This will change the subject headings on all the biblios this su= bject is applied to" } elsif ($type eq 'upsub'){ my $sub=3D$input->param('sub'); my $oldsub=3D$input->param('oldsub'); updatesub($sub,$oldsub); print "Successfully modified $oldsub is now $sub"; print "

Back to catalogue maintenance
"; print "Close this window"; } elsif ($type eq 'undel'){ my $title=3D$input->param('title'); my ($count,$results)=3Ddeletedbib($title); print ""; print ""; for (my $i=3D0;$i<$count;$i++){ print "\n"; } print "
TitleAuthorUndelete
$results->[$i]->{'title'}$results->[$i]->{'author= '}[$i]->{'biblionumber'}>Undelete
"; } elsif ($type eq 'finun'){ my $bib=3D$input->param('bib'); undeletebib($bib); print "Succesfully undeleted"; print "

Back to Catalogue Ma= intenance"; } else { print "Subject Maintenance
"; print "

"; print ""; print "Show all subjects beginning with
"; print ""; print "
"; print "

"; print "Group Maintenance
"; print "

"; print ""; print "Show all Titles beginning with
"; print ""; print "
"; print "

"; print "Undelete Biblio
"; print "

"; print ""; print "Show all Titles beginning with
"; print ""; print "
"; } print endmenu('catalog'); print endpage(); --===============1986838048731709547==--