File for doing confirmation
This commit is contained in:
parent
bd1a200cca
commit
b34ef413f3
3 changed files with 122 additions and 23 deletions
20
member.pl
20
member.pl
|
@ -13,23 +13,33 @@ my $input = new CGI;
|
|||
my $member=$input->param('member');
|
||||
|
||||
print $input->header;
|
||||
#start the page and read in includes
|
||||
print startpage();
|
||||
print startmenu('member');
|
||||
print mkheadr(1,'Member Search');
|
||||
my @inputs=(["text","member",$member],
|
||||
["reset","reset","clr"]);
|
||||
print mkheadr(2,'Member Search');
|
||||
print mkformnotable("/cgi-bin/koha/member.pl",@inputs);
|
||||
print "You Searched for $member<p>";
|
||||
print mktablehdr;
|
||||
print mktablerow(8,'#99cc33','<b>Card</b>','<b>Surname</b>','<b>Firstname</b>','<b>Category</b>'
|
||||
,'<b>Address</b>','<b>OD/Issues</b>','<b>Fines</b>','<b>Notes</b>');
|
||||
print mktablerow(8,'#99cc33',bold('Card'),bold('Surname'),bold('Firstname'),bold('Category')
|
||||
,bold('Address'),bold('OD/Issues'),bold('Fines'),bold('Notes'),'/images/background-mem.gif');
|
||||
my $env;
|
||||
my ($count,$results)=BornameSearch($env,$member,'web');
|
||||
#print $count;
|
||||
my $toggle="white";
|
||||
for (my $i=0; $i < $count; $i++){
|
||||
#find out stats
|
||||
my ($od,$issue,$fines)=borrdata2($env,$results->[$i]{'borrowernumber'});
|
||||
$fines=$fines+0;
|
||||
print mktablerow(8,'white',mklink("/cgi-bin/koha/addborrower.pl?bornum=".$results->[$i]{'borrowernumber'},$results->[$i]{'cardnumber'}),
|
||||
if ($toggle eq 'white'){
|
||||
$toggle="#ffffcc";
|
||||
} else {
|
||||
$toggle="white";
|
||||
}
|
||||
print mktablerow(8,$toggle,mklink("/cgi-bin/koha/memberentry.pl?bornum=".$results->[$i]{'borrowernumber'},$results->[$i]{'cardnumber'}),
|
||||
$results->[$i]{'surname'},$results->[$i]{'firstname'},
|
||||
$results->[$i]{'categorycode'},$results->[$i]{'streetaddress'},"$od/$issue",$fines,
|
||||
$results->[$i]{'categorycode'},$results->[$i]{'streetaddress'}." ".$results->[$i]{'city'},"$od/$issue",$fines,
|
||||
$results->[$i]{'borrowernotes'});
|
||||
}
|
||||
print mktableft;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
#script to do a borrower enquiery/brin up borrower details etc
|
||||
#script to set up screen for modification of borrower details
|
||||
#written 20/12/99 by chris@katipo.co.nz
|
||||
|
||||
use strict;
|
||||
|
@ -10,28 +10,16 @@ use C4::Search;
|
|||
|
||||
|
||||
my $input = new CGI;
|
||||
my $member=$input->param('member');
|
||||
my $member=$input->param('bornum');
|
||||
|
||||
print $input->header;
|
||||
print startpage();
|
||||
print startmenu('member');
|
||||
print mkheadr(1,'Member Search');
|
||||
print "You Searched for $member<p>";
|
||||
print mkheadr(1,'Update Member Details');
|
||||
|
||||
|
||||
print mktablehdr;
|
||||
print mktablerow(8,'#99cc33','<b>Card</b>','<b>Surname</b>','<b>Firstname</b>','<b>Category</b>'
|
||||
,'<b>Address</b>','<b>OD/Issues</b>','<b>Fines</b>','<b>Notes</b>');
|
||||
my $env;
|
||||
my ($count,$results)=BornameSearch($env,$member,'web');
|
||||
#print $count;
|
||||
for (my $i=0; $i < $count; $i++){
|
||||
#find out stats
|
||||
my ($od,$issue,$fines)=borrdata2($env,$results->[$i]{'borrowernumber'});
|
||||
$fines=$fines+0;
|
||||
print mktablerow(8,'white',mklink("/cgi-bin/koha/addborrower.pl?bornum=".$results->[$i]{'borrowernumber'},$results->[$i]{'cardnumber'}),
|
||||
$results->[$i]{'surname'},$results->[$i]{'firstname'},
|
||||
$results->[$i]{'categorycode'},$results->[$i]{'streetaddress'},"$od/$issue",$fines,
|
||||
$results->[$i]{'borrowernotes'});
|
||||
}
|
||||
|
||||
print mktableft;
|
||||
print endmenu('member');
|
||||
print endpage();
|
||||
|
|
101
newmember.pl
Executable file
101
newmember.pl
Executable file
|
@ -0,0 +1,101 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
#script to print confirmation screen, then if accepted calls itself to insert data
|
||||
|
||||
use strict;
|
||||
use C4::Output;
|
||||
use CGI;
|
||||
use Date::Manip;
|
||||
|
||||
|
||||
my $input = new CGI;
|
||||
#get varibale that tells us whether to show confirmation page
|
||||
#or insert data
|
||||
my $insert=$input->param('insert');
|
||||
|
||||
#get rest of data
|
||||
my %data;
|
||||
my @names=$input->param;
|
||||
foreach my $key (@names){
|
||||
$data{$key}=$input->param($key);
|
||||
}
|
||||
print $input->header;
|
||||
print startpage();
|
||||
print startmenu('member');
|
||||
my $main="#99cc33";
|
||||
my $image="/images/background-mem.gif";
|
||||
if ($insert eq ''){
|
||||
#we are printing confirmation page
|
||||
print mkheadr(1,'Confirm New Adult Member');
|
||||
print mktablehdr;
|
||||
print mktablerow(2,$main,bold('NEW MEMBER'),"",$image);
|
||||
my $name=$data{'title'}." ";
|
||||
if ($data{'othernames'} ne ''){
|
||||
$name.=$data{'othernames'}." ";
|
||||
} else {
|
||||
$name.=$data{'firstname'}." ";
|
||||
}
|
||||
$name.="$data{'surname'} ( $data{'firstname'}, $data{'initials'})";
|
||||
print mktablerow(2,'white',bold('Name'),$name);
|
||||
print mktablerow(2,$main,bold('MEMBERSHIP DETAILS'),"",$image);
|
||||
print mktablerow(2,'white',bold('Membership Number'),$data{'borrowernumber'});
|
||||
print mktablerow(2,'white',bold('Cardnumber'),$data{'cardnumber'});
|
||||
print mktablerow(2,'white',bold('Membership Category'),$data{'category'});
|
||||
print mktablerow(2,'white',bold('Area'),$data{'area'});
|
||||
print mktablerow(2,'white',bold('Fee'),$data{'fee'});
|
||||
$data{'joining'}=ParseDate('today');
|
||||
print mktablerow(2,'white',bold('Joining Date'),$data{'joining'});
|
||||
$data{'expiry'}=ParseDate('in 1 year');
|
||||
print mktablerow(2,'white',bold('Expiry Date'),$data{'expiry'});
|
||||
print mktablerow(2,'white',bold('Joining Branch'),$data{'joinbranch'});
|
||||
print mktablerow(2,$main,bold('PERSONAL DETAILS'),"",$image);
|
||||
my $ethnic=$data{'ethnicity'}." ".$data{'ethnicnotes'};
|
||||
print mktablerow(2,'white',bold('Ethnicity'),$ethnic);
|
||||
print mktablerow(2,'white',bold('Date of Birth'),$data{'dateofbirth'});
|
||||
my $sex;
|
||||
if ($data{'sex'} eq 'm'){
|
||||
$sex="Male";
|
||||
} else {
|
||||
$sex="Female";
|
||||
}
|
||||
print mktablerow(2,'white',bold('Sex'),$sex);
|
||||
print mktablerow(2,$main,bold('MEMBER ADDRESS'),"",$image);
|
||||
my $postal=$data{'address'}."<br>".$data{'city'};
|
||||
my $home;
|
||||
if ($data{'streetaddress'} ne ''){
|
||||
$home=$data{'streetaddress'}."<br>".$data{'streetcity'};
|
||||
} else {
|
||||
$home=$postal;
|
||||
}
|
||||
print mktablerow(2,'white',bold('Postal Address'),$postal);
|
||||
print mktablerow(2,'white',bold('Home Address'),$home);
|
||||
print mktablerow(2,$main,bold('MEMBER CONTACT DETAILS'),"",$image);
|
||||
print mktablerow(2,'white',bold('Phone (Home)'),$data{'phone'});
|
||||
print mktablerow(2,'white',bold('Phone (Daytime)'),$data{'phoneday'});
|
||||
print mktablerow(2,'white',bold('Fax'),$data{'faxnumber'});
|
||||
print mktablerow(2,'white',bold('Email'),$data{'emailaddress'});
|
||||
print mktablerow(2,$main,bold('ALTERNATIVE CONTACT DETAILS'),"",$image);
|
||||
print mktablerow(2,'white',bold('Name'),$data{'contactname'});
|
||||
print mktablerow(2,'white',bold('Phone'),$data{'altphone'});
|
||||
print mktablerow(2,'white',bold('Relationship'),$data{'relation'});
|
||||
print mktablerow(2,'white',bold('Notes'),$data{'altnotes'});
|
||||
print mktablerow(2,$main,bold('Notes'),"",$image);
|
||||
print mktablerow(2,'white',bold('General Notes'),$data{'borrowernotes'});
|
||||
|
||||
print mktableft;
|
||||
#set up form to post data thru for modification or insertion
|
||||
my $i=0;
|
||||
my @inputs;
|
||||
while (my ($key, $value) = each %data) {
|
||||
$inputs[$i]=["hidden","$key","$value"];
|
||||
$i++;
|
||||
}
|
||||
print mkformnotable("/cgi-bin/koha/member.pl",@inputs);
|
||||
}
|
||||
#print $input->dump;
|
||||
|
||||
print mktablehdr;
|
||||
|
||||
print mktableft;
|
||||
print endmenu('member');
|
||||
print endpage();
|
Loading…
Reference in a new issue