NIM_E31220577/admin/penyakitdaftar.php

50 lines
2.5 KiB
PHP

<div class="d-sm-flex align-items-center justify-content-between mb-4">
<a href="index.php?halaman=penyakittambah" class="btn btn-sm btn-primary shadow-sm float-right pull-right">
<i class="fas fa-plus fa-sm text-white-50"></i> Tambah Penyakit
</a>
</div>
<div class="row">
<div class="col-md-12 mb-4">
<div class="card shadow mb-4">
<div class="card-header py-3 d-flex flex-row align-items-center justify-content-between">
<h6 class="m-0 font-weight-bold ">Data Penyakit</h6>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="table">
<thead class="bg-white text-dark">
<tr>
<th>No</th>
<th>Kode</th>
<th>Penyakit</th>
<th>Penjelasan</th>
<th>Solusi</th>
<th>Aksi</th>
</tr>
</thead>
<tbody>
<?php $nomor = 1; ?>
<?php $ambil = $koneksi->query("SELECT * FROM penyakit "); ?>
<?php while ($data = $ambil->fetch_assoc()) { ?>
<tr>
<td><?php echo $nomor ?></td>
<td><?php echo $data["kode_penyakit"] ?></td>
<td><?php echo $data["namapenyakit"] ?></td>
<td><?php echo $data["penjelasan"] ?></td>
<td><?php echo $data["solusi"] ?></td>
<td>
<a href="index.php?halaman=penyakitedit&id=<?php echo $data['idpenyakit']; ?>" class="btn btn-warning btn-sm m-1">Ubah</a>
<a href="index.php?halaman=penyakithapus&id=<?php echo $data['idpenyakit']; ?>" class="btn btn-danger btn-sm m-1" onclick="return confirm('Apakah Anda Yakin Ingin Menghapus Data ?')">Hapus</a>
</td>
</tr>
<?php $nomor++; ?>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>