Viewing file: v_add_type.php (2.87 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<table width="60%" border="0" align="center">
<tr>
<td align="center"><h3>ข้อมูลประเภทการให้คำที่ปรึกษา</h3></td>
</tr>
<tr ><td align="center">
<?php echo form_open($this->config->item('sa_folder').'/base_data/add_adviser_type', array("name" => "myform", "id" => "myform"));?>
<table class='szone2' width="100%" border="0" align="center">
<tr >
<th valign="top">ชื่อประเภท</th>
<td >
<input type="text" name="avt_name" id="avt_name" value="<?php echo getval('avt_name', $avt);?>" size="60" /><font color='red' > *</font>
<?php echo form_error('avt_name'); ?>
<?php echo isset($error_name)? $error_name : "" ?>
</td>
</tr>
<tr >
<th valign="top">สถานะ</th>
<td>
<input type="radio" name="avt_status" value="Y" <?php echo (getval('avt_status',$avt)=='Y')?'checked':((getval('avt_status',$avt)=='N') ? '' : 'checked'); ?>/> ใช้
<input type="radio" name="avt_status" value="N" <?php echo (getval('avt_status',$avt)=='N')?'checked':''; ?>/> ไม่ใช้
<?php echo form_error('avt_status'); ?>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="hidden" name="avt_id" value="<?php echo getval('avt_id', $avt);?>" />
<input type="submit" name="add" value="บันทึก" /><?php echo form_error('error_name'); ?></td>
</tr>
</table><?php echo form_close();?>
</td>
</tr>
</table>
<br />
<table id="table_show" class='tb_1' width="50%" border="0">
<tr>
<th width="10%">ลำดับที่</th>
<th >ชื่อประเภทกิจกรรม</th>
<th width="10%">สถานะ</th>
<th width="10%">แก้ไข</th>
<th width="5%">ลบ</th>
</tr>
<?php
if ($rs_avt->num_rows > 0) {
$index=1;
foreach ($rs_avt->result() as $row) {
?>
<tr>
<td align="center"><font size="2"><?php echo $index;?></font></td>
<td align="left"><font size="2"><?php echo $row->avt_name;?></font></td>
<td align="center"><font size="2"><?php echo ($row->avt_status=='Y')?'ใช้':'ไม่ใช้';?></font></td>
<td align="center"><span class="hand" onClick="sendPost('myform', {'avt_id':<?php echo $row->avt_id;?>}, 'adviser_type')"><?php echo img($this->config->item('sa_image_reply'));?></span></td>
<td align="center"><span class="hand" onClick="if (confirm('ต้องการลบใช่หรือไม่')) { sendPost('hidform', {'avt_id':<?php echo $row->avt_id;?>}, 'del_adviser_type'); }"><?php echo img($this->config->item('sa_image_del'));?></td>
</tr>
<?php
$index++;
}
} else {
?>
<tr class='notfound'>
<td colspan="5" align="center"><?php echo $this->config->item('sa_not_found');?></td>
</tr>
<?php
}
?>
</table>
|