Viewing file: v_add_except_military.php (5.64 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_mstd_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 ecp_id = jQuery("#ecp_id").val(); if (ecp_id == '') { tlist1.update(); } if(action==undefined){ jQuery("#myform").submit(); }else{ jQuery("#myform2").submit(); } } </script> <?php $row_ecp = isset($qu_ecp) ? $qu_ecp->row() : NULL;
$attributes = array('id' => 'myform', 'name' => 'myform'); echo form_open($this->config->item('sa_folder').'military/ecp_insert_update', $attributes); ?> <table width="100%" border="0"> <tr> <td align="center"> <table width="60%" border="0"> <tr> <th align="center">บันทึกประวัติการขอผ่อนผันทหาร</th> </tr> <tr> <tr> <td><br /> <table class="szone2" width="100%" border="0">
<?php if (isset($qu_ecp)) { ?> <tr> <th>รหัส/ชื่อ-สกุลนักศึกษา</th> <td><?php echo getval('stdCode', $row_ecp).': '.getval('stdName', $row_ecp).' '.getval('stdSurname', $row_ecp);?> <input type="hidden" id="std" name="std" value="<?php echo getval('stdCode', $row_ecp).': '.getval('stdName', $row_ecp).' '.getval('stdSurname', $row_ecp).'###';?>" /></td> </tr> <?php } else { ?> <tr> <th align="left">รหัส/ชื่อ-สกุลนักศึกษา</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 align="left">ปีที่ขอผ่อนผัน</th> <td align="left"><input type="text" id="ecp_year" name="ecp_year" value="<?php echo getval('ecp_year', $row_ecp, getNowYearTh());?>" size="4" maxlength="4" class="required-int" /> <span class="error">* <?php echo form_error('ecp_year');?></span></td> </tr> <tr> <td colspan="2" align="center"><input type="button" id="btnSubmit" name="btnSubmit" value="บันทึก" onClick="do_submit()" /> <input type="submit" id="btnCancel" name="btnCancel" value="ยกเลิก" /> <input type="hidden" id="ecp_id" name="ecp_id" value="<?php echo getval('ecp_id', $row_ecp);?>" /> </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').'military/ecp_input', $attributes); ?> <div align='right'>รหัส/ชื่อ-สกุลนักศึกษา : <input type="text" id="v_search" name="v_search" value="<?=$v_search;?>" /> ปี : <?echo form_dropdown('opt_year', $rs_opt,$opt_year); ?><input type="button" id="btnSearch" name="btnSearch" value="ค้นหา" onClick="do_submit('<?php echo site_url($this->config->item('sa_folder').'military/ecp_input');?>')" /></div> <?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_ecp)) { foreach ($rs_ecp->result() as $row_ecp) { ?> <tr > <td height="22" align="center"><?php echo $i;?></td> <td align="center"><?php echo $row_ecp->stdCode;?></td> <td><?php echo $row_ecp->prefixName.$row_ecp->stdName.' '.$row_ecp->stdSurname;?></td> <td align="center"><?php echo $row_ecp->ecp_year;?></td> <td align="center"><span class="hand" onClick="sendPost('myform', {'ecp_id':<?php echo $row_ecp->ecp_id;?>}, 'ecp_input')"><?php echo img($this->config->item('sa_image_reply'));?></span></td> <td align="center"><span class="hand" onClick="if (confirm('ต้องการลบใช่หรือไม่')) { sendPost('hidform', {'ecp_id':<?php echo $row_ecp->ecp_id;?>}, 'ecp_delete'); }"><?php echo img($this->config->item('sa_image_del'));?></span></td> </tr> <?php $i++; } }
if ($i == 1) { ?> <tr class="notfound"> <td colspan="6" align="center"><?php echo $this->config->item('sa_not_found');?></td> </tr> <?php } ?> </tbody> </table>
|