<h2>Acara Kegiatan Himatif</h2>

<table class="table table-bordered">
	<thead>
		<tr>
			<th>no</th>
			<th>Nama</th>
			<th>Waktu</th>
			<th>tempat</th>
			<th>deskripsi</th>
			<th>Foto</th>
			<th>aksi</th>
		</tr>	
	</thead>
	<tbody>
		<?php $nomor=1; ?>
		<?php $ambil=$koneksi->query("SELECT * FROM kegiatan"); ?>
		<?php while($pecah = $ambil->fetch_assoc()){ ?>
		<tr>
			<td><?php echo $nomor; ?></td>
			<td><?php echo $pecah['nama_kegiatan']; ?></td>
			<td><?php echo $pecah['waktu_kegiatan']; ?></td>
			<td><?php echo $pecah['tempat_kegiatan']; ?></td>
			<td><?php echo $pecah['deskripsi_kegiatan']; ?></td>
			<td>
				<img src="../foto_kegiatan/<?php echo $pecah['foto_kegiatan']; ?>" width="100">
			</td>
			<td>
				<a href="index.php?halaman=hapuskegiatan&id=<?php echo $pecah['kegiatan_id']; ?>" class="btn-danger btn">Hapus</a>
				<a href="index.php?halaman=ubahkegiatan&id=<?php echo $pecah['kegiatan_id']; ?>" class="btn btn-warning">Ubah</a>
			</td>
		</tr>
		<?php $nomor++; ?>
		<?php }  ?>

	</tbody>
</table>

<a href="index.php?halaman=tambahkegiatan" class="btn btn-primary">Tambah Kegiatan</a>