Viewing file: v_infoAm_4.php (7.88 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<SCRIPT language=JavaScript type="text/JavaScript">
function showCalendar(val) {
if(val.value=='P') {
document.getElementById("div1").style.display = "none";
} else if(val.value=='F') {
document.getElementById("div1").style.display = "";
}
}
</SCRIPT>
<?php
$row_hed = (isset($qu_hed) && $qu_hed!=NULL) ? $qu_hed->row() : NULL;
// แสดงปฏิทินตอนที่ check validate
if(set_value('fDate')=='P') {
$flg_show = "display:none";
} else if(set_value('fDate')=='F') {
$flg_show = "display:''";
} else if(set_value('fDate')=='') {
$flg_show = "display:none";
}
// แสดงปฏิทินตอนที่แก้ไขข้อมูล
if($row_hed!=NULL) {
if($row_hed->hedFinishDate=="0000-00-00")
$flg_show = "display:none";
else
$flg_show = "display:''";
}
?>
<table width="100%">
<tr>
<td><table class="szone">
<?php echo form_open($this->config->item("ea_folder")."info_alumni/process_infoAm_4", array("name" => "myform", "id" => "myform"));?>
<tr bgcolor="<?php echo $this->config->item('tr_c_even');?>">
<td colspan="2" height="25px" class="indent"><span class="h error">ข้อมูลการเรียนต่อ</span></td>
</tr>
<tr bgcolor="<?php echo $this->config->item('tr_c_even');?>">
<td class="coltd_szone">ชื่อปริญญา</td>
<td><input type="text" name="hedDegree" id="hedDegree" value="<?php echo set_value('hedDegree',setValue('hedDegree',$row_hed));?>" size="50" maxlength="100" />
<span class="error"> * <?php echo form_error('hedDegree');?></span></td>
</tr>
<tr bgcolor="<?php echo $this->config->item('tr_c_even');?>">
<td class="coltd_szone">สาขาวิชา</td>
<td>
<?php
echo form_dropdown('hedMajId', $rs_maj, set_value('hedMajId',setValue('hedMajId', $row_hed)));
?>
<span class="error"> * <?php echo form_error('hedMajId');?></span></td>
</tr>
<tr bgcolor="<?php echo $this->config->item('tr_c_even');?>">
<td class="coltd_szone">ระดับการศึกษา</td>
<td>
<?php
echo form_dropdown('hedLevelId', $rs_lev, set_value('hedLevelId',setValue('hedLevelId', $row_hed)));
?>
<span class="error"> * <?php echo form_error('hedLevelId');?></span></td>
</tr>
<tr bgcolor="<?php echo $this->config->item('tr_c_even');?>">
<td class="coltd_szone">สถานบันการศึกษา</td>
<td><input type="text" name="educationName" id="educationName" value="<?php echo set_value('educationName',setValue('educationName',$row_hed));?>" size="50" readonly class="input2" />
<input type="hidden" name="hedEduId" id="hedEduId" value="<?php echo set_value('hedEduId',setValue('hedEduId',$row_hed));?>" readonly />
<?php
echo anchor_popup($this->config->item("ea_folder")."popup/edu_popup", "<img src=\"".base_url().$this->config->item('rg_search')."\" width=\"15\" height=\"19\" align=\"absmiddle\" border=\"0\" />", array("width" => "400", "height" => "600"));
?>
<span class="error"> *<?php echo form_error('hedEduId');?></span></td>
</tr>
<tr bgcolor="<?php echo $this->config->item('tr_c_even');?>">
<td class="coltd_szone">วันที่เริ่มต้นการศึกษา</td>
<td><script>DateInput('hedStartDate', true, 'DD/MM/YYYY', "<?php echo set_value('hedStartDate') ? set_value('hedStartDate') : ((setValue('hedStartDate',$row_hed)=='') ? getNowDateFw2() : splitDateDb2(setValue('hedStartDate',$row_hed),'/'));?>");</script></td>
</tr>
<tr bgcolor="<?php echo $this->config->item('tr_c_even');?>">
<td class="coltd_szone">วันที่สิ้นสุดการศึกษา</td>
<td><table>
<tr>
<td height="25px"><input type="radio" id="fDate" name="fDate" value="P" onClick="showCalendar(this)" <?php echo (set_value('fDate')=='P') ? "checked" : '';?> checked /> <b>ปัจจุบัน</b></td>
</tr>
<tr>
<td height="25px"><input type="radio" id="fDate" name="fDate" value="F" onClick="showCalendar(this)" <?php echo (set_value('fDate')=='F' || ($row_hed!=NULL && $row_hed->hedFinishDate!="0000-00-00")) ? "checked" : "";?> /> <b>ระบุวันที่</b>
<!-- แสดงปฏิทิน -->
<div id="div1" style="<?php echo $flg_show;?>"><script>DateInput('hedFinishDate', true, 'DD/MM/YYYY', "<?php echo set_value('hedFinishDate') ? set_value('hedFinishDate') : ((setValue('hedFinishDate',$row_hed)=='' || setValue('hedFinishDate',$row_hed)=='0000-00-00') ? getNowDateFw2() : splitDateDb2(setValue('hedFinishDate',$row_hed),'/'));?>")</script></div>
<!-- จบแสดงปฏิทิน -->
<span class="error"><?php echo form_error('hedFinishDate');?></span></td>
</tr>
</table></td>
</tr>
<tr bgcolor="<?php echo $this->config->item('tr_c_even');?>">
<td colspan="2" align="center">
<input type="submit" name="add" id="add" value="บันทึก" />
<input type="reset" name="clear" id="clear" value="เคลียร์ข้อมูล" />
<input type="hidden" name="hedSeqId" id="hedSeqId" value="<?php echo setValue('hedSeqId',$row_hed);?>" />
<input type="hidden" name="hedAlumniId" id="hedAlumniId" value="<?php echo setValue('hedAlumniId',$row_hed);?>" />
<input type="hidden" name="tab" id="tab" value="<?php echo $tab;?>" />
<input type="hidden" name="alumniId" id="alumniId" value="<?php echo $alumniId;?>" />
</td>
</tr>
<?php echo form_close();?></table></td>
</tr>
<tr>
<td><br /></td>
</tr>
<tr>
<td><table class="headCol">
<tr bgcolor="<?php echo $this->config->item('table_c_even');?>">
<th class="seqCol">ลำดับที่</th>
<th>ระยะเวลาที่ศึกษา</th>
<th>ชื่อปริญญา-สาขาวิชา</th>
<th>ระดับการศึกษา</th>
<th class="editCol">แก้ไข</th>
<th class="deleteCol">ลบ</th>
</tr>
<?php
$i = 0;
if(isset($rs_hed) && $rs_hed->num_rows()) {
foreach($rs_hed->result() as $row_hed) {
echo "<tr onmouseover=\"bgColor='".$this->config->item('tr_c_even')."'\" onmouseout=\"bgColor='".$this->config->item("rg_mouseout")."'\">";
$startDate = ($row_hed->hedStartDate=='0000-00-00') ? "ไม่ระบุ" : abbreDate2($row_hed->hedStartDate);
$endDate = ($row_hed->hedFinishDate =='0000-00-00') ? "ปัจจุบัน" : abbreDate2($row_hed->hedFinishDate );
?>
<td align="center"><?php echo $i+1;?></td>
<td class="indent"><?php echo $startDate.' - '.$endDate;?></td>
<td class="indent"><?php echo $row_hed->hedDegree;?><br />
[<?php echo $row_hed->majoreduName;?>]</td>
<td class="indent"><?php echo $row_hed->leveleduName;?></td>
<td align="center"><img class="hand" src="<?php echo base_url().$this->config->item('rg_edit');?>" align="absmiddle" border="0"
onClick="sendPost('hidform',
{'alumniId':<?php echo $row_hed->hedAlumniId;?>,
'tab':<?php echo $tab;?>,
'seqId':<?php echo $row_hed->hedSeqId;?>},
'<?php echo site_url($this->config->item('ea_folder').'info_alumni/main_infoAm');?>')" /></td>
<td align="center"><img class="hand" src="<?php echo base_url().$this->config->item('rg_delete');?>" align="absmiddle" border="0"
onClick="sendPost('hidform',
{'alumniId':<?php echo $row_hed->hedAlumniId;?>,
'tab':<?php echo $tab;?>,
'seqId':<?php echo $row_hed->hedSeqId;?>},
'<?php echo site_url($this->config->item('ea_folder').'info_alumni/process_deleteInfoAm_4');?>')" /></td>
</tr>
<?php
$i++;
}
} else {
?>
<tr>
<td colspan="6" align="center"><span class="error">** ไม่ปรากฏรายการในฐานข้อมูล **</span></td>
</tr>
<?php
}
?>
</table></td>
</tr>
<tr>
<td align="right">รวม <?php echo $i;?> รายการ</td>
</tr>
</table>
|