Viewing file:      v_showTransferCo.php (6.63 KB)      -rwxr-xr-x Select action/file-type:    (+) |   (+) |   (+) | Code (+) | Session (+) |   (+) | SDB (+) |   (+) |   (+) |   (+) |   (+) |   (+) |
 
<script>
 function checkFormat() {
     if(confirm("กรุณาตรวจสอบข้อมูลให้เรียบร้อยก่อนบันทึก !!"))
         return true ;
     else
         return false ;
 }
 </script>
 <?php
 $row_std = (isset($qu_std) && $qu_std) ? $qu_std->row() : NULL;
 ?>
 <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
     <tr>
         <td>
             <div align="center"><br>
             <table width="100%" align="center" border="0" cellpadding="0" cellspacing="1">
                 <tr><?php echo form_open($this->config->item("rg_folder")."student/std_addTstCo", array("name" => "myform", "id" => "myform"));?>
 
                     <td><b>รหัสนักศึกษา</b>
                     <input type="text" name="stdCode" id="stdCode" size="10" value="<?php echo set_value('stdCode');?>" maxlength="10" class="required-int" >
                     <input type="submit" name="search" value="ค้นหา">
                     <span class="error"><?php echo form_error('stdCode');?></span></td>
 <?php
                 echo form_close();
 ?>
                 </tr>
                 <tr>
                     <td><br /></td>
                 </tr>
 <?php
                 if(isset($qu_std)) {
 ?>
                 <tr>
                 <?php echo form_open($this->config->item("rg_folder")."student/std_processTstCo", array("name" => "form", "id" => "form"));?>
                     <td><table class="szone">
                         <tr bgcolor="<?php echo $tr_color_even;?>">
                             <td class="coltd_szone">รหัสนักศึกษา</td>
                             <td><?php echo setValue('stdCode',$row_std);?>
                             <input type="hidden" name="stdId" id="stdId" value="<?php echo setValue('stdId',$row_std);?>">
                             <input type="hidden" name="stdCode" id="stdCode" value="<?php echo setValue('stdCode',$row_std);?>" /></td>
                             <td class="coltd_szone">ชื่อ-นามสกุล</td>
                             <td><?php echo setValue('prefixName',$row_std).setValue('stdName',$row_std).' '.setValue('stdSurname',$row_std);?></td>
                         </tr>
                         <tr bgcolor="<?php echo $tr_color_even;?>">
                             <td class="coltd_szone">หลักสูตร</td>
                             <td><?php echo setValue('curName',$row_std);?>
                             <input type="hidden" name="curId" id="curId" value="<?php echo setValue('curId',$row_std);?>"></td>
                             <td class="coltd_szone">ชั้นปี</td>
                             <td><?php echo setValue('syCode',$row_std);?>
                             <input type="hidden" name="syId" id="syId" value="<?php echo setValue('syId',$row_std);?>" /></td>
                         </tr>
                         <tr bgcolor="<?php echo $tr_color_even;?>">
                             <td class="coltd_szone">ปีการศึกษา</td>
                             <td><?php echo $acY;?></td>
                             <td class="coltd_szone">ภาคการศึกษา</td>
                             <td><?php echo $tmId;?></td>
                         </tr>
                     </table></td>
                 </tr>
                 <tr>
                     <td><br /></td>
                 </tr>
                 <tr>
                     <td><table class="headCol">
                         <tr>
                             <th>เลือก</th>
                             <th>รหัสรายวิชา</th>
                             <th>ชื่อรายวิชา</th>
                             <th>หน่วยกิต</th>
                             <th>ภาค/ปีการศึกษา</th>
                             <th>ชั้นปี</th>
                             <th>เกรด</th>
                         </tr>
 <?php                
             $i = 1;
             if(isset($arr)) {
                 foreach($arr as $key => $value) {
                         echo "<tr onmouseover=\"bgColor='".$tr_color_even."'\" onmouseout=\"bgColor='".$this->config->item("rg_mouseout")."'\">";
 ?>
                             <td align="center"><input type="checkbox" name="order<?php echo $i;?>" value="Y" <?php if($arr[$key]['flgRd']) echo 'checked';?> />
                             <input type="hidden" name="coId<?php echo $i;?>" value="<?php echo $arr[$key]['qu_crs']->row()->coId;?>"></td>
                             <td class="indent"><?php echo $arr[$key]['qu_crs']->row()->crsCode;?></td>
                             <td class="indent"><?php echo $arr[$key]['qu_crs']->row()->crsName;?>
                             <input type="hidden" name="acY<?php echo $i;?>" value="<?php echo $arr[$key]['qu_crs']->row()->coAcY;?>">
                             <input type="hidden" name="tm<?php echo $i;?>" value="<?php echo $arr[$key]['qu_crs']->row()->coTmId;?>">
                             <input type="hidden" name="sy<?php echo $i;?>" value="<?php echo $arr[$key]['qu_crs']->row()->coSyId;?>">
                             <input type="hidden" name="creditAttempt<?php echo $i;?>" value="<?php echo $arr[$key]['qu_crs']->row()->crsCreditTotal;?>">
                             <input type="hidden" name="credit1<?php echo $i;?>" value="<?php echo $arr[$key]['qu_crs']->row()->crsCredit1;?>">
                             <input type="hidden" name="credit2<?php echo $i;?>" value="<?php echo $arr[$key]['qu_crs']->row()->crsCredit2;?>">
                             <input type="hidden" name="coCdId1<?php echo $i;?>" value="<?php echo $arr[$key]['qu_crs']->row()->coCdId1;?>">
                             <input type="hidden" name="coCdId2<?php echo $i;?>" value="<?php echo $arr[$key]['qu_crs']->row()->coCdId2;?>">
 <?php
                             if($arr[$key]['flgRd']) {
 ?>
                             <input type="hidden" name="sequence<?php echo $i;?>" value="<?php echo $arr[$key]['qu_rd']->row()->rdSeq;?>">
 <?php
                             } else {
 ?>
                             <input type="hidden" name="sequence<?php echo $i;?>" value="1">
 <?php
                             }
 ?>
                             </td>
                             <td align="center"><?php echo $arr[$key]['qu_crs']->row()->crsUnit;?></td>
                             <td align="center"><?php echo $arr[$key]['qu_crs']->row()->coTmId.'/'.$arr[$key]['qu_crs']->row()->coAcY;?></td>
                             <td align="center"><?php echo $arr[$key]['qu_crs']->row()->coSyId;?></td>
                             <td align="center">
 <?php
                             if($acCPTransferClass=='Y') {
                                 echo "CP";
 ?>
                             <input type="hidden" name="rdGrade<?php echo $i;?>" id="rdGrade<?php echo $i;?>" value="CP">
 <?php
                             } else {
                                 echo form_dropdown('rdGrade'.$i, $rs_grd, setValue('rdGrade', $arr[$key]['qu_rd']->row()));
                             }
 ?>
                             </td>
                         </tr>
 <?php
                     $i++;
                 }
             } else {
 ?>
                         <tr>
                             <td colspan="7" align="center"><span class="error">** ไม่ปรากฏรายวิชาที่เปิดสอนในฐานข้อมูล **</span></td>
                         </tr>
 <?php
             }
 ?>
                         <tr bgcolor="<?php echo $this->config->item("rg_head_tb_headCol");?>">
                             <td height="22" colspan="3" align="right"><b>รวมหน่วยกิต</b></td>
                             <td align="center"><?php echo number_format($sumCredit);?></td>
                             <td colspan="3"></td>
                         </tr>
                     </table></td>
                 </tr>
                 <tr>
                     <th><br><input type="submit" name="add" value="บันทึก" onClick="return checkFormat()"/>
                     <input type="reset" name="clear" value="เคลียร์ข้อมูล">
                     <input type="hidden" name="cnt" id="cnt" value="<?php echo $i-1;?>"></td>
                 </tr>
 <?php
                 }
 
                 if(isset($err_msg)) {
 ?>
                 <tr>
                     <th><span class="error"><?php echo $err_msg;?></span></td>
                 </tr>
 <?php
                 echo form_close();
                 }
 ?>                
             </table></div>
         <br></td>
     </tr>
 </table>
  |