<?php 
$record_instansi	= $this->db->query("SELECT * FROM identitas LIMIT 1")->row();
?>
<?php echo $this->session->flashdata("k");?>
<div class="clearfix">
<div class="row">
  <div class="col-lg-12">
	
	<div class="navbar navbar-inverse">
		<div class="container">
			<div class="navbar-header">
				<a class="navbar-brand" href="<?php echo base_URL(); ?>kecamatan/list_data_">Master Kecamatan <?php echo $record_instansi->nama_satker; ?></a>
			</div>
		<div class="navbar-collapse collapse navbar-inverse-collapse" style="margin-right: -20px">
			
			<ul class="nav navbar-nav">
				<li><a href="<?php echo base_URL(); ?>kecamatan/list_data_/add" class="btn-info"><i class="icon-plus-sign icon-white"> </i> Tambah Data</a></li>
			</ul>
			
			<ul class="nav navbar-nav navbar-right">
				<form class="navbar-form navbar-left" method="post" action="<?php echo base_URL(); ?>kecamatan/list_data_/cari">
					<input type="text" class="form-control" name="q" style="width: 200px" placeholder="Kata kunci pencarian ..." required>
					<button type="submit" class="btn btn-danger"><i class="icon-search icon-white"> </i> Cari</button>
				</form>
			</ul>
		</div><!-- /.nav-collapse -->
		</div><!-- /.container -->
	</div><!-- /.navbar -->

  </div>
</div>




<table class="table table-bordered table-hover">
	<thead>
		<tr>
			<th style='width:5%'>No</th>
			<th style='width:55%'>Nama Kecamatan</th>
			<th style='width:55%'>Kabupaten</th>
			
		</tr>
	</thead>
	
	<tbody>
		<?php 
		if (empty($record)) {
			echo "<tr><td colspan='2'  style='text-align: center; font-weight: bold'>--Data tidak ditemukan--</td></tr>";
		} else {
			$no 	= ($this->uri->segment(4) + 1);
			foreach ($record->result_array() as $b) {
				$ect_akun = base64_encode($this->encrypt->encode($b['id']));
				
		?>
		<tr>
			<td><?php echo $no;?></td>
			<td><?php echo $b['kec']; ?></td>
			<td><?php echo $b['kabkota']; ?></td>
			
			
		</tr>
		<?php 
			$no++;
			}
		}
		?>
	</tbody>
</table>
<center><ul class="pagination"><?php echo $pagi; ?></ul></center>
</div>
