Viewing file:      v_addWeekDate.php (5.04 KB)      -rwxr-xr-x Select action/file-type:    (+) |   (+) |   (+) | Code (+) | Session (+) |   (+) | SDB (+) |   (+) |   (+) |   (+) |   (+) |   (+) |
 
<?php $row_tmc = (isset($qu_tmc) && $qu_tmc!=NULL) ? $qu_tmc->row() : NULL; $frDate = ($row_tmc!=NULL) ? splitDateDb2($row_tmc->tmcFrDate,'/') : ''; ?> <table width="100%" align="center">     <tr>         <td>             <div align="center">             <table width="100%" border="0">                 <tr>                     <td colspan="2" align="center" class="h error">ข้อมูลวันในสัปดาห์</td>                 </tr>                 <tr>                     <td align="right"> <?php                     echo anchor_popup($this->config->item("rg_folder")."bdcollege/wd_print", "<img src=\"".base_url().$this->config->item('rg_print')."\" width=\"15\" height=\"14\" align=\"absmiddle\" border=\"0\" />"); ?>                     </td>                 </tr>                 <tr>                     <td><?php echo form_open($this->config->item("rg_folder")."bdcollege/wd_insert_update", array("name" => "myform", "id" => "myform"));?>                         <table class="szone">                         <tr bgcolor="<?php echo $tr_color_even;?>">                             <td class="coltd_szone2"><font size="2">ปีการศึกษา</font></td>                             <td> <?php                             $js1 = "id=\"acY\" onChange=\"sendPost('hidform', {'acY':this.value},'".site_url($this->config->item('rg_folder').'bdcollege/wd_input')."')\"";                             echo form_dropdown("acY", $rs_tmc, set_value('tmcAcY',$acY), $js1); ?>                             </td>                         </tr>                         <tr bgcolor="<?php echo $tr_color_even;?>">                             <td class="coltd_szone2"><font size="2">ภาคการศึกษา</font></td>                             <td>1                             <input type="hidden" name="tmId" id="tmId" value="<?php echo 1;?>" /></td>                         </tr>                         <tr bgcolor="<?php echo $tr_color_even;?>">                             <td class="coltd_szone2"><font size="2">วันที่เริ่มต้นภาคการศึกษา</font></td>                             <td><?php echo fullDate2(setValue('tmcFrDate',$row_tmc));?>                             <input type="hidden" name="tmcFrDate" id="tmcFrDate" value="<?php echo setValue('tmcFrDate',$row_tmc);?>" /></td>                         </tr>                         <tr bgcolor="<?php echo $tr_color_even;?>">                             <td class="coltd_szone2"><font size="2">วันที่เริ่มต้น</font></td>                             <td><script>DateInput('wdFrDate', true, 'DD/MM/YYYY', '<?php echo set_value("wdFrDate",$frDate);?>');</script>                             <?php echo form_error('wdFrDate');?></td>                         </tr>                         <tr bgcolor="<?php echo $tr_color_even;?>">                             <td class="coltd_szone2"><font size="2">จำนวนสัปดาห์ที่เปิดสอน</font></td>                             <td><input type="text" name="wdNum" id="wdNum" value="52" size="4" /> สัปดาห์                             <?php echo form_error('wdNum');?></td>                         </tr>                                                 <tr bgcolor="<?php echo $tr_color_even;?>">                             <td colspan="2" align="center"> <?php                             $lnk = "<input type=\"submit\" id=\"add\" name=\"add\" value=\"บันทึก\" />";                             echo $oCRUD->CRUD($lnk, 'C'); ?>                             <input type="reset" name="clear" id="clear" value="เคลียร์ข้อมูล" /></td>                         </tr>                     </table><?php echo form_close();?></td>                 </tr>                 <tr><td><br/></td></tr>                 <tr>                     <td><table class="headCol">                         <tr>                             <th class="seqCol"><font size="2" color="<?php echo $font_color_table;?>">ลำดับที่</font></th>                             <th><font size="2" color="<?php echo $font_color_table;?>">ปีการศึกษา</font></th>                             <th class="editCol"><font size="2" color="<?php echo $font_color_table;?>">แก้ไข</font></th>                             <th class="deleteCol"><font size="2" color="<?php echo $font_color_table;?>">ลบ</font></th>                         </tr> <?php                 $i = 0;                 if(isset($arr) && count($arr)) {                     foreach($arr as $key => $val) {                         echo "<tr onmouseover=\"bgColor='".$tr_color_even."'\" onmouseout=\"bgColor='".$this->config->item("rg_mouseout")."'\">"; ?>                             <td align="center"><font size="2"><?php echo $i+1;?></font></td>                             <td class="indent"><font size="2"><?php echo $arr[$key]['wd']->wdAcY;?></font></td>                             <td align="center"> <?php                             $lnk = "<span class=\"hand\" onClick=\"sendPost('hidform', {'wdAcY':".$arr[$key]['wd']->wdAcY."}, 'wd_edit')\"><img src=\"".base_url().$this->config->item("rg_edit")."\" align=\"absmiddle\" border=\"0\" /></span>";                             echo $oCRUD->CRUD($lnk, 'U'); ?>                                                         </td>                             <td align="center"> <?php                             if($arr[$key]['del']==0) {
                              $lnk = "<span class=\"hand\" onClick=\"confirmDel2({'wdAcY':".$arr[$key]['wd']->wdAcY."}, 'm_form1', 'wd_delete')\" /><img src=\"".base_url().$this->config->item("rg_delete")."\" align=\"absmiddle\" border=\"0\" width=\"16\" height=\"19\" /></span>";                             echo $oCRUD->CRUD($lnk, 'D');
                              } else { ?>                             <img src="<?php echo base_url().$this->config->item("rg_deleted");?>" align="absmiddle" border="0" width="16" height="19" /> <?php                             } ?>                             </td>                         </tr> <?php                         $i++;                     }                 } ?>                     </table></td>                 </tr>                 <tr>                     <td align="right">รวม <?php echo $i;?> รายการ</td>                 </tr>             </table></div>         <font size="2" color="<?php echo $font_color_err;?>"><b>หมายเหตุ : </b>วันที่เริ่มต้น ต้องเลือกวันจันทร์เท่านั้น</font></td>     </tr> </table>
  |