New system preference for setting date format when entering patron birth dates.
[koha.git] / jmemberentry.pl
blob1861835cce5e74d6f31f2cc7faef1963059980e0
1 #!/usr/bin/perl
3 #script to set up screen for modification of borrower details
4 #written 20/12/99 by chris@katipo.co.nz
6 use strict;
7 use C4::Output;
8 use CGI;
9 use C4::Search;
12 my $input = new CGI;
13 my $member=$input->param('bornum');
14 if ($member eq ''){
15 $member=NewBorrowerNumber();
17 my $type=$input->param('type');
19 print $input->header;
20 print startpage();
21 print startmenu('member');
22 my $data=borrdata('',$member);
23 print <<printend
24 <BLOCKQUOTE>
26 <FONT SIZE=6><em>Add New Junior Member </em></font><br>
27 <form action=/cgi-bin/koha/newjmember.pl method=post>
28 <!--<input type=hidden name=joining value="">
29 <input type=hidden name=expiry value="">
30 <input type=hidden name=type value="borrowers">-->
31 <input type=hidden name=borrowernumber value=$member>
32 <input type=hidden name=updtype value=I>
33 <input type=hidden name=area value="$data->{'area'}">
34 <input type=hidden name=city value="$data->{'city'}">
35 <input type=hidden name=street value="$data->{'address'}">
36 <input type=hidden name=streetaddress value="$data->{'streetaddress'}">
37 <input type=hidden name=streetcity value="$data->{'streetcity'}">
38 <input type=hidden name=phone value="$data->{'phone'}">
39 <input type=hidden name=phoneday value="$data->{'phoneday'}">
41 <input type=hidden name=faxnumber value="$data->{'faxnumber'}">
42 <input type=hidden name=emailaddress value="$data->{'emailaddress'}">
43 <input type=hidden name=contactname value="$data->{'contactname'}">
44 <input type=hidden name=altphone value"$data->{'altphone'}">
45 <table border=0 cellspacing=0 cellpadding=5 >
48 <tr valign=top><td COLSPAN=1><input type=reset value="Clear all Fields"></td></tr>
49 <tr valign=top bgcolor="99cc33" ><td COLSPAN=5 background="/images/background-mem.gif">
50 <tr valign=top bgcolor="99cc33" ><td COLSPAN=5 background="/images/background-mem.gif">
51 <B>PARENT OR GUARDIAN </b></td></tr>
52 <tr valign=top bgcolor=white>
53 <td><SELECT NAME="title" SIZE="1">
54 <OPTION value=" ">No Title
55 <OPTION value=Miss
56 printend
58 if ($data->{'title'} eq 'Miss'){
59 print " Selected";
61 print ">Miss
62 <OPTION value=Mrs";
63 if ($data->{'title'} eq 'Mrs'){
64 print " Selected";
66 print ">Mrs
67 <OPTION value=Ms";
68 if ($data->{'title'} eq 'Ms'){
69 print " Selected";
71 print ">Ms
72 <OPTION value=Mr";
73 if ($data->{'title'} eq 'Mr'){
74 print " Selected";
76 print ">Mr
77 <OPTION value=Dr";
78 if ($data->{'title'} eq 'Dr'){
79 print " Selected";
81 print ">Dr
82 <OPTION value=Sir";
83 if ($data->{'title'} eq 'Sir'){
84 print " Selected";
86 print <<printend
87 >Sir
88 </SELECT>
89 </td>
92 <td><input type=text name=firstname_guardian size=20 value="$data->{'firstname'}"></td>
93 <td colspan=2><input type=text name=surname_guardian size=20 value="$data->{'surname'}"></td>
94 <td><input type=text name=guardian_number size=20 value="$data->{'cardnumber'}"></td></tr>
95 <tr valign=top bgcolor=white>
96 <td><FONT SIZE=2>Title</FONT></td>
98 <td><FONT SIZE=2>Given Names*</FONT></td>
99 <td colspan=2><FONT SIZE=2>Surname*</FONT></td>
100 <td><FONT SIZE=2>Membership No.</FONT></td>
101 </tr>
103 <tr><td>&nbsp; </TD></TR>
105 printend
107 my $cmember1=NewBorrowerNumber();
108 for (my $i=0;$i<3;$i++){
109 my $cmember=$cmember1+$i;
110 my $count=$i+1;
111 print <<printend
112 <tr valign=top bgcolor="99cc33" ><td COLSPAN=5 background="/images/background-mem.gif">
113 <B>CHILD $count </b></td></TR>
114 <tr valign=top></tr>
116 <TR><td COLSPAN=4 ALIGN=RIGHT ><font size=3 face='arial,helvetica'>
117 <STRONG>Member# $cmember, Card Number*</STRONG> </TD><TD><input type=text name=cardnumber_child_$i size=20 value=""><br>
118 <input type=hidden name=bornumber_child_$i value=$cmember>
119 </td></TR>
120 <tr bgcolor=white>
123 <td><input type=text name=firstname_child_$i size=20 value=""></td>
124 <td><input type=text name=surname_child_$i size=20 value=""></td>
125 <td>
126 <input type=text name=dateofbirth_child_$i size=10 value="">
127 </TD><TD>
128 <input type="radio" name="sex_child_$i" value="F">F
129 <input type="radio" name="sex_child_$i" value="M">M* </td>
130 <TD align=right>
131 <input type=text name=school_child_$i size=20 value="">
132 </TD>
133 </tr>
134 <tr valign=top bgcolor=white>
135 <td><FONT SIZE=2>Given Names*</FONT></td>
136 <td><FONT SIZE=2>Surname*</FONT></td>
138 <td><FONT SIZE=2>Date of Birth<BR> (dd/mm/yy)*</FONT></td>
139 <td><FONT SIZE=2>&nbsp;</FONT></td>
140 <td><FONT SIZE=2>School</FONT></td></tr>
145 <tr valign=top bgcolor=white>
147 <td COLSPAN=5><textarea name=altnotes_child_$i wrap=physical cols=70 rows=3></textarea></td></tr><tr valign=top bgcolor=white>
149 <td><FONT SIZE=2>Notes</font></td>
150 </tr>
151 <tr><td>&nbsp; </TD></TR>
152 printend
155 print <<printend
156 <tr valign=top bgcolor=white><td COLSPAN=5 align=right >
157 <input type=image src="/images/save-changes.gif" WIDTH=188 HEIGHT=44 ALT="Add New Member" border=0 ></td>
158 </tr>
159 </TABLE>
160 </table>
163 printend
165 print endmenu('member');
166 print endpage();