<div class="content-header">
  <div>
    <h4 class="content-title"><?php echo $title; ?></h4>
  </div>
</div><!-- content-header -->
<div class="content-body">
	<?php if($this->session->flashdata('flash')): ?>
	<div class="alert alert-success"><?php echo $this->session->flashdata('flash'); ?></div>
	<?php endif; ?>
	<a href="admin/postingan/kategori/new" class="btn btn-primary mb-2"><i class="fas fa-plus"></i></a>
	<table id="myTable" class="table">
    <thead>
      <tr>
      	<th class="wd-5p">No</th>
      	<th>Kategori</th>
		<th>Url</th>
		<th>Opsi</th>
      </tr>
    </thead>
    <tbody>
    	<?php $i = 1; ?>
		<?php foreach($kategori as $kat): ?>
		<tr>
			<td><?php echo $i; ?>.</td>
			<td><?php echo $kat['kat_nama']; ?></td>
			<td><?php echo $kat['kat_url']; ?></td>
			<td>
				<a href="admin/postingan/kategori/edit/<?php echo $kat['kat_id']; ?>" class="btn btn-sm btn-warning"><i class="fa fa-edit"></i> Edit</a>
				<a href="admin/postingan/kategori/hapus/<?php echo $kat['kat_id']; ?>" class="btn btn-sm btn-danger" onclick="return confirm('Yakin data ini akan dihapus?');"><i class="fa fa-trash"></i> hapus</a>
			</td>
		</tr>
		<?php $i++; ?>
		<?php endforeach; ?>
    </tbody>
  </table>
</div><!-- content-body -->