Viewing file:      v_addPracticeHours.php (3.42 KB)      -rwxr-xr-x Select action/file-type:    (+) |   (+) |   (+) | Code (+) | Session (+) |   (+) | SDB (+) |   (+) |   (+) |   (+) |   (+) |   (+) |
 
<?php
 $row_cur = (isset($qu_cur) && $qu_cur!=NULL) ? $qu_cur->row() : NULL;
 ?>
 <table width="100%">
     <tr>
         <td>
             <div align="center">
             <?php echo form_open($this->config->item("rg_folder")."preregis/ph_insert_update", array("name" => "myform", "id" => "myform"));?>
             <table width="100%">
                 <tr>
                     <td class="h">บันทึกจำนวนชั่วโมงฝึกปฏิบัติ</td>
                 </tr>
                 <tr>
                     <td><br /></td>
                 </tr>
                 <tr>
                     <td><table class="szone">
                         <tr bgcolor="<?php echo $tr_color_even;?>">
                             <td class="coltd_szone"><font size="2">หลักสูตร</font></td>
                             <td><font size="2"><?php echo setValue('curName',$row_cur);?></font>
                             <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"><font size="2">ปีการศึกษาที่เข้า</font></td>
                             <td><font size="2"><?php echo $adY;?></font>
                             <input type="hidden" name="adY" id="adY" value="<?php echo $adY;?>"></td>
                         </tr>
                     </table></td>
                 </tr>
                 <tr>
                     <td><br /></td>
                 </tr>
                 <tr>
                     <td colspan="2"><table class="headCol">
                         <tr>
                             <th class="seqCol"><font size="2" color="<?php echo $font_color_table;?>">เลือก</font></th>
                             <th><font color="<?php echo $font_color_table;?>" size="2">ชื่อชั่วโมงฝึกปฏิบัติ</font></th>
                             <th class="hourCol"><font color="<?php echo $font_color_table;?>" size="2">จำนวนชั่วโมงฝึกปฏิบัติ</font></th>
                         </tr>
 <?php
                 $i = 0;
                 if(isset($rs_cp) && $rs_cp->num_rows()) {
                     foreach($rs_cp->result() as $row_cp) {
                         echo "<tr onmouseover=\"bgColor='".$tr_color_even."'\" onmouseout=\"bgColor='".$this->config->item("rg_mouseout")."'\">";
 ?>
                             <td align="center"><input type="checkbox" name="chk<?php echo $i;?>" id="chk<?php echo $i;?>" value="Y" <?php echo ($row_cp->phCpId!=NULL) ? 'checked' : '';?>>
                             <input type="hidden" name="cpId<?php echo $i;?>" id="cpId<?php echo $i;?>" value="<?php echo $row_cp->cpId;?>"></td>
                             <td class="indent"><font size="2"><?php echo explodeSquare($row_cp->cpName);?>
                             <div class="indent"><?php echo explodeSquare($row_cp->cpNameE);?></div></font></td>
                             <td align="center"><input type="text" name="phLabHr<?php echo $i;?>" id="phLabHr<?php echo $i;?>" value="<?php echo setValue('phLabHr',$row_cp);?>" size="2" maxlength="3" class="required-int">
                             <span class="error" style="display:inline;"></span>
                             <br /><?php echo form_error('phLabHr'.$i);?></td>
                         </tr>
 <?php
                         $i++;
                     }
                 } else {
 ?>
                         <tr>
                             <td colspan="3" height="22" align="center"><font size="2" color="<?php echo $font_color_err;?>">** ไม่ปรากฏรายการในฐานข้อมูล **</font></td>
                         </tr>
 <?php
                 }
 ?>
                     </table></td>
                 </tr>
                 <tr>
                     <td colspan="3" align="center"><br />
                     <input type="submit" name="add" value="บันทึก" <?php if($i == 0) echo 'disabled';?>>
                     <input type="reset" name="clear" value="เคลียร์ข้อมูล">
                     
                     <input type="hidden" name="cnt" value="<?php echo $i;?>"></td>
                 </tr>
             </table><?php echo form_close();?></div>
         <br></td>
     </tr>
 </table>
  |