Viewing file: v_addSdtHp.php (6.46 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<link rel="stylesheet" href="<?=base_url();?>/js/textboxlist_proto/textboxlist.css" type="text/css" media="screen" title="Test Stylesheet" charset="utf-8" /> <script src="<?=base_url();?>/js/textboxlist_proto/protoculous-effects-shrinkvars.js" type="text/javascript" charset="utf-8"></script> <script src="<?=base_url();?>/js/textboxlist_proto/textboxlist.js" type="text/javascript" charset="utf-8"></script> <script src="<?=base_url();?>/js/textboxlist_proto/textboxlistauto.js" type="text/javascript" charset="utf-8"></script> <script type="text/javascript"> document.observe('dom:loaded', function() { // init tlist1 = new FacebookList('wk11_co', 'wk11_auto'); var get_user_list_url = "<?php echo site_url($this->config->item('sa_folder').'search/get_std_list')?>"; // fetch and feed new Ajax.Request(get_user_list_url, { onSuccess: function(transport) { transport.responseText.evalJSON(true).each(function(t){tlist1.autoFeed(t)}); } }); });
Element.addMethods({ onBoxDispose: function(item,obj) { obj.autoFeed(item.retrieveData('text')); }, onInputFocus: function(el,obj) { obj.autoShow(); }, onInputBlur: function(el,obj) { obj.lastinput = el; obj.blurhide = obj.autoHide.bind(obj).delay(0.1); }, filter:function(D,E){var C=[];for(var B=0,A=this.length;B<A;B++){if(D.call(E,this[B],B,this)){C.push(this[B]);}}return C;} });
function do_submit (action) { if (action) { jQuery("#myform").attr('action', action); }
var stdId = jQuery("#stdId").val(); if (stdId == '') { tlist1.update(); }
if(action==undefined){ jQuery("#myform").submit(); }else{ jQuery("#myform2").submit(); } } </script> <?php $row_std = isset($qu_std) ? $qu_std->row() : NULL;
$attributes = array('id' => 'myform', 'name' => 'myform'); echo form_open($this->config->item('sa_folder').'health/sdtHp_update', $attributes); ?> <table width="100%" border="0"> <tr> <td align="center"> <table width="60%" border="0"> <tr> <th colspan="2" align="center">บันทึกสิทธิการเบิกค่ารักษา</th> </tr> <tr> <td > <table class="szone2" width="100%" border="0"> <?php if (isset($qu_std)) { ?> <tr> <td >รหัส/ชื่อ-สกุลนักศึกษา</td> <td><?php echo getval('stdCode', $row_std).': '.getval('stdName', $row_std).' '.getval('stdSurname', $row_std);?> <input type="hidden" id="std" name="std" value="<?php echo getval('stdCode', $row_std).': '.getval('stdName', $row_std).' '.getval('stdSurname', $row_std).'###';?>" /></td> </tr> <?php } else { ?> <tr> <th>รหัส/ชื่อ-สกุลนักศึกษา</th> <td><input type="text" id="wk11_co" name="wk11_co" value="" /> <div id="wk11_auto"> <div class="default">กรุณากรอกรหัส/ชื่อ-สกุลนักศึกษา</div> <ul class="feed"></ul> </div> <span class="error"><?php echo form_error('wk11_co');?></span></td> </tr> <?php } ?> <tr> <th>สิทธิการรักษาพยาบาล</th> <td ><?php echo form_dropdown('hpId', $rs_hp, set_value('hpId', getval('sdtHpId',$row_std)));?> <span class="error">* <?php echo form_error('hpId');?></span></td> </tr> <tr> <th>สถานะ</th> <td ><?php echo form_textarea(array( 'name' => 'htp_status', 'id' => 'htp_status', 'value' => (isset($info['sta']))? $info['sta']:$this->input->post('htp_status'), 'cols' => '30%', 'rows' => '5%', ));?> <span class="error">* <?php echo form_error('htp_status');?></span></td> </tr> <tr> <td colspan="2" align="center"> <input type="hidden" id="htp_id" name="htp_id" value="<?echo (isset($info['htp_id']))? $info['htp_id']:"";?>" /> <input type="submit" id="btnSubmit" name="btnSubmit" value="บันทึก" onClick="do_submit()" /> <input type="submit" id="btnCancel" name="btnCancel" value="ยกเลิก" /> <input type="hidden" id="stdId" name="stdId" id="stdId" value="<?php echo getval('stdId', $row_std);?>" /></td> </tr> </table> </td> </tr> </table> </td> </tr> </table> <?php echo form_close();
$attributes = array('id' => 'myform2', 'name' => 'myform2'); echo form_open($this->config->item('sa_folder').'health/sdtHp_input', $attributes); ?> <div align='right'>รหัส/ชื่อ-สกุลนักศึกษา : <input type="text" id="v_search2" name="v_search2" value="<?=$v_search2;?>" /> สิทธิการรักษาพยาบาล : <?=form_dropdown('v_search', $rs_hp, $v_search);?><input type="button" id="btnSearch" name="btnSearch" value="ค้นหา" onClick="do_submit('<?php echo site_url($this->config->item('sa_folder').'health/sdtHp_input');?>')" /></div> <?php echo form_close();?> <table class="tb_1" width="100%"> <thead> <tr> <th class="seqCol">ลำดับ</th> <th>รหัสนักศึกษา</th> <th>ชื่อ-สกุลนักศึกษา</th> <th>สิทธิการรักษาพยาบาล</th> <th>สถานะล่าสุด</th> <th class="deleteCol">แก้ไข</th> <th class="deleteCol">ลบ</th> </tr> </thead> <tbody> <?php $i = 1; if (isset($rs_std)) { foreach ($rs_std->result() as $row_std) { ?> <tr > <td height="22" align="center"><?php echo $i;?></td> <td align="center"><?php echo $row_std->stdCode;?></td> <td><a href="javascript:void(0)" onClick="sendPost('hidfrm',{'stdId':'<?php echo $row_std->stdId;?>','stdCode':'<?php echo $row_std->stdCode;?>','stdName':'<?php echo $rs_pf[$row_std->stdPfId].$row_std->stdName.' '.$row_std->stdSurname;?>'},'sdtHp_His',{});"><?php echo $rs_pf[$row_std->stdPfId].$row_std->stdName.' '.$row_std->stdSurname;?></a></td> <td><?php echo $rs_hp[$row_std->sdtHpId];?></td> <td><?php echo (isset($sta[$row_std->stdId]))? $sta[$row_std->stdId]:"";?></td> <td align="center"><span class="hand" onClick="sendPost('myform', {'stdId':<?php echo $row_std->stdId;?>}, 'sdtHp_input')"><?php echo img($this->config->item('sa_image_reply'));?></span></td> <td align="center"><span class="hand" onClick="confirmDel3({'stdId':'<?=$row_std->stdId;?>'},'delfrm','sdtHp_del')"><?php echo img($this->config->item('sa_image_del'));?></span></td> </tr> <?php $i++; } }
if ($i == 1) { ?> <tr class="notfound"> <td colspan="7"><?php echo $this->config->item('sa_not_found');?></td> </tr> <?php } ?> </tbody> </table>
|