Viewing file:      v_editStdMBHis3.php (5.17 KB)      -rwxr-xr-x Select action/file-type:    (+) |   (+) |   (+) | Code (+) | Session (+) |   (+) | SDB (+) |   (+) |   (+) |   (+) |   (+) |   (+) |
 
<?php
 $row_cfg = (isset($qu_cfg) && $qu_cfg->num_rows()) ? $qu_cfg->row() : NULL;
 $row_std = (isset($qu_std) && $qu_std->num_rows()) ? $qu_std->row() : NULL;
 ?>
 <table width="100%" border="0">
     <tr>
         <td><table class="szone">
         <?php echo form_open($this->config->item("rg_folder")."studenthis/std_insertStdMBHis3", array("name" => "myform", "id" => "myform"));?>
             <tr bgcolor="<?php echo setValue('cfgBgClSwapTr',$row_cfg);?>">
                 <td colspan="2" height="25" align="center"><span class="h error">เพิ่มประวัติการลา/ขาด</span></td>
             </tr>
             <tr bgcolor="<?php echo setValue('cfgBgClSwapTr',$row_cfg);?>">
                 <td class="coltd_szone">ปีการศึกษา (พ.ศ.)</td>
                 <td><input type="text" name="sabAcY" id="sabAcY" value="<?php echo set_value('sabAcY',$acY);?>" size="5" maxlength="4" class="required-int" />
                 <span class="error">*<?php echo form_error('sabAcY');?></span></td>
             </tr>
             <tr bgcolor="<?php echo setValue('cfgBgClSwapTr',$row_cfg);?>">
                 <td class="coltd_szone">ชั้นปี</td>
                 <td>
 <?php
                 echo form_dropdown('sabSyId', $rs_sy, set_value('sabSyId'));
 ?>
                 <span class="error"><?php echo form_error('sabSyId');?></span></td>
             </tr>
             <tr bgcolor="<?php echo setValue('cfgBgClSwapTr',$row_cfg);?>">
                 <td class="coltd_szone">ประเภทการลา/ขาด</td>
                 <td>
 <?php
                 echo form_dropdown('sabCause', $rs_absentCause, set_value('sabCause'));
 ?>
                 <span class="error"><?php echo form_error('sabCause');?></span></td>
             </tr>
             <tr bgcolor="<?php echo setValue('cfgBgClSwapTr',$row_cfg);?>">
                 <td class="coltd_szone">วันที่เริ่ม</td>
                 <td><script>DateInput('sabFrDate', true, 'DD/MM/YYYY', '<?php echo (set_value("sabFrDate")=="") ? getNowDateFw2() : set_value("sabFrDate");?>');</script>
                 <?php echo form_error('sabFrDate');?></td>
             </tr>
             <tr bgcolor="<?php echo setValue('cfgBgClSwapTr',$row_cfg);?>">
                 <td class="coltd_szone">วันที่สิ้นสุด</td>
                 <td><script>DateInput('sabToDate', true, 'DD/MM/YYYY', '<?php echo (set_value("sabToDate")=="") ? getNowDateFw2() : set_value("sabToDate");?>');</script>
                 <?php echo form_error('sabToDate');?></td>
             </tr>
             <tr bgcolor="<?php echo setValue('cfgBgClSwapTr',$row_cfg);?>">
                 <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="tab" id="tab" value="<?php echo $tab;?>" />
                 <input type="hidden" name="stdId" id="stdId" value="<?php echo $stdId;?>" />
                 <input type="hidden" name="stdAdY" id="stdAdY" value="<?php echo setValue('stdAdY',$row_std);?>" /></td>
             </tr>
         <?php echo form_close();?></table></td>
     </tr>
     <tr>
         <td><br /></td>
     </tr>
     <tr>
         <td><table class="headCol">
             <tr>
                 <th colspan="7">แสดงประวัติการลา/ขาด</th>
             </tr>
             <tr>
                 <th class="seqCol">ลำดับที่</th>
                 <th class="hourCol">ปีการศึกษา</th>
                 <th class="editCol">ชั้นปี</th>
                 <th>ประเภทการลา/ขาด</th>
                 <th class="hourCol">วันที่เริ่ม</th>
                 <th>วันที่สิ้นสุด</th>
                 <th class="deleteCol">ลบ</th>
             </tr>
 <?php
     $i = 0;
     if(isset($rs_sab) && $rs_sab->num_rows()) {
         foreach($rs_sab->result() as $row) {
             echo "<tr onmouseover=\"bgColor='".setValue('cfgBgClSwapTr',$row_cfg)."'\" onmouseout=\"bgColor='".$this->config->item("rg_mouseout")."'\">";
 ?>
                 <td align="center"><?php echo $i+1;?></td>
                 <td align="center"><?php echo $row->sabAcY;?></td>
                 <td align="center"><?php echo $row->syCode;?></td>
                 <td class="indent">
 <?php
                 if($row->sabCause==1) 
                     echo "ลาป่วย";
                 else if($row->sabCause==2)
                     echo "ลากิจ";
                 else if($row->sabCause==3)
                     echo "ขาดเรียน";
 ?>
                 </td>
                 <td align="center"><?php echo abbreDate2($row->sabFrDate);?></td>
                 <td align="center"><?php echo abbreDate2($row->sabToDate);?></td>
                 <td align="center">
                 <span onClick="confirmDel2({sabStdId:<?php echo $row->sabStdId;?>, sabSeq:<?php echo $row->sabSeq;?>, tab:<?php echo $tab;?>}, 'm_form1','<?php echo site_url($this->config->item('rg_folder').'studenthis/std_deleteStdMBHis3');?>')" /><img src="<?php echo base_url().$this->config->item('rg_delete');?>" align="absmiddle" border="0" width="16" height="19" class="hand"/></span></td>
 <?php
             $i++;
         }
     } else {
 ?>
             <tr>
                 <td colspan="7" align="center"><span class="error">** ไม่ปรากฎรายการประวัติด้านการศึกษาในฐานข้อมูล **</span></td>
             </tr>
 <?php
     }
 ?>
         </table></td>
     </tr>
     <tr>
         <td align="right">รวม <?php echo $i;?> รายการ</td>
     </tr>
     <tr>
         <td><br /></td>
     </tr>
     <tr>
         <td class="error"><b>หมายเหตุ</b> : * หมายถึง ต้องกรอกข้อมูลให้สมบูรณ์</td>
     </tr>
 </table>
  |