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.

167 lines
6.5 KiB

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