Viewing file: v_add_vehicle.php (2.86 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php echo form_open($this->config->item('sa_folder').'base_data/add_vehicle', array("name" => "myform", "id" => "myform"));?>
<table id="table_input" width="60%" border="0" align='center'>
<tr>
<td align="center"><h3>ข้อมูลประเภทกิจกรรม</h3></td>
</tr>
<tr>
<td align="center">
<table id="table_input" class='szone2' width="40%" border="0" >
<tr >
<th >ชื่อประเภทกิจกรรม </th>
<td >
<input type="text" name="veh_name" id="veh_name" value="<?php echo getval('veh_name', $veh);?>" size="60" /> <font color='red' >*</font>
<?php echo form_error('veh_name'); ?>
<?php echo isset($error_name)? $error_name : "" ?>
</td>
</tr>
<tr >
<th >สถานะ</th>
<td>
<input type="radio" name="veh_status" value="Y" <?php echo (getval('veh_status',$veh)=='Y')?'checked':((getval('veh_status',$veh)=='N') ? '' : 'checked'); ?>/> ใช้
<input type="radio" name="veh_status" value="N" <?php echo (getval('veh_status',$veh)=='N')?'checked':''; ?>/> ไม่ใช้
<?php echo form_error('veh_status'); ?>
</td>
</tr>
<tr class="szone2">
<td colspan="2" align="center"><?php echo form_error('error_name'); ?>
<input type="submit" name="add" value="บันทึก" />
<input type="hidden" name="veh_id" value="<?php echo getval('veh_id', $veh);?>" />
</td>
</tr>
</table>
</td>
</tr>
</table>
<?php echo form_close();?>
<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_veh->num_rows > 0) {
$index=1;
foreach ($rs_veh->result() as $row) {
?>
<tr >
<td align="center"><?php echo $index;?></td>
<td align="left"><?php echo $row->veh_name;?></td>
<td align="center"><?php echo ($row->veh_status=='Y')?'ใช้':'ไม่ใช้';?></td>
<td align="center"><span class="hand" onClick="sendPost('myform', {'veh_id':<?php echo $row->veh_id;?>}, 'vehicle')"><?php echo img($this->config->item('sa_image_reply'));?></span></td>
<td align="center"><span class="hand" onClick="if (confirm('ต้องการลบใช่หรือไม่')) { sendPost('hidform', {'veh_id':<?php echo $row->veh_id;?>}, 'del_vehicle'); }"><?php echo img($this->config->item('sa_image_del'));?></td>
</tr>
<?php
$index++;
}
} else {
?>
<tr class="notfound">
<td colspan="5">ไม่พบชื่อประเภทกิจกรรม</td>
</tr>
<?php
}
?>
</table>
|