Viewing file: v_editWeekDate.php (4.11 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<script>
function chanceAcY(wdAcY) {
document.getElementById("wdAcY").value=wdAcY;
document.getElementById("myform").action = "wd_edit";
document.getElementById("myform").submit();
}
</script>
<table width="100%">
<tr>
<td>
<div align="center">
<?php echo form_open($this->config->item("rg_folder")."bdcollege/wd_edit_update", array("name" => "myform", "id" => "myform"));?>
<table width="100%">
<tr>
<td colspan="2" align="center" class="h error">แก้ไข</td>
</tr>
<tr>
<td><font size="2"><b>ปีการศึกษา</b></font>
<?php
$js1 = "id=\"wdAcY\" onChange=\"sendPost('hidform', {'wdAcY':this.value},'".site_url($this->config->item('rg_folder').'bdcollege/wd_edit')."')\"";
echo form_dropdown('wdAcY', $rs_tmc, set_value('wdAcY',$acY), $js1);
?>
</td>
</tr>
<tr>
<td><table class="headCol">
<tr>
<th class="stdCodeCol"><font size="2" color="<?php echo $font_color_table;?>">สัปดาห์</font></th>
<th class="domAmtCol"><font size="2" color="<?php echo $font_color_table;?>">ภาคการศึกษา</font></th>
<th class="domCol"><font size="2" color="<?php echo $font_color_table;?>">สัปดาห์ (ภาคการศึกษา)</font></th>
<th><font size="2" color="<?php echo $font_color_table;?>">วันที่เริ่มต้น</font></th>
<th><font size="2" color="<?php echo $font_color_table;?>">วันที่สิ้นสุด</font></th>
</tr>
<?php
$i = 0;
if(isset($rs_wd) && $rs_wd->num_rows()) {
foreach($rs_wd->result() as $row_wd) {
echo "<tr onmouseover=\"bgColor='".$tr_color_even."'\" onmouseout=\"bgColor='".$this->config->item("rg_mouseout")."'\">";
?>
<td align="center"><font size="2"><?php echo $row_wd->wdAcYWeekNo;?></font>
<input type="hidden" name="wdAcYWeekNo<?php echo $i;?>" value="<?php echo $row_wd->wdAcYWeekNo;?>" /></td>
<td align="center">
<input type="text" name="wdTmId<?php echo $i;?>" id="wdTmId<?php echo $i;?>" value="<?php echo $row_wd->wdTmId;?>" size="5" maxlength="1" class="required-int" />
<font size="2" color="<?php echo $font_color_err;?>">
<br /><?php echo form_error('wdTmId'.$i);?></font></td>
<td align="center">
<input type="text" name="wdTmWeekNo<?php echo $i;?>" id="wdTmWeekNo<?php echo $i;?>" value="<?php echo $row_wd->wdTmWeekNo;?>" size="2" maxlength="2" class="required-int" />
<font size="2" color="<?php echo $font_color_err;?>">
<br /><?php echo form_error('wdTmWeekNo'.$i) ?></font></td>
<td align="center"><font size="2"><?php echo abbreDate2($row_wd->wdFrDate);?></font>
<input type="hidden" name="wdFrDate<?php echo $i;?>" value="<?php echo $row_wd->wdFrDate;?>"></td>
<td align="center"><font size="2" ><?php echo abbreDate2($row_wd->wdToDate);?></font>
<input type="hidden" name="wdToDate<?php echo $i;?>" value="<?php echo $row_wd->wdToDate;?>"></td>
</tr>
<?php
$i++;
}
} else {
?>
<tr>
<td colspan="5" align="center"><font size="2" color="<?php echo $font_color_err;?>">** ไม่ปรากฏรายการในฐานข้อมูล **</font></</td>
</tr>
<?php
}
?>
</table></td>
</tr>
<?php
if(isset($rs_wd) && $rs_wd->num_rows()) {
?>
<tr>
<td colspan="5" align="center">
<input type="submit" name="edit" id="edit" value="แก้ไข" />
<input type="reset" name="clear" value="เคลียร์ข้อมูล" />
<input type="button" name="cancel" value="ยกเลิก" onClick="location.href = '<?php echo site_url($this->config->item('rg_folder').'bdcollege/wd_input');?>'">
<input type="hidden" name="cnt" value="<?php echo $i;?>"></td>
</tr>
<?php
}
?>
</table><?php echo form_close();?></div>
<br><font size="2" color="<?php echo $font_color_err;?>"><b>หมายเหตุ : </b>* หมายถึง ต้องกรอกข้อมูลให้สมบูรณ์</font></td>
</tr>
</table>
|