Viewing file: v_showAnsQn.php (14.02 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<SCRIPT language=JavaScript type="text/JavaScript">
function checkAns(state) {
var stateVal = state.value;
// 1 : ทำงานก่อนมาเรียน
// 2 : มีงานทำ
// 3 : ศึกษาต่อ
if(stateVal=='2') {
document.getElementById("w_1").style.display = "";
document.getElementById("w_2").style.display = "";
document.getElementById("w_3").style.display = "";
document.getElementById("w_4").style.display = "";
document.getElementById("w_5").style.display = "";
document.getElementById("w_6").style.display = "";
document.getElementById("w_7").style.display = "";
} else {
document.getElementById("w_1").style.display = "none";
document.getElementById("w_2").style.display = "none";
document.getElementById("w_3").style.display = "none";
document.getElementById("w_4").style.display = "none";
document.getElementById("w_5").style.display = "none";
document.getElementById("w_6").style.display = "none";
document.getElementById("w_7").style.display = "none";
}
if(stateVal=='3') {
document.getElementById("e_1").style.display = "";
document.getElementById("e_2").style.display = "";
document.getElementById("e_3").style.display = "";
} else {
document.getElementById("e_1").style.display = "none";
document.getElementById("e_2").style.display = "none";
document.getElementById("e_3").style.display = "none";
}
}
</SCRIPT>
<?php
$row_aq = (isset($qu_aq) && $qu_aq!=NULL) ? $qu_aq->row() : NULL;
$row_am = (isset($qu_am) && $qu_am!=NULL) ? $qu_am->row() : NULL;
$row_curd = (isset($qu_curd) && $qu_curd!=NULL) ? $qu_curd->row() : NULL;
$row_aq = (isset($qu_aq) && $qu_aq!=NULL) ? $qu_aq->row() : NULL;
// ---- ตอบแบบสอบถาม
$row_ansQn = (isset($ansQn) && $ansQn!=NULL) ? $ansQn->row() : NULL;
$row_ansQn_work = (isset($ansQn_work) && $ansQn_work!=NULL) ? $ansQn_work->row() : NULL;
// ---- create variable
$chkPreAdmit = (setValue('preAdmitPositionId',$row_ansQn)==2 || setValue('preAdmitPositionId',$row_ansQn)==3 || setValue('preAdmitPositionId',$row_am)==2 || setValue('preAdmitPositionId',$row_am)==3);
?>
<table width="100%">
<tr>
<td align="center"><span class="h error">แบบสอบถามข้อมูลการทำงานของผู้สำเร็จการศึกษา</span></td>
</tr>
<tr>
<td><br /></td>
</tr>
<tr>
<td><?php echo form_open($this->config->item("ea_folder")."add_ansqn/process_ansQn", array("name" => "myform", "id" => "myform"));?><table class="szone">
<?php
if($this->session->flashdata('stateFlg')) {
?>
<tr>
<td colspan="4" align="center"><?php echo $this->session->flashdata('stateFlg');?></td>
</tr>
<?php
}
?>
<!-- <tr>
<td colspan="4" align="right">พิมพ์แบบสอบถาม
<img src="<?php echo base_url().$this->config->item("rg_print");?>" title="พิมพ์" /></td>
</tr> -->
<tr bgcolor="<?php echo $this->config->item('tr_c_even');?>">
<td class="indent coltd_szone" colspan="4"><span class="error"><b>ส่วนที่ 1 : ข้อมูลผู้สำเร็จการศึกษา</b></span></td>
</tr>
<tr bgcolor="<?php echo $this->config->item('tr_c_even');?>">
<td class="coltd_szone indentPm">ชื่อ - สกุลผู้สำเร็จการศึกษา</td>
<td><?php echo setValue('prefixName',$row_am).setValue('studentName',$row_am).' '.setValue('studentSurname',$row_am);?></td>
<td class="coltd_szone">GPA</td>
<td><?php echo number_format(setValue('GPA',$row_am),2);?></td>
</tr>
<tr bgcolor="<?php echo $this->config->item('tr_c_even');?>">
<td class="coltd_szone indentPm">หลักสูตร</td>
<td><?php echo setValue('curName',$row_curd);?></td>
<td class="coltd_szone">ระดับการศึกษา</td>
<td><?php echo setValue('levelName',$row_curd);?></td>
</tr>
<tr bgcolor="<?php echo $this->config->item('tr_c_even');?>">
<td class="coltd_szone indentPm">ปีที่เข้า</td>
<td><?php echo setValue('admitAcadYear',$row_am);?></td>
<td class="coltd_szone">ปี่ที่สำเร็จการศึกษา</td>
<td><?php echo setValue('graduateYear',$row_am);?></td>
</tr>
<tr bgcolor="<?php echo $this->config->item('tr_c_even');?>">
<td class="coltd_szone indentPm">อีเมล์</td>
<td><?php echo (setValue('studentEmail',$row_am)==NULL || setValue('studentEmail',$row_am)=="NULL") ? '-' : setValue('studentEmail',$row_am);?></td>
<td class="coltd_szone">เบอร์โทรศัพท์</td>
<td><?php echo (setValue('currentPhoneNo',$row_am)==NULL ||setValue('currentPhoneNo',$row_am)=="") ? '-' : setValue('currentPhoneNo',$row_am);?></td>
</tr>
<tr bgcolor="<?php echo $this->config->item('tr_c_even');?>">
<td height="25px" colspan="4"><br /></td>
</tr>
<!-- ###################################### 0 ####################################### -->
<tr bgcolor="<?php echo $this->config->item('tr_c_even');?>">
<td class="indent" height="25px" colspan="4"><span class="error"><b>ส่วนที่ 2 : ข้อมูลหลังสำเร็จการศึกษา</b></span> (เฉพาะผู้สำเร็จการศึกษาที่มีสถานะก่อนเข้าเรียนเป็น บุคคลทั่วไป ลูกจ้างชั่วคราว อสม. และบุตรอสม.)</td>
</tr>
<tr bgcolor="<?php echo $this->config->item('tr_c_even');?>">
<td class="coltd_szone" colspan="4"><input type="radio" name="state" id="state" value="1" <?php echo ($chkPreAdmit) ? "checked disabled" : "disabled";?> /> ทำงานก่อนมาเรียน</td>
</tr>
<tr bgcolor="<?php echo $this->config->item('tr_c_even');?>">
<td class="coltd_szone" colspan="4">
<input type="radio" name="state" id="state" value="2" onClick="checkAnsType(this)" <?php echo (setValue('aqStateQn',$row_ansQn)==2) ? "checked disabled" : "disabled";?> /> มีงานทำ</td>
</tr>
<!-- ###################################### 1 ####################################### -->
<!-- show infowork -->
<tr bgcolor="<?php echo $this->config->item('tr_c_even');?>" id="w_1" style="display:''">
<td class="coltd_szone indentPm">สถานะการทำงาน</td>
<td><?php echo (setValue('aqWorkStatus',$row_ansQn)!="") ? ((setValue('aqWorkStatus',$row_ansQn)=="Y") ? "ตรงวิชาชีพ" : "อาชีพอิสระ") : "-";?></td>
<td class="coltd_szone">วันที่เริ่มทำงาน</td>
<td><?php echo (setValue('aqWorkStartDate',$row_ansQn)=="0000-00-00" || setValue('aqWorkStartDate',$row_ansQn)=="") ? "-" : abbreDate2(setValue('aqWorkStartDate',$row_ansQn));?></td>
</tr>
<tr bgcolor="<?php echo $this->config->item('tr_c_even');?>" id="w_2" style="display:''">
<td class="coltd_szone indentPm">ตำแหน่งในหน่วยงาน</td>
<td colspan="3"><?php echo (setValue('aqWorkPosition',$row_ansQn)!="") ? setValue('aqWorkPosition',$row_ansQn) : "-";?></td>
</tr>
<tr bgcolor="<?php echo $this->config->item('tr_c_even');?>" id="w_3" style="display:''">
<td class="coltd_szone indentPm">อัตราเงินเดือน</td>
<td><?php echo (setValue('aqWorkSalary',$row_ansQn)!="") ? number_format(setValue('aqWorkSalary',$row_ansQn),2) : "-";?> บาท/เดือน</td>
<td class="coltd_szone">อัตราเงินพิเศษ</td>
<td><?php echo (setValue('aqWorkSalarySpe',$row_ansQn)!="") ? number_format(setValue('aqWorkSalarySpe',$row_ansQn),2) : "-";?> บาท/เดือน
<br />(เงินทำงานล่วงเวลา, เงิน พตส., เงินค่าประกอบวิชาชีพ, ค่าเวรบ่าย-ดึก)</td>
</tr>
<tr bgcolor="<?php echo $this->config->item('tr_c_even');?>" id="w_4" style="display:''">
<td class="coltd_szone indentPm">ชื่อหน่วยงาน ภาษาไทย</td>
<td><?php echo (setValue('aqWorkCompanyT',$row_ansQn)!="") ? setValue('aqWorkCompanyT',$row_ansQn) : "-";?></td>
<td class="coltd_szone">ชื่อหน่วยงาน ภาษาอังกฤษ</td>
<td><?php echo (setValue('aqWorkCompanyE',$row_ansQn)!="") ? setValue('aqWorkCompanyE',$row_ansQn) : "-";?></td>
</tr>
<tr bgcolor="<?php echo $this->config->item('tr_c_even');?>" id="w_5" style="display:''">
<td class="coltd_szone indentPm">ที่อยู่ของหน่วยงาน</td>
<td><?php echo (setValue('aqWorkAddress',$row_ansQn)!="") ? setValue('aqWorkAddress',$row_ansQn) : "-";?></td>
<td class="coltd_szone">ตำบล</td>
<td><?php echo (setValue('districtName',$row_ansQn_work)!="") ? setValue('districtName',$row_ansQn_work) : "-";?></td>
</tr>
<tr bgcolor="<?php echo $this->config->item('tr_c_even');?>" id="w_6" style="display:''">
<td class="coltd_szone indentPm">อำเภอ</td>
<td><?php echo (setValue('amphurName',$row_ansQn_work)!="") ? setValue('amphurName',$row_ansQn_work) : "-";?></td>
<td class="coltd_szone">จังหวัด</td>
<td><?php echo (setValue('provinceName',$row_ansQn_work)!="") ? setValue('provinceName',$row_ansQn_work) : "-";?></td>
</tr>
<tr bgcolor="<?php echo $this->config->item('tr_c_even');?>" id="w_7" style="display:''">
<td class="coltd_szone indentPm">รหัสไปรษณีย์</td>
<td><?php echo (setValue('aqWorkZipcode',$row_ansQn)!="0") ? setValue('aqWorkZipcode',$row_ansQn) : "-";?></td>
<td class="coltd_szone">เบอร์โทรศัพท์</td>
<td><?php echo (setValue('aqWorkTelephone',$row_ansQn)!="") ? setValue('aqWorkTelephone',$row_ansQn) : "-";?></td>
<!-- end infowork -->
<tr bgcolor="<?php echo $this->config->item('tr_c_even');?>">
<td class="coltd_szone" colspan="4">
<input type="radio" name="state" id="state" value="3" onClick="checkAnsType(this)" <?php echo setValue('aqStateQn',$row_ansQn)==3 ? "checked disabled" : "disabled";?> /> ศึกษาต่อ
</td>
</tr>
<!-- ###################################### 2 ####################################### -->
<!-- show infoedu -->
<tr bgcolor="<?php echo $this->config->item('tr_c_even');?>" id="e_1" style="display:''">
<td class="coltd_szone indentPm">ชื่อปริญญา</td>
<td><?php echo (setValue('aqDegree',$row_ansQn)=="") ? "-" : setValue('aqDegree',$row_ansQn);?></td>
<td class="coltd_szone">วันที่เริ่มต้นการศึกษา</td>
<td><?php echo (setValue('aqEduStartDate',$row_ansQn)=="0000-00-00" || setValue('aqEduStartDate',$row_ansQn)=="") ? "-" : abbreDate2(setValue('aqEduStartDate',$row_ansQn));?></td>
</tr>
<tr bgcolor="<?php echo $this->config->item('tr_c_even');?>" id="e_2" style="display:''">
<td class="coltd_szone indentPm">สาขาวิชา (คณะ/วิทยาลัย)</td>
<td><?php echo (setValue('aqMajId',$row_ansQn)=="0" || setValue('aqMajId',$row_ansQn)=="") ? "-" : setValue('majoreduName',$row_ansQn);?></td>
<td class="coltd_szone">ระดับการศึกษา</td>
<td><?php echo (setValue('aqLevelId',$row_ansQn)=="0" || setValue('aqLevelId',$row_ansQn)=="") ? "-" : setValue('leveleduName',$row_ansQn);?></td>
</tr>
<tr bgcolor="<?php echo $this->config->item('tr_c_even');?>" id="e_3" style="display:''">
<td class="coltd_szone indentPm">สถาบันการศึกษา</td>
<td colspan="3"><?php echo (setValue('aqEduId',$row_ansQn)=="0" || setValue('aqEduId',$row_ansQn)=="") ? "-" : setValue('educationName',$row_ansQn);?></td>
</tr>
<!-- end infoedu -->
<tr bgcolor="<?php echo $this->config->item('tr_c_even');?>">
<td height="25px" colspan="4"><br /></td>
</tr>
<tr bgcolor="<?php echo $this->config->item('tr_c_even');?>">
<td class="indent" height="25px" colspan="4"><span class="error"><b>ส่วนที่ 3 : การเข้าร่วมพิธีพระราชทานประกาศนียบัตร</b></span></td>
</tr>
<?php
// preAdmitPositionId = 2 : ข้าราชการ, = 3 : ลูกจ้างประจำ
if(setValue('amAnsQn',$row_am)=="N" && (setValue('preAdmitPositionId',$row_am)==2 || setValue('preAdmitPositionId',$row_am)==3)) {
?>
<tr bgcolor="<?php echo $this->config->item('tr_c_even');?>">
<td colspan="4" class="indent"><input type="radio" name="investiture" id="investiture" value="Y" <?php echo set_value('investiture')=="Y" ? "checked" : "";?> /> <b>เข้าร่วม</b>
<input type="radio" name="investiture" id="investiture" value="N" <?php echo set_value('investiture')=="N" ? "checked" : "";?> /> <b>ไม่เข้าร่วม</b>
<?php echo form_error('investiture');?></td>
</tr>
<tr bgcolor="<?php echo $this->config->item('tr_c_even');?>">
<td colspan="4" align="center">
<input type="submit" name="add" id="add" value="บันทึก" />
<input type="hidden" name="alumniId" id="alumniId" value="<?php echo $alumniId;?>" />
<input type="hidden" name="preAdmit" id="preAdmit" value="<?php echo setValue('preAdmitPositionId',$row_am);?>" />
</td>
</tr>
<?php
} else {
?>
<tr bgcolor="<?php echo $this->config->item('tr_c_even');?>">
<td colspan="4" class="coltd_szone"><input type="radio" name="investiture" id="investiture" value="Y" <?php echo setValue('aqInvestiture',$row_ansQn)=="Y" ? "checked disabled" : "disabled";?> /> เข้าร่วม
<input type="radio" name="investiture" id="investiture" value="N" <?php echo setValue('aqInvestiture',$row_ansQn)=="N" ? "checked disabled" : "disabled";?> /> ไม่เข้าร่วม</td>
</tr>
<?php
}
?>
</table><?php echo form_close();?></td>
</tr>
</table>
|