Kumara - predecessor to Koha
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
1.9 KiB

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