Viewing file: v_alumniAddress.php (13.41 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<script language="JavaScript1.2"> function copyAddr() { if(document.getElementById("currentChk").value==1) { if(document.myform.currentChk.checked==true) { document.getElementById("currentAddress").value = document.getElementById("homeAddress").value; document.getElementById("curDistrictName").value = document.getElementById("districtName").value; document.getElementById("curDistrictId").value = document.getElementById("districtId").value; document.getElementById("curAmphurName").value = document.getElementById("amphurName").value; document.getElementById("curAmphurId").value = document.getElementById("amphurId").value; document.getElementById("curProvinceName").value = document.getElementById("provinceName").value; document.getElementById("curProvinceId").value = document.getElementById("provinceId").value; document.getElementById("currentZipcode").value = document.getElementById("homeZipcode").value; document.getElementById("currentPhoneNo").value = document.getElementById("homePhoneNo").value; } else { document.getElementById("currentAddress").value = ''; document.getElementById("curDistrictName").value = ''; document.getElementById("curDistrictId").value = ''; document.getElementById("curAmphurName").value = ''; document.getElementById("curAmphurId").value = ''; document.getElementById("curProvinceName").value = ''; document.getElementById("curProvinceId").value = ''; document.getElementById("currentZipcode").value = ''; document.getElementById("currentPhoneNo").value = ''; } } } </script> <?php $row_home = (isset($qu_ab_home) && $qu_ab_home!=NULL) ? $qu_ab_home->row() : NULL; $row_curr = (isset($qu_ab_curr ) && $qu_ab_curr !=NULL) ? $qu_ab_curr->row() : NULL; $row_off = (isset($qu_ab_off ) && $qu_ab_off !=NULL) ? $qu_ab_off->row() : NULL; $row_ab = (isset($qu_ab ) && $qu_ab !=NULL) ? $qu_ab->row() : NULL; echo form_open($this->config->item("ea_folder")."alumni/v_alumniAddress",array("name" => "myform", "id"=>"myform")); ?> <table width="100%"> <tr> <td><br> <label><div align="center"> <table width="100%"> <tr> <td align="center" class="h">ที่อยู่</td> </tr> <tr> <td><table class="easzone"> <tr bgcolor="<?php echo $this->config->item('table_color');?>"> <td class="indent" colspan="8" height="22"><font size="2"><b>ที่อยู่ศิษย์เก่า (ตามภูมิลำเนา)</b></font> <input type="hidden" name="studentId" id="studentId" value="<?php echo setValue('studentId',$row_home);?>"> </td> </tr> <tr bgcolor="<?php echo $this->config->item('tr_color_even');?>"> <td class="coltd_easzone"><font size="2"><b>ที่อยู่</b></font></td> <td colspan="3"> <input type="text" name="homeAddress" id="homeAddress" size="70" value="<?php echo setValue('homeAddress',$row_home);?>" /> </td> </tr> <tr bgcolor="<?php echo $this->config->item('tr_color_even');?>"> <td class="coltd_easzone"><font size="2"><b>ตำบล</b></font></td> <td width="30%"> <input type="text" name="districtName" id="districtName" size="40" value="<?php echo setValue('districtName',$row_home);?>" class="input2" readonly /> <input type="hidden" name="districtId" id="districtId" size="40" value="<?php echo setValue('homeDistrictId',$row_home);?>" /> <?php echo anchor_popup($this->config->item("ea_folder")."popup/adr_popup", "<img src=\"".base_url()."images/".$this->config->item("rg_folder")."picture/search.gif\" width=\"15\" height=\"19\" align=\"abmiddle\" border=\"0\" />", array("width" => "600", "height" => "350")); ?> </td> <td class="indent" width="20%"><font size="2"><b>อำเภอ</b></font></td> <td width="25%"> <input type="text" name="amphurName" id="amphurName" size="40" value="<?php echo setValue('amphurName',$row_home);?>" class="input2" readonly / /> <input type="hidden" name="amphurId" id="amphurId" size="40" value="<?php echo setValue('homeAmphurId',$row_home);?>" class="input1" readonly /> </td> </tr> <tr bgcolor="<?php echo $this->config->item('tr_color_even');?>"> <td class="coltd_easzone"><font size="2"><b>จังหวัด</b></font></td> <td width="30%" height="22"><font size="2"> <input type="text" name="provinceName" id="provinceName" size="40" value="<?php echo setValue('provinceName',$row_home);?>" class="input2" readonly / /> <input type="hidden" name="provinceId" id="provinceId" size="40" value="<?php echo setValue('homeProvinceId',$row_home);?>" class="input2" readonly /> </td> <td class="indent" width="20%" height="22"><font size="2"><b>รหัสไปรษณีย์</b></font> <td width="25%" height="22"><input type="text" name="homeZipcode" id="homeZipcode" size="40" value="<?php echo setValue('homeZipcode',$row_home);?>" /></font></td> </tr> <tr bgcolor="<?php echo $this->config->item('tr_color_even');?>"> <td class="coltd_easzone"><font size="2"><b>โทรศัพท์</b></font></td> <td colspan="3"> <input type="text" name="homePhoneNo" id="homePhoneNo" size="40" value="<?php echo setValue('homePhoneNo',$row_home);?>" /> </td> </tr> <!-- End ที่อยู่ศิษย์เก่า (ตามภูมิลำเนา) --> <tr bgcolor="<?php echo $this->config->item('table_color');?>"> <td class="indent" colspan="8" height="22"><font size="2"><b>ที่อยู่ศิษย์เก่า (ปัจจุบัน) <input type="checkbox" name="currentChk" id="currentChk" value="1" onClick="copyAddr()" />ใช้ที่อยู่ปัจจุบันนักศึกษาตามที่อยู่ภูมิลำเนาเดิมนักศึกษา</b></td> </tr> <tr bgcolor="<?php echo $this->config->item('tr_color_even');?>"> <td class="coltd_easzone"><font size="2"><b>ที่อยู่</b></font></td> <td colspan="3"> <input type="text" name="currentAddress" id="currentAddress" size="70" value="<?php echo setValue('currentAddress',$row_curr);?>" /> </td> </tr> <tr bgcolor="<?php echo $this->config->item('tr_color_even');?>"> <td class="coltd_easzone"><font size="2"><b>ตำบล</b></font></td> <td width="30%"> <input type="text" name="curDistrictName" id="curDistrictName" size="40" value="<?php echo setValue('districtName',$row_curr);?>" class="input2" readonly /> <input type="hidden" name="curDistrictId" id="curDistrictId" size="40" value="<?php echo setValue('currentDistrictId',$row_curr);?>" /> <?php echo anchor_popup($this->config->item("ea_folder")."popup/curAdr_popup", "<img src=\"".base_url()."images/".$this->config->item("rg_folder")."picture/search.gif\" width=\"15\" height=\"19\" align=\"abmiddle\" border=\"0\" />", array("width" => "600", "height" => "350")); ?> <td class="indent" width="20%"><font size="2"><b>อำเภอ</b></font> <td width="25%"> <input type="text" name="curAmphurName" id="curAmphurName" size="40" value="<?php echo setValue('amphurName',$row_curr);?>" class="input2" readonly /> <input type="hidden" name="curAmphurId" id="curAmphurId" size="40" value="<?php echo setValue('currentAmphurId',$row_curr);?>" /> </td> </tr> <tr bgcolor="<?php echo $this->config->item('tr_color_even');?>"> <td class="coltd_easzone"><font size="2"><b>จังหวัด</b></font></td> <td width="30%" height="22"><font size="2"> <input type="text" name="curProvinceName" id="curProvinceName" size="40" value="<?php echo setValue('provinceName',$row_curr);?>" class="input2" readonly /> <input type="hidden" name="curProvinceId" id="curProvinceId" size="40" value="<?php echo setValue('currentProvinceId',$row_curr);?>" class="input1" readonly /> <td class="indent" width="20%" height="22"><font size="2"><b>รหัสไปรษณีย์</b></font> <td width="25%" height="22"><input type="text" name="currentZipcode" id="currentZipcode" size="40" value="<?php echo setValue('currentZipcode',$row_curr);?>" /></font></td> </tr> <tr bgcolor="<?php echo $this->config->item('tr_color_even');?>"> <td class="coltd_easzone"><font size="2"><b>โทรศัพท์</b></font></td> <td colspan="3"> <input type="text" name="currentPhoneNo" id="currentPhoneNo" size="40" value="<?php echo setValue('currentPhoneNo',$row_curr);?>" /> </td> </tr> <!-- End ที่อยู่ศิษย์เก่า (ปัจจุบัน) --> <tr bgcolor="<?php echo $this->config->item('table_color');?>"> <td class="indent" colspan="8" height="22"><font size="2"><b>ที่อยู่ที่ทำงานศิษย์เก่า</b></td> </tr> <tr bgcolor="<?php echo $this->config->item('tr_color_even');?>"> <td class="coltd_easzone"><font size="2"><b>ที่อยู่</b></font></td> <td colspan="3"> <input type="text" name="officeAddress" id="officeAddress" size="70" value="<?php echo setValue('officeAddress',$row_off);?>" /> </td> </tr> <tr bgcolor="<?php echo $this->config->item('tr_color_even');?>"> <td class="coltd_easzone"><font size="2"><b>ตำบล</b></font></td> <td width="30%"> <input type="text" name="offDistrictName" id="offDistrictName" size="40" value="<?php echo setValue('districtName',$row_off);?>" class="input2" readonly /> <input type="hidden" name="offDistrictId" id="offDistrictId" size="40" value="<?php echo setValue('officeDistrictId',$row_off);?>" /> <?php echo anchor_popup($this->config->item("ea_folder")."popup/offAdr_popup", "<img src=\"".base_url()."images/".$this->config->item("rg_folder")."picture/search.gif\" width=\"15\" height=\"19\" align=\"abmiddle\" border=\"0\" />", array("width" => "600", "height" => "350")); ?> <td class="indent" width="20%"><font size="2"><b>อำเภอ</b></font> <td width="25%"> <input type="text" name="offAmphurName" id="offAmphurName" size="40" value="<?php echo setValue('amphurName',$row_off);?>" class="input2" readonly /> <input type="hidden" name="offAmphurId" id="offAmphurId" size="40" value="<?php echo setValue('officeAmphurId',$row_off);?>" /> </td> </tr> <tr bgcolor="<?php echo $this->config->item('tr_color_even');?>"> <td class="coltd_easzone"><font size="2"><b>จังหวัด</b></font></td> <td width="30%" height="22"><font size="2"> <input type="text" name="offProvinceName" id="offProvinceName" size="40" value="<?php echo setValue('provinceName',$row_off);?>" class="input2" readonly /> <input type="hidden" name="offProvinceId" id="offProvinceId" size="40" value="<?php echo setValue('officeProvinceId',$row_off);?>" class="input1" readonly /> <td class="indent" width="20%" height="22"><font size="2"><b>รหัสไปรษณีย์</b></font> <td width="25%" height="22"><input type="text" name="officeZipcode" id="officeZipcode" size="40" value="<?php echo setValue('officeZipcode',$row_off);?>" /></font></td> </tr> <tr bgcolor="<?php echo $this->config->item('tr_color_even');?>"> <td class="coltd_easzone"><font size="2"><b>โทรศัพท์</b></font></td> <td colspan="3"> <input type="text" name="officePhoneNo" id="officePhoneNo" size="40" value="<?php echo setValue('officePhoneNo',$row_off);?>" /> </td> </tr> <!-- End ที่อยู่ศิษย์เก่า (ปัจจุบัน) --> <tr bgcolor="<?php echo $this->config->item('table_color');?>"> <td class="indent" colspan="8" height="22"><font size="2"><b>ที่อยู่ต่างประเทศศิษย์เก่า</b></td> </tr> <tr bgcolor="<?php echo $this->config->item('tr_color_even');?>"> <td class="coltd_easzone"><font size="2"><b>ที่อยู่</b></font></td> <td colspan="3"> <input type="text" name="countryAddress" id="countryAddress" size="70" value="<?php echo setValue('countryAddress',$row_ab);?>" /> </td> </tr> </tr> <tr bgcolor="<?php echo $this->config->item('tr_color_even');?>"> <td class="coltd_easzone"><font size="2"><b>ประเทศ</b></font></td> <td colspan="3"> <?php echo form_dropdown('countryId', $rs_co, setValue('countryId', $row_ab)); ?> </td> </tr> <tr bgcolor="<?php echo $this->config->item('tr_color_even');?>"> <td height="22" colspan="4" align="center"> <input type="submit" name="add" value="บันทึกข้อมูล" /> <input type="reset" name="clear" value="ลบข้อมูล" /> <input type="button" name="cancel" value="ยกเลิก" /> <input type="hidden" name="method" value="edit" /> <input type="hidden" name="alumniId" value="<?php echo $alumniId;?>" /> <input type="hidden" name="tab" id="tab" value="<?php echo $tab;?>"/> </td> </tr> </table></td> </tr> </table></div></label> <br><font color="<?php echo $this->config->item('font_color_err');?>" size="2"><b>หมายเหตุ : </b>* หมายถึง ต้องกรอกข้อมูลให้สมบูรณ์</font></td> </tr> </table> <?php echo form_close();?>
|