Viewing file: v_addSchedule_b.php (15.61 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<script language="JavaScript1.2"> function checkEdit() { var f = document.myform; f.submit(); } </script> <?php $row_sd = (isset($qu_sd) && $qu_sd!=NULL) ? $qu_sd->row() : NULL; $row_tmc = (isset($qu_tmc) && $qu_tmc!=NULL) ? $qu_tmc->row() : NULL; $tmcFrDate = ($row_tmc!=NULL) ? splitDateDb2(setValue('tmcFrDate',$row_tmc),'/') : ''; $tmcToDate = ($row_tmc!=NULL) ? splitDateDb2(setValue('tmcToDate',$row_tmc),'/') : '';
if($row_sd!=NULL) { $sdSDate = splitDateDb2($row_sd->sdSDate,'/'); $sdEDate = splitDateDb2($row_sd->sdEDate,'/'); $sdRegSDate = splitDateDb2($row_sd->sdRegSDate,'/'); $sdRegEDate = splitDateDb2($row_sd->sdRegEDate,'/'); $sdAddWithdrawSDate = splitDateDb2($row_sd->sdAddWithdrawSDate,'/'); $sdAddWithdrawEDate = splitDateDb2($row_sd->sdAddWithdrawEDate,'/'); $sdPaySDate = splitDateDb2($row_sd->sdPaySDate,'/'); $sdPayEDate = splitDateDb2($row_sd->sdPayEDate,'/'); $sdMidExamSDate = splitDateDb2($row_sd->sdMidExamSDate,'/'); $sdMidExamEDate = splitDateDb2($row_sd->sdMidExamEDate,'/'); $sdFinalExamSDate = splitDateDb2($row_sd->sdFinalExamSDate,'/'); $sdFinalExamEDate = splitDateDb2($row_sd->sdFinalExamEDate,'/'); $sdSendGradeEDate = splitDateDb2($row_sd->sdSendGradeEDate,'/'); } else { $sdSDate = ''; $sdEDate = ''; $sdRegSDate = ''; $sdRegEDate = ''; $sdAddWithdrawSDate = ''; $sdAddWithdrawEDate = ''; $sdPaySDate = ''; $sdPayEDate = ''; $sdMidExamSDate = ''; $sdMidExamEDate = ''; $sdFinalExamSDate = ''; $sdFinalExamEDate = ''; $sdSendGradeEDate = ''; } ?>
<table width="100%" align="center"> <tr> <td> <div align="center"> <table width="100%" border="0"> <tr> <td colspan="3" align="center" class="h error">ข้อมูลปฏิทินการศึกษา</td> </tr> <tr> <td><br /></td> </tr> <?php echo form_open($this->config->item("rg_folder")."bdcollege/sd_insert_update", array("name" => "myform", "id" => "myform"));?> <tr> <td><font size="2"><b>ปีการศึกษา : <?php $js1 = "id=\"acY\" onChange=\"sendPost('hidform', {'acY':this.value,'tmId':".$tmId."}, '".site_url($this->config->item('rg_folder').'bdcollege/sd_input')."')\""; echo form_dropdown('acY', $rs_tmc, set_value('acY',$acY), $js1); ?> ภาคการศึกษา :</b></font> <?php $js2 = "id=\"tmId\" onChange=\"sendPost('hidform', {'tmId':this.value,'acY':".$acY."}, '".site_url($this->config->item('rg_folder').'bdcollege/sd_input')."')\""; echo form_dropdown('tmId', $rs_tm, set_value('tmId',$tmId), $js2); ?> </td> <td align="right"> <?php //echo anchor_popup($this->config->item("rg_folder")."bdcollege/sd_print", "<img src=\"".base_url().$this->config->item("rg_print")."\\" width=\"15\" height=\"14\" align=\"absmiddle\" border=\"0\" />"); ?> </td> </tr> <tr> <td></td> </tr> <tr align='center'> <td colspan="3"><table class="szone"> <tr bgcolor="<?php echo $this->config->item('rg_head_tb_headCol');?>" height="25"> <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><font color="<?php echo $font_color_table;?>" size="2">วันที่เริ่ม</font></th> <th><font color="<?php echo $font_color_table;?>" size="2">วันที่สิ้นสุด</font></th> </tr> <?php if($row_sd!=NULL && empty($edit)) { // แก้ไขข้อมูลปฏิทิน ?> <tr bgcolor="<?php echo $tr_color_even;?>" height="22"> <td></td> <td class="indent"><font size="2">วันเปิดภาคการศึกษา สบช.</font></td> <td align="center"><font size="2"><?php echo abbreDate($tmcFrDate,'/');?></font> <input type="hidden" name="tmcFrDate" id="tmcFrDate" value="<?php echo $tmcFrDate;?>" /></td> <td align="center">-</td> </tr> <tr bgcolor="<?php echo $tr_color_even;?>" height="25"> <td align="center">1</td> <td class="indent"><font size="2">วันเปิดภาคการศึกษา</font></td> <td align="center"><?php echo abbreDate2(setValue('sdSDate',$row_sd));?></td> <td align="center">-</td> </tr> <tr bgcolor="<?php echo $tr_color_even;?>" height="25"> <td align="center">2</td> <td class="indent"><font size="2">ลงทะเบียนเรียน</font></td> <td align="center"><?php echo abbreDate2(setValue('sdRegSDate',$row_sd));?></td> <td align="center"><?php echo abbreDate2(setValue('sdRegEDate',$row_sd));?></td> </tr> <tr bgcolor="<?php echo $tr_color_even;?>" height="25"> <td align="center">3</td> <td class="indent"><font size="2">เพิ่ม-ถอนรายวิชา<br />(หลังวันสิ้นสุดช่วงลงทะเบียนเรียน)</font></td> <td align="center"><?php echo abbreDate2(setValue('sdAddWithdrawSDate',$row_sd));?></td> <td align="center"><?php echo abbreDate2(setValue('sdAddWithdrawEDate',$row_sd));?></td> </tr> <tr bgcolor="<?php echo $tr_color_even;?>" height="25"> <td align="center">4</td> <td class="indent"><font size="2">ชำระค่าลงทะเบียนเรียน</font></td> <td align="center"><?php echo abbreDate2(setValue('sdPaySDate',$row_sd));?></td> <td align="center"><?php echo abbreDate2(setValue('sdPayEDate',$row_sd));?></td> </tr> <tr bgcolor="<?php echo $tr_color_even;?>" height="25"> <td align="center">5</td> <td class="indent"><font size="2">ช่วงสอบกลางภาค</font></td> <td align="center"><?php echo abbreDate2(setValue('sdMidExamSDate',$row_sd));?></td> <td align="center"><?php echo abbreDate2(setValue('sdMidExamEDate',$row_sd));?></td> </tr> <tr bgcolor="<?php echo $tr_color_even;?>" height="25"> <td align="center">6</td> <td class="indent"><font size="2">ช่วงสอบปลายภาค</font></td> <td align="center"><?php echo abbreDate2(setValue('sdFinalExamSDate',$row_sd));?></td> <td align="center"><?php echo abbreDate2(setValue('sdFinalExamEDate',$row_sd));?></td> </tr> <tr bgcolor="<?php echo $tr_color_even;?>" height="25"> <td align="center">7</td> <td class="indent"><font size="2">ช่วงส่งเกรดนักศึกษา</font></td> <td align="center"><font size="2"><?php echo abbreDate2(setValue('sdFinalExamSDate',$row_sd));?></font></td> <td align="center"><?php echo abbreDate2(setValue('sdSendGradeEDate',$row_sd));?></td> </tr> <tr bgcolor="<?php echo $tr_color_even;?>" height="25"> <td align="center">8</td> <td class="indent"><font size="2">วันปิดภาคการศึกษา</font></td> <td align="center"><?php echo abbreDate2(setValue('sdEDate',$row_sd));?></td> <td align="center">-</td> </tr> <tr bgcolor="<?php echo $tr_color_even;?>" height="25"> <td align="center"></td> <td class="indent"><font size="2">วันปิดภาคการศึกษา สบช.</font></td> <td align="center"><font size="2"><?php echo abbreDate2(setValue('tmcToDate',$row_tmc));?></font> <input type="hidden" name="tmcToDate" id="tmcToDate" value="<?php echo splitDateDb2(setValue("tmcToDate",$row_tmc),'/');?>" /></td> <td align="center">-</td> </tr> <tr bgcolor="<?php echo $tr_color_even;?>"> <td colspan="4" align="center"> <?php $lnk = "<input type=\"submit\" id=\"edit\" name=\"edit\" value=\"แก้ไข\" onClick=\"checkEdit()\" />"; echo $oCRUD->CRUD($lnk, 'U'); ?> <input type="reset" name="clear" id="clear" value="เคลียร์ข้อมูล" /> </td> </tr> <?php } else { // สำหรับปีที่ยังไม่ได้เพิ่มการจัดข้อมูลปฏิทิน if($row_tmc!=NULL) { ?> <tr bgcolor="<?php echo $tr_color_even;?>" height="22"> <td></td> <td class="indent"><font size="2">วันเปิดภาคการศึกษา สบช.</font></td> <td align="center"><font size="2"><?php echo abbreDate($tmcFrDate,'/');?></font> <input type="hidden" name="tmcFrDate" id="tmcFrDate" value="<?php echo $tmcFrDate;?>" /></td> <td align="center">-</td> </tr> <tr bgcolor="<?php echo $tr_color_even;?>" height="25"> <td align="center">1</td> <td class="indent"><font size="2">วันเปิดภาคการศึกษา</font></td> <td align="center"> <script>DateInput('sdSDate', true, 'DD/MM/YYYY', '<?php echo (set_value("sdSDate",$sdSDate)=='') ? getNowDateFw2() : set_value("sdSDate",$sdSDate);?>');</script> <?php echo form_error('sdSDate');?></td> <td align="center">-</td> </tr> <tr bgcolor="<?php echo $tr_color_even;?>" height="25"> <td align="center">2</td> <td class="indent"><font size="2">ลงทะเบียนเรียน</font></td> <td align="center"> <script>DateInput('sdRegSDate', true, 'DD/MM/YYYY', '<?php echo (set_value("sdRegSDate",$sdRegSDate)=='') ? getNowDateFw2() : set_value("sdRegSDate",$sdRegSDate);?>');</script> <?php echo form_error('sdRegSDate');?></td> <td align="center"> <script>DateInput('sdRegEDate', true, 'DD/MM/YYYY', '<?php echo (set_value("sdRegEDate",$sdRegEDate)=='') ? getNowDateFw2() : set_value("sdRegEDate",$sdRegEDate);?>');</script> <?php echo form_error('sdRegEDate');?></td> </tr> <tr bgcolor="<?php echo $tr_color_even;?>" height="25"> <td align="center">3</td> <td class="indent"><font size="2">เพิ่ม-ถอนรายวิชา<br /> (หลังวันสิ้นสุดช่วงลงทะเบียนเรียน)</font></td> <td align="center"><script>DateInput('sdAddWithdrawSDate', true, 'DD/MM/YYYY', '<?php echo (set_value("sdAddWithdrawSDate",$sdAddWithdrawSDate)=='') ? getNowDateFw2() : set_value("sdAddWithdrawSDate",$sdAddWithdrawSDate);?>');</script> <?php echo form_error('sdAddWithdrawSDate');?></td> <td align="center"> <script>DateInput('sdAddWithdrawEDate', true, 'DD/MM/YYYY', '<?php echo (set_value("sdAddWithdrawEDate",$sdAddWithdrawEDate)=='') ? getNowDateFw2() : set_value("sdAddWithdrawEDate",$sdAddWithdrawEDate);?>');</script> <?php echo form_error('sdAddWithdrawEDate');?></td> </tr> <tr bgcolor="<?php echo $tr_color_even;?>" height="25"> <td align="center">4</td> <td class="indent"><font size="2">ชำระค่าลงทะเบียนเรียน</font></td> <td align="center"><script>DateInput('sdPaySDate', true, 'DD/MM/YYYY', '<?php echo (set_value("sdPaySDate",$sdPaySDate)=='') ? getNowDateFw2() : set_value("sdPaySDate",$sdPaySDate);?>');</script> <?php echo form_error('sdPaySDate');?></td> <td align="center"> <script>DateInput('sdPayEDate', true, 'DD/MM/YYYY', '<?php echo (set_value("sdPayEDate",$sdPayEDate)=='') ? getNowDateFw2() : set_value("sdPayEDate",$sdPayEDate);?>');</script> <?php echo form_error('sdPayEDate');?></td> </tr> <tr bgcolor="<?php echo $tr_color_even;?>" height="25"> <td align="center">5</td> <td class="indent"><font size="2">ช่วงสอบกลางภาค</font></td> <td align="center"><script>DateInput('sdMidExamSDate', true, 'DD/MM/YYYY', '<?php echo (set_value("sdMidExamSDate",$sdMidExamSDate)=='') ? getNowDateFw2() : set_value("sdMidExamSDate",$sdMidExamSDate);?>');</script> <?php echo form_error('sdMidExamSDate');?></td> <td align="center"> <script>DateInput('sdMidExamEDate', true, 'DD/MM/YYYY', '<?php echo (set_value("sdMidExamEDate",$sdMidExamEDate)=='') ? getNowDateFw2() : set_value("sdMidExamEDate",$sdMidExamEDate);?>');</script> <?php echo form_error('sdMidExamEDate');?></td> </tr> <tr bgcolor="<?php echo $tr_color_even;?>" height="25"> <td align="center">6</td> <td class="indent"><font size="2">ช่วงสอบปลายภาค</font></td> <td align="center"><script>DateInput('sdFinalExamSDate', true, 'DD/MM/YYYY', '<?php echo (set_value("sdFinalExamSDate",$sdFinalExamSDate)=='') ? getNowDateFw2() : set_value("sdFinalExamSDate",$sdFinalExamSDate);?>');</script> <?php echo form_error('sdFinalExamSDate');?></td> <td align="center"> <script>DateInput('sdFinalExamEDate', true, 'DD/MM/YYYY', '<?php echo (set_value("sdFinalExamEDate",$sdFinalExamEDate)=='') ? getNowDateFw2() : set_value("sdFinalExamEDate",$sdFinalExamEDate);?>');</script> <?php echo form_error('sdFinalExamEDate');?></td> </tr> <tr bgcolor="<?php echo $tr_color_even;?>" height="25"> <td align="center">7</td> <td class="indent"><font size="2">ช่วงส่งเกรดนักศึกษา</font></td> <td align="center"><font size="2"><?php echo ($row_sd==NULL) ? "วันที่เริ่มสอบปลายภาค" : abbreDate2($row_sd->sdFinalExamSDate);?></font></td> <td align="center"> <script>DateInput('sdSendGradeEDate', true, 'DD/MM/YYYY', '<?php echo (set_value("sdSendGradeEDate",$sdSendGradeEDate)=='') ? getNowDateFw2() : set_value("sdSendGradeEDate",$sdSendGradeEDate);?>');</script> <?php echo form_error('sdSendGradeEDate');?></td> </tr> <tr bgcolor="<?php echo $tr_color_even;?>" height="25"> <td align="center">8</td> <td class="indent"><font size="2">วันปิดภาคการศึกษา</font></td> <td align="center"><script>DateInput('sdEDate', true, 'DD/MM/YYYY', '<?php echo (set_value("sdEDate",$sdEDate)=='') ? getNowDateFw2() : set_value("sdEDate",$sdEDate);?>');</script> <?php echo form_error('sdEDate');?></td> <td align="center">-</td> </tr> <tr bgcolor="<?php echo $tr_color_even;?>" height="25"> <td align="center"></td> <td class="indent"><font size="2">วันปิดภาคการศึกษา สบช.</font></td> <td align="center"><font size="2"><?php echo abbreDate($tmcToDate,'/');?></font> <input type="hidden" name="tmcToDate" id="tmcToDate" value="<?php echo $tmcToDate;?>" /></td> <td align="center">-</td> </tr> <tr bgcolor="<?php echo $tr_color_even;?>"> <td colspan="4" 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> <?php } else { ?> <tr bgcolor="<?php echo $tr_color_even;?>"> <td colspan="4" align="center" height="25"> <font size="2" color="<?php echo $font_color_err;?>">** ข้อมูลปี/ภาคการศึกษายังไม่ถูกกำหนด สามารถทำได้ที่ เมนูข้อมูลพื้นฐานของระบบ ข้อมูลปี/ภาคการศึกษา **</font> </td> </tr> <?php } } ?> </table></td> </tr> <tr> <td colspan="3"><br /></td> </tr> </table><?php echo form_close();?></div> <font size="2" color="<?php echo $font_color_err;?>"><b>หมายเหตุ : </b>* หมายถึง ต้องกรอกข้อมูลให้สมบูรณ์</font></td> </tr> </table>
|