Removed "warn" line.
[koha.git] / member.pl
bloba20604d2a1660bba186d3d64f045e9acae3ab63c
1 #!/usr/bin/perl
3 #script to do a borrower enquiery/brin up borrower details etc
4 #written 20/12/99 by chris@katipo.co.nz
6 use strict;
7 use C4::Output;
8 use CGI;
9 use C4::Search;
10 use C4::Auth;
13 my $input = new CGI;
14 my $flagsrequired;
15 $flagsrequired->{borrowers}=1;
16 my ($loggedinuser, $cookie, $sessionID) = checkauth($input, 0, $flagsrequired);
17 my $member=$input->param('member');
18 $member=~ s/\,//g;
19 print $input->header(-cookie => $cookie);
20 #start the page and read in includes
21 print startpage();
22 print startmenu('member');
23 my @inputs=(["text","member",$member],
24 ["reset","reset","clr"]);
25 print mkheadr(2,'Member Search');
26 print mkformnotable("/cgi-bin/koha/member.pl",@inputs);
27 print <<printend
29 printend
31 print "You Searched for $member<p>";
32 print mktablehdr;
33 print mktablerow(8,'#99cc33',bold('Card'),bold('Surname'),bold('Firstname'),bold('Category')
34 ,bold('Address'),bold('OD/Issues'),bold('Charges'),bold('Notes'),'/images/background-mem.gif');
35 my $env;
36 my ($count,$results)=BornameSearch($env,$member,'web');
37 #print $count;
38 my $toggle="white";
39 for (my $i=0; $i < $count; $i++){
40 #find out stats
41 my ($od,$issue,$fines)=borrdata2($env,$results->[$i]{'borrowernumber'});
42 $fines=$fines+0;
43 if ($toggle eq 'white'){
44 $toggle="#ffffcc";
45 } else {
46 $toggle="white";
48 #mklink("/cgi-bin/koha/memberentry.pl?bornum=".$results->[$i]{'borrowernumber'},$results->[$i]{'cardnumber'}),
49 print mktablerow(8,$toggle,mklink("/cgi-bin/koha/moremember.pl?bornum=".$results->[$i]{'borrowernumber'},$results->[$i]{'cardnumber'}),
50 $results->[$i]{'surname'},$results->[$i]{'firstname'},
51 $results->[$i]{'categorycode'},$results->[$i]{'streetaddress'}." ".$results->[$i]{'city'},"$od/$issue",$fines,
52 $results->[$i]{'borrowernotes'});
54 print mktableft;
55 print <<printend
56 <form action=/cgi-bin/koha/simpleredirect.pl method=post>
57 <input type=image src="/images/button-add-member.gif" WIDTH=188 HEIGHT=44 ALT="Add New Member" BORDER=0 ></a><br>
58 <INPUT TYPE="radio" name="chooseform" value="adult" checked>Adult
59 <INPUT TYPE="radio" name="chooseform" value="organisation" >Organisation
60 </form>
61 printend
63 print endmenu('member');
64 print endpage();