Viewing file:      v_addResultCompsExam.php (5.6 KB)      -rw-r--r-- Select action/file-type:    (+) |   (+) |   (+) | Code (+) | Session (+) |   (+) | SDB (+) |   (+) |   (+) |   (+) |   (+) |   (+) |
 
<?php $row_cur = (isset($qu_cur) && $qu_cur!=NULL) ? $qu_cur->row() : NULL; $row_sy = (isset($qu_sy) && $qu_sy!=NULL) ? $qu_sy->row() : NULL; ?> <script language="JavaScript1.2"> function checkFormat(){     var agree = confirm('กรุณาตรวจสอบข้อมูลผลการสอบรวบยอดของสถาบันพระบรมราชชนก ให้เรียบร้อยก่อนบันทึก ?');     if(agree)         return true;     else         return false; } </script> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">     <tr>         <td>             <div align="center">             <?php echo form_open($this->config->item("rg_folder")."graduate/processResultCompsExam", array("name" => "myform", "id" => "myform"));?>             <table width="100%" align="center" cellpadding="0" cellspacing="1" border="0">                 <tr>                     <td align="center"><span class="h error">การสอบรวบยอดของสถาบันพระบรมราชชนก (บันทึก/แก้ไข)</span></td>                 </tr>                 <tr>                     <td><br /></td>                 </tr>                 <tr>                     <td><table class="szone">                         <tr bgcolor="<?php echo $tr_color_even;?>">                             <td class="coltd_szone">หลักสูตร</td>                             <td><?php echo setValue('curName',$row_cur);?>                             <input type="hidden" name="curId" id="curId" value="<?php echo setValue('curId',$row_cur);?>"></td>                         </tr>                         <tr bgcolor="<?php echo $tr_color_even;?>">                             <td class="coltd_szone">ชั้นปี</td>                             <td><?php echo setValue('syCode',$row_sy);?>                             <input type="hidden" name="syId" id="syId" value="<?php echo setValue('syId',$row_sy);?>"></td>                         </tr>                     </table></td>                 </tr>                 <tr>                     <td><br /></td>                 </tr>                 <tr>                     <td><table class="headCol">                         <tr>                             <th class="seqCol">ลำดับที่</th>                             <th class="stdCodeCol">รหัสนักศึกษา</th>                             <th>ชื่อนักศึกษา</th>                             <th class="hourCol">ผลการสอบ</th>                         </tr> <?php                 $i = 0;                 $check = 0;                 if(isset($rs_std) && $rs_std->num_rows()) {                     foreach($rs_std->result() as $row_std) {                         echo "<tr onmouseover=\"bgColor='".$tr_color_even."'\" onmouseout=\"bgColor='".$this->config->item("rg_mouseout")."'\">"; ?>                             <td align="center" height="22"><?php echo $i+1;?>                             <input type="hidden" name="stdId<?php echo $i;?>" id="stdId<?php echo $i;?>" value="<?php echo $row_std->stdId;?>"></td>                             <td align="center"><?php echo $row_std->stdCode;?></td>                             <td class="indent"><?php echo $row_std->prefixName.$row_std->stdName.' '.$row_std->stdSurname;?></td>                             <td align="center"> <?php                             if($row_std->stdSstId==1) { ?>                             <input type="radio"   id="CompsExam<?php echo $i;?>" name="CompsExam<?php echo $i;?>" value="N" <?php if(setValue('CompsExam',$row_std)=='N') echo 'checked';?> /> ไม่ผ่าน                             <?php $pass = array('P','G','E'); ?>                             <input type="radio"   id="CompsExam<?php echo $i;?>" name="CompsExam<?php echo $i;?>" value="P"  <?php if(in_array($row_std->CompsExam,$pass)) echo 'checked'?>  /> ผ่าน <?php                                 $check++;                             } else                                 echo '-'; ?>                             </td>                             <!--<td>                             <?php echo $row_std->CompsExam ?>                                 <select  style="width:100%;background-color:DarkGray;display:none;" id="SelectCompsExam<?php echo $i;?>"  disabled  name="CompsExam<?php echo $i;?>" >                                     <option value="N"  <?php echo $row_std->CompsExam == 'N' || $row_std->CompsExam == ''  ? 'selected':null;?>>-</option>                                     <option value="P" <?php echo $row_std->CompsExam == 'P' ? 'selected':null;?>>                                          Pass                                     </option>                                     <option value="G"  <?php echo $row_std->CompsExam == 'G' ? 'selected':null;?>>                                          Good                                     </option>                                     <option value="E"  <?php echo $row_std->CompsExam == 'E' ? 'selected':null;?>>                                          Excellence                                     </option>                                 </select>                             </td>    -->                                             </tr> <?php                         $i++;                     }                 } else { ?>                         <tr>                             <td height="22" colspan="4" align="center"><span class="error">** ไม่ปรากฏรายการข้อมูลนักศึกษาในหลักสูตรหรือท่านอาจจะดำเนินการในส่วนนี้แล้ว **</span></td>                         </tr> <?php                 } ?>                     </table></td>                 </tr>                 <tr>                     <td align="right">รวม <?php echo $i;?> รายการ</td>                 </tr>                 <tr>                     <td align="center"><br><input type="submit" name="edit" value="บันทึก" onClick="return checkFormat()" <?php if($check==0) { echo 'disabled';}?> />                     <input type="reset" name="clear" value="เคลียร์ข้อมูล" <?php if($check==0) { echo 'disabled';}?> />                     <input type="button" name="cancel" value="ยกเลิก" onClick="location.href ='<?php echo site_url($this->config->item('rg_folder').'graduate/searchResultCompsExam');?>'">                     <input type="hidden" name="cnt" id="cnt" value="<?php echo $i;?>" /></td>                 </tr>             </table><?php echo form_close();?></div>         <br></td>     </tr> </table>
  <script>   handdleCompsExam = (IdSelect,check)=>{     if(check){         document.getElementById('SelectCompsExam'+IdSelect).disabled = true;         document.getElementById('SelectCompsExam'+IdSelect).style.backgroundColor  = 'DarkGray';         document.getElementById('SelectCompsExam'+IdSelect).value = 'N';      }else{         document.getElementById('SelectCompsExam'+IdSelect).disabled = false;          document.getElementById('SelectCompsExam'+IdSelect).style.backgroundColor  = 'white';         document.getElementById('SelectCompsExam'+IdSelect).value = 'P';      }   } </script>
  |