<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/kategori-campaign/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>Icon</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['kacam_nama']; ?></td>
			<td><?php echo $kat['kacam_url']; ?></td>
			<td><img src="assets/home/categories/<?php echo $kat['kacam_icon']; ?>" width="50"></td>
			<td>
				<a href="admin/kategori-campaign/edit/<?php echo $kat['kacam_id']; ?>" class="btn btn-sm btn-warning"><i class="fa fa-edit"></i> Edit</a>
				<a href="admin/kategori-campaign/hapus/<?php echo $kat['kacam_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 -->