added 440* and 490* 'series' indexes
[koha.git] / members / setdebar.pl
blob905e17f9eb14e0169e1e1d5b9c6ea442d27b9576
1 #!/usr/bin/perl
3 # Copyright 2000-2002 Katipo Communications
5 # This file is part of Koha.
7 # Koha is free software; you can redistribute it and/or modify it under the
8 # terms of the GNU General Public License as published by the Free Software
9 # Foundation; either version 2 of the License, or (at your option) any later
10 # version.
12 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
13 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
14 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License along with
17 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
18 # Suite 330, Boston, MA 02111-1307 USA
21 =head1 setdebar.pl
23 script to set or lift debarred status
24 written 2/8/04
25 by oleonard@athenscounty.lib.oh.us
27 =cut
29 use strict;
31 use CGI;
32 use C4::Context;
33 use C4::Auth;
35 my $input = new CGI;
37 my $flagsrequired;
38 $flagsrequired->{borrowers} = 1;
39 my ( $loggedinuser, $cookie, $sessionID ) =
40 checkauth( $input, 0, $flagsrequired );
42 my $destination = $input->param("destination");
43 my $cardnumber = $input->param("cardnumber");
44 my $borrowernumber = $input->param('borrowernumber');
45 my $status = $input->param('status');
47 my $dbh = C4::Context->dbh;
48 my $sth =
49 $dbh->prepare("Update borrowers set debarred = ? where borrowernumber = ?");
50 $sth->execute( $status, $borrowernumber );
51 $sth->finish;
53 if ( $destination eq "circ" ) {
54 print $input->redirect(
55 "/cgi-bin/koha/circ/circulation.pl?findborrower=".$cardnumber);
57 else {
58 print $input->redirect(
59 "/cgi-bin/koha/members/moremember.pl?borrowernumber=$borrowernumber");