Viewing file: v_addGrade.php (8.17 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php $row_grd = isset($qu_grd) ? $qu_grd->row() : null; ?> <table width="100%" align="center"> <tr> <td> <div align="center"><table width="100%"> <tr> <td colspan="2" align="center" class="h error">ข้อมูลคะแนนเกรด</td> </tr> <tr> <td align="right"> <?php echo anchor_popup($this->config->item("rg_folder")."bdpbri/grd_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")."bdpbri/grd_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><input type="text" name="grdGrade" id="grdGrade" value="<?php echo setValue('grdGrade', $row_grd);?>" size="3" maxlength="2" class="required" /> <span class="error">* <?php echo form_error("grdGrade");?></span></td> </tr> <tr bgcolor="<?php echo $tr_color_even;?>"> <td class="coltd_szone2"><font size="2">ระดับคะแนน</font></td> <td><input type="text" name="grdPoint" id="grdPoint" value="<?php echo setValue('grdPoint', $row_grd);?>" size="3" maxlength="4" class="required-float" /> <span class="error">* <?php echo form_error("grdPoint");?></span></td> </tr> <tr bgcolor="<?php echo $tr_color_even;?>"> <td class="coltd_szone2"><font size="2">คำอธิบายเกรด (ไทย)</font></td> <td><input type="text" name="grdDescription" id="grdDescription" value="<?php echo setValue('grdDescription', $row_grd);?>" size="20" class="required-thai" /> <span class="error">* <?php echo form_error("grdDescription");?></span></td> </tr> <tr bgcolor="<?php echo $tr_color_even;?>"> <td class="coltd_szone2"><font size="2">คำอธิบายเกรด (อังกฤษ)</font></td> <td><input type="text" name="grdDescriptionE" id="grdDescriptionE" value="<?php echo setValue('grdDescriptionE', $row_grd);?>" size="20" class="required-eng" /> <span class="error">* <?php echo form_error("grdDescriptionE");?></span></td> </tr> <tr bgcolor="<?php echo $tr_color_even;?>"> <td class="coltd_szone2"><font size="2"><b>รูปแบบเกรด</b></font></td> <td> <?php $js = "id=\"grdGtpId\" class=\"required\""; echo form_dropdown('grdGtpId', $rs_gtp, setValue('grdGtpId', $row_grd), $js); ?> <span class="error">* <?php echo form_error("grdGtpId");?></span></td> </tr> <tr bgcolor="<?php echo $tr_color_even;?>"> <td class="coltd_szone2"><font size="2">การคิดเกรด</font></td> <td><font size="2"> <input type="radio" name="grdCalGrade" id="grdCalGrade" value="Y" <?php echo (setValue('grdCalGrade',$row_grd)!='N') ? "checked" : "";?> /> คิดเกรด <input type="radio" name="grdCalGrade" value="N" <?php echo (setValue('grdCalGrade',$row_grd)=="N") ? "checked" : "";?> /> ไม่คิดเกรด </font></td> </tr> <tr bgcolor="<?php echo $tr_color_even;?>"> <td class="coltd_szone2"><font size="2">การรวมหน่วยกิต</font></td> <td><font size="2"> <input type="radio" name="grdCalCredit" id="grdCalCredit" value="Y" <?php echo (setValue('grdCalCredit',$row_grd)!='N') ? "checked" : "";?> /> รวมหน่วยกิต <input type="radio" name="grdCalCredit" id="grdCalCredit" value="N" <?php echo (setValue('grdCalCredit',$row_grd)=='N') ? "checked" : "";?>/> ไม่รวมหน่วยกิต </font></td> </tr> <tr bgcolor="<?php echo $tr_color_even;?>"> <td colspan="2" align="center"> <input type="submit" name="add" id="add" value="บันทึก" /> <input type="reset" name="clear" value="เคลียร์ข้อมูล" /> <input type="hidden" name="grdId" id="grdId" value="<?php echo setValue('grdId', $row_grd);?>" /></td> </tr> </table><?php echo form_close();?></td> </tr> <?php if (isset($rs_grd) && $rs_grd->num_rows() > $this->config->item("rg_max_row")) { ?> <tr> <td colspan="3"><div class="boxBlock leftBox"><font size="2"> แสดง <?php echo $rs_grd->num_rows();?> รายการจาก <?php echo $this->config->item('rg_max_row');?> รายการ</font> </div></td> <tr> <?php } ?> <tr> <td><table class="headCol"> <tr> <th><font size="2" color="<?php echo $font_color_table;?>"><b>เกรด</b></font></th> <th><font size="2" color="<?php echo $font_color_table;?>"><b>ระดับคะแนน</b></font></th> <th><font size="2" color="<?php echo $font_color_table;?>"><b>คำอธิบายเกรด (ไทย)</b></font></th> <th><font size="2" color="<?php echo $font_color_table;?>"><b>คำอธิบาย (เกรดอังกฤษ)</b></font></th> <th><font size="2" color="<?php echo $font_color_table;?>"><b>รูปแบบเกรด</b></font></th> <th><font size="2" color="<?php echo $font_color_table;?>"><b>การคิดเกรด</b></font></th> <th><font size="2" color="<?php echo $font_color_table;?>"><b>การรวมหน่วยกิต</b></font></th> <th class="editCol"><font size="2" color="<?php echo $font_color_table;?>"><b>แก้ไข</b></font></th> <th class="deleteCol"><font size="2" color="<?php echo $font_color_table;?>"><b>ลบ</b></font></th> </tr> <?php $i = 0; if (isset($rs_grd) && $rs_grd->num_rows()) { foreach ($rs_grd->result() as $row) { echo "<tr onmouseover=\"bgColor='".$tr_color_even."'\" onmouseout=\"bgColor='".$this->config->item("rg_mouseout")."'\">"; ?> <td align="center"><font size="2"><?php echo $row->grdGrade;?></font></td> <td class="indent" align="center"><font size="2"><?php echo number_format($row->grdPoint, 2);?></font></td> <td class="indent"><font size="2"><?php echo $row->grdDescription;?></font></td> <td class="indent"><font size="2"><?php echo $row->grdDescriptionE;?></font></td> <td class="indent"><font size="2"><?php echo $row->gtpName;?></font></td> <td align="center"><font size="2"><?php echo strtolower($row->grdCalGrade);?></font></td> <td class="indent" align="center"><font size="2"><?php echo $row->grdCalCredit;?></font></td> <td align="center"> <img class="hand" src="<?php echo base_url().$this->config->item("rg_edit");?>" align="absmiddle" border="0" onClick="sendPost('hidform', {'grdId':<?php echo $row->grdId;?>}, '<?php echo site_url($this->config->item('rg_folder').'bdpbri/grd_input');?>')" /></td> <td align="center"><span onClick="confirmDel2({grdId:<?php echo $row->grdId;?>}, 'm_form1','<?php echo site_url($this->config->item('rg_folder').'bdpbri/grd_delete');?>')" /><img src="<?php echo base_url().$this->config->item("rg_delete");?>" align="absmiddle" border="0" width="16" height="19" class="hand"/></span></td> </tr> <?php $i++; } } else { ?> <tr> <td colspan="9" height="22" align="center"><span class="error">** ไม่ปรากฏรายการในฐานข้อมูล **</span></td> </tr> <?php } ?> </table></td> </tr> <tr> <td align="right"><font size="2">รวม <?php echo $i;?> รายการ</font></td> </tr> </table></div> </td> </tr> <tr> <td><table width="100%"> <tr> <td width="8%"><span class="error"><strong>หมายเหตุ : </strong></span></td> <td><span class="error">* หมายถึง ต้องกรอกข้อมูลให้สมบูรณ์</span></td> </tr> <tr> <td></td> <td><span class="error">y = คิดเกรด, n = ไม่คิดเกรด</span></td> </tr> <tr> <td></td> <td><span class="error">Y = รวมหน่วยกิต, N = ไม่รวมหน่วยกิต</span></td> </tr> </table></td> </tr> </table>
|