Viewing file: v_addCommonFeeTp.php (6.28 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php $row_sy = (isset($qu_sy) && $qu_sy!=NULL) ? $qu_sy->row() : NULL; $row_tm = (isset($qu_tm) && $qu_tm!=NULL) ? $qu_tm->row() : NULL; $row_cmft = (isset($qu_cmft) && $qu_cmft!=NULL) ? $qu_cmft->row() : NULL; ?> <table width="100%"> <tr> <td> <div align="center"><br /> <table width="100%" border="0"> <?php echo form_open($this->config->item("rg_folder")."fee/cmft_insert_update", array("name" => "myform", "id" => "myform"));?> <tr> <td><table class="szone"> <tr bgcolor="<?php echo $tr_color_even;?>"> <td class="coltd_szone">ปีการศึกษา</td> <td><?php echo $acY;?> <input type="hidden" name="acY" id="acY" value="<?php echo $acY;?>" /></td> </tr> <tr bgcolor="<?php echo $tr_color_even;?>"> <td class="coltd_szone">ภาคการศึกษา</td> <td><?php echo setValue('tmCode',$row_tm);?> <input type="hidden" name="tmId" id="tmId" value="<?php echo setValue('tmId',$row_tm);?>" /></td> </tr> <tr bgcolor="<?php echo $tr_color_even;?>"> <td class="coltd_szone">ปีการศึกษาที่เข้า</td> <td><font size="2"><?php echo ($adY!=NULL && $adY!=0) ? $adY : '-';?></font> <input type="hidden" name="adY" id="adY" value="<?php echo ($adY!=NULL && $adY!='') ? $adY : '0';?>" /></td> </tr> <tr bgcolor="<?php echo $tr_color_even;?>"> <td class="coltd_szone">ชั้นปี</td> <td><?php echo ($row_sy!=NULL) ? setValue('syCode',$row_sy) : '-';?> <input type="hidden" name="syId" id="syId" value="<?php echo ($row_sy!=NULL) ? setValue('syId',$row_sy) : '0';?>" /></td> </tr> <tr bgcolor="<?php echo $tr_color_even;?>"> <td class="coltd_szone">รายการค่าใช้จ่าย</td> <td> <?php if($row_cmft==NULL) { echo form_dropdown('cmftFeeId', $rs_fee, setValue('cmftFeeId', $row_cmft,$flg)); ?> <span class="error">*<?php echo form_error('cmftFeeId');?></span> <?php } else { echo setValue('feeName', $row_cmft); ?> <input type="hidden" name="cmftFeeId" value="<?php echo setValue('cmftFeeId',$row_cmft);?>" /> <?php } ?> </td> </tr> <tr bgcolor="<?php echo $tr_color_even;?>"> <td class="coltd_szone">ประเภทค่าใช้จ่าย</td> <td><input type="checkbox" name="cmftIsDom" id="cmftIsDom" value="Y" <?php echo (setValue('cmftIsDom',$row_cmft,$flg)=='Y') ? 'checked' : '';?> /> <font size="2">ค่าหอพัก</font></td> </tr> <tr bgcolor="<?php echo $tr_color_even;?>"> <td class="coltd_szone">จำนวนเงิน (บาท)</td> <td><input type="text" name="cmftAmt" id="cmftAmt" value="<?php echo setValue('cmftAmt',$row_cmft,$flg);?>" size="6" maxlength="5" class="required-int"> <font size="2" color="<?php echo $font_color_err;?>">*</font> <span class="error"><?php echo form_error('cmftAmt');?></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="flg_update" id="flg_update" value="<?php echo ($row_cmft!=NULL) ? 1 : '';?>" /></td> </tr> </table><?php echo form_close();?><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 color="<?php echo $font_color_table;?>" size="2">รายการค่าใช้จ่าย</font></th> <th class="amtCol"><font size="2" color="<?php echo $font_color_table;?>">จำนวนเงิน</font></th> <th class="editCol"><font color="<?php echo $font_color_table;?>" size="2">แก้ไข</font></th> <th class="deleteCol"><font color="<?php echo $font_color_table;?>" size="2">ลบ</font></th> </tr> <?php $i = 0; if(isset($rs_cmft) && $rs_cmft->num_rows()) { foreach($rs_cmft->result() as $row_cmft) { 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 $row_cmft->feeName;?></font></td> <td align="right"><font size="2" ><?php echo $row_cmft->cmftAmt;?></font></td> <td align="center"> <img src="<?php echo base_url().$this->config->item("rg_edit");?>" align="absmiddle" border="0" class="hand" onClick="sendPost('hidform', {'adY':<?php echo ($adY!=NULL || $adY!='') ? $adY : '0';?>, 'syId':<?php echo ($row_sy!=NULL) ? setValue('syCode',$row_sy) : '0';?>, 'acY':<?php echo $acY;?>, 'tmId':<?php echo setValue('tmId',$row_tm);?>, 'feeId':<?php echo $row_cmft->cmftFeeId;?>}, '<?php echo site_url($this->config->item('rg_folder').'fee/cmft_input');?>')" /></td> <td align="center"> <img src="<?php echo base_url().$this->config->item("rg_delete");?>" align="absmiddle" border="0" class="hand" onClick="confirmDel2( {'adY':<?php echo ($adY!=NULL || $adY!='') ? $adY : '0';?>, 'syId':<?php echo ($row_sy!=NULL) ? setValue('syCode',$row_sy) : '0';?>, 'acY':<?php echo $acY;?>, 'tmId':<?php echo setValue('tmId',$row_tm);?>, 'feeId':<?php echo $row_cmft->cmftFeeId;?>}, 'hidform', '<?php echo site_url($this->config->item('rg_folder').'fee/cmft_delete');?>')" /></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> <tr> <td colspan="2" align="right"><font size="2" >รวม <?php echo $i;?> รายการ</font></td> </tr> </table></div> <br><font size="2" color="<?php echo $font_color_err;?>"><b>หมายเหตุ : </b>* หมายถึง ต้องกรอกข้อมูลให้สมบูรณ์</font></td> </tr> </table>
|