<div id="view">
<div style="float:left; padding-bottom:5px;">
<a href="<?php echo base_url();?>index.php/pegawai/tambah">
<button type="button" name="tambah" id="tambah" class="easyui-linkbutton" data-options="iconCls:'icon-add'">Tambah Data</button>
</a>
<a href="<?php echo base_url();?>index.php/pegawai">
<button type="button" name="refresh" id="refresh" class="easyui-linkbutton" data-options="iconCls:'icon-reload'">Refresh</button>
</a>

</div>
<div style="float:right; padding-bottom:5px;">
<form name="form" method="post" action="<?php echo base_url();?>index.php/pegawai">
Cari Kode & Nama Pegawai : 
<input type="text" name="txt_cari" id="txt_cari" size="50" />
<button type="submit" name="cari" id="cari" class="easyui-linkbutton" data-options="iconCls:'icon-search'">Cari</button>
</form>
</div>
<div id="gird" style="float:left; width:100%;">
<table id="dataTable" width="100%">
<tr>
	<th>No</th>
    <th>Kode</th>
    <th>Nama Pegawai</th>
    <th>Jk</th>
    <th>Telp</th>
    <th>Tempat Lahir</th>
    <th>Tgl Lahir</th>
    <th>Alamat</th>
    <th>Aksi</th>
</tr>
<?php
	if($data->num_rows()>0){
		$no =1+$hal;
		foreach($data->result_array() as $db){  
		?>    
    	<tr>
			<td align="center" width="50"><?php echo $no; ?></td>
            <td align="center" width="200" ><?php echo $db['kode_pegawai']; ?></td>
            <td ><?php echo $db['nama_pegawai']; ?></td>
            <td align="center"><?php echo $db['jk']; ?></td>
            <td ><?php echo $db['telp']; ?></td>
            <td ><?php echo $db['tempat_lahir']; ?></td>
            <td align="center" ><?php echo $db['tgl_lahir']; ?></td>
            <td ><?php echo $db['alamat']; ?></td>
            <td align="center" width="80">
            <a href="<?php echo base_url();?>index.php/pegawai/edit/<?php echo $db['kode_pegawai'];?>">
			<img src="<?php echo base_url();?>asset/images/ed.png" title='Edit'>
			</a>
            <a href="<?php echo base_url();?>index.php/pegawai/hapus/<?php echo $db['kode_pegawai'];?>"
            onClick="return confirm('Anda yakin ingin menghapus data ini?')">
			<img src="<?php echo base_url();?>asset/images/del.png" title='Hapus'>
			</a>
            </td>
    </tr>
    <?php
		$no++;
		}
	}else{
	?>
    	<tr>
        	<td colspan="5" align="center" >Tidak Ada Data</td>
        </tr>
    <?php	
	}
?>
</table>
<?php echo "<table align='center'><tr><td>".$paginator."</td></tr></table>"; ?>
</div>
</div>