Viewing file: v_add_bmi_tb.php (4.14 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<script type="text/javascript" src="<?php echo base_url();?>js/auto_cp/jquery.autocomplete.js"></script> <?php echo link_tag('js/auto_cp/jquery.autocomplete.css');?> <script type="text/javascript"> function do_submit (action) { if (action) { jQuery("#myform").attr('action', action); } jQuery("#myform").submit(); } </script> <?php $row_bmi = isset($qu_bmi) ? $qu_bmi->row() : NULL;
$attributes = array('id' => 'myform', 'name' => 'myform'); echo form_open($this->config->item('sa_folder').'base_data/bmi_tb_insert_update', $attributes); ?> <table width="60%" border="0" align="center"> <tr> <th colspan="2" align="center">บันทึกข้อมูลดัชนีมวลกาย : <?php echo $bmi_group;?></th> </tr> <tr> <td colspan="2" align="center"> </td> </tr> <tr> <td ><table class="szone2" width="100%" border="0"> <tr> <th>ผลการประเมิน</th> <td><input type="text" id="bmi_name" name="bmi_name" value="<?php echo getval('bmi_name', $row_bmi);?>" /> <font color="red">* <?php echo form_error('bmi_name');?></font></td> </tr> <tr> <th>ค่าดัชนีมวลกายขั้นต่ำ</th> <td><input type="text" id="bmi_min" name="bmi_min" value="<?php echo getval('bmi_min', $row_bmi);?>" /> <font color="red">* <?php echo form_error('bmi_min');?></font></td> </tr> <tr> <th>ค่าดัชนีมวลกายขั้นสูง</th> <td><input type="text" id="bmi_max" name="bmi_max" value="<?php echo getval('bmi_max', $row_bmi);?>" /><font color="red"> * <?php echo form_error('bmi_max');?></font></td> </tr> <tr> <td colspan="2" align="center"> <input type="hidden" id="bmi_id" name="bmi_id" value="<?php echo getval('bmi_id', $row_bmi);?>" /> <input type="hidden" name="bmi_group" id="bmi_group" value="<?php echo $bmi_group;?>"> <input type="hidden" name="bmi_fr_date" id="bmi_fr_date" value="<?php echo $bmi_fr_date;?>"> <input type="hidden" name="bmi_to_date" id="bmi_to_date" value="<?php echo $bmi_to_date;?>"> <input type="hidden" name="check_end" id="check_end" value="<?php echo $check_end;?>"> <input type="hidden" name="valid" id="valid" value="valid"> <input type="button" id="btnSubmit" name="btnSubmit" value="บันทึก" onClick="do_submit('<?php echo site_url($this->config->item('sa_folder').'base_data/bmi_tb_insert_update');?>')" /> <input type="button" name="back" id="back" value="ย้อนกลับ" onClick="location.href='<?php echo site_url($this->config->item('sa_folder')."base_data/input_bmi");?>'" /></td> </tr> </table></td> </tr> </table> <?php echo form_close();?>
<table class="tb_1" width="100%"> <thead> <tr> <th>ลำดับ</th> <th>ผลการประเมิน</th> <th>ค่าดัชนีมวลกายขั้นต่ำ</th> <th>ค่าดัชนีมวลกายขั้นสูง</th> <th>แก้ไข</th> <th>ลบ</th> </tr> </thead> <tbody> <?php $i = 1; if (isset($rs_bmi)) { foreach ($rs_bmi->result() as $row_bmi) { ?> <tr > <td height="22" align="center"><?php echo $i;?></td> <td align="center"><?php echo $row_bmi->bmi_name;?></td> <td align="center"><?php echo $row_bmi->bmi_min;?></td> <td align="center"><?php echo $row_bmi->bmi_max;?></td> <td align="center"><span class="hand" onClick="sendPost('myform', {'bmi_id':<?php echo $row_bmi->bmi_id;?>}, 'input_bmi_tb')"><?php echo img($this->config->item('sa_image_reply'));?></span></td> <td align="center"><span class="hand" onClick="if (confirm('ต้องการลบใช่หรือไม่')) { sendPost('hidform', {'bmi_id':'<?php echo $row_bmi->bmi_id;?>','bmi_group':'<?php echo $row_bmi->bmi_group;?>','bmi_fr_date':'<?php echo $row_bmi->bmi_fr_date;?>','bmi_to_date':'<?php echo $row_bmi->bmi_to_date;?>'}, 'bmi_delete'); }"><?php echo img($this->config->item('sa_image_del'));?></span></td> </tr> <?php $i++; } }
if ($i == 1) { ?> <tr class="notfound"> <td colspan="12"><?php echo $this->config->item('sa_not_found');?></td> </tr> <?php } ?> </tbody> </table>
|