Postingan lainnya
Kelas Premium!
Belajar bikin website dari nol sekarang
Gunakan kupon "lebihcepat" untuk diskon 25%!
Kelas Premium!
Belajar Javascript untuk website
Gunakan kupon "mulaijs" untuk diskon 75 ribu!
cara membuat tanggal kadaluarsa obat menjadi notif di aplikasi web
<?php
require_once "../config.php";
$title = "Profile Klinik - Bhayangkara";
require_once "../template/header.php"; require_once "../template/navbar.php"; require_once "../template/sidebar.php";
?>
<div id="layoutSidenav_content"> <main> <div class="container-fluid px-4"> <h1 class="mt-4"><i class="fa-solid fa-capsules"></i>Data Obat</h1> <ol class="breadcrumb mb-4"> <li class="breadcrumb-item "><a href="../index.php">Home</a></li> <li class="breadcrumb-item active">Obat</li> </ol>
<a href="<?=$main_url?>obat/add-obat.php" class="btn btn-sm btn-primary float-left">
<i class="fa-solid fa-circle-plus"></i> Input Obat</a>
<div class="card">
<div class="card-header" style="background-color: #e3f2fd;"> <span class="h5 my-2"><i class="fa-solid fa-list"></i> Data Obat</span> <a href="<?=$main_url?>index.php" class="btn btn-sm btn-primary float-end"> <i class="fa-solid fa-print"></i> Print Data Obat</a>
</div> <div class="card-body"> <table class="table table-hover" id="datatablesSimple"> <thead> <tr> <th scope="col">No</th> <th scope="col"><center>Foto</center></th> <th scope="col"><center>ID Obat</center></th> <th scope="col"><center>Nama Obat</center></th> <th scope="col"><center>Golongan Obat</center></th> <th scope="col"><center>Bentuk Obat</center></th> <th scope="col"><center>Obat Masuk</center></th> <th scope="col" name="tanggal" type="date"><center>Tanggal Masuk</center></th> <th scope="col"><center>Operasi</center></th>
</tr>
</thead> <tbody>
<?php $no = 1; $queryObat = mysqli_query($koneksi, "SELECT * FROM tbl_obat"); while ($data= mysqli_fetch_array($queryObat )) {?> <tr> <th scope="row"><?= $no++?></th> <td align="center"><img src="../asset/image/<?= $data['foto']?>" class="rounded-circle" alt="foto obat" width="60px"></td> <td><?= $data['nis']?></td> <td><?= $data['nama']?></td> <td><?= $data['golongan']?></td> <td><?= $data['bentuk']?></td> <td><?= $data['jmasuk']?></td> <td><?= $data['tglmasuk']?></td>
<td align="center">
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#modalViewData<?php echo $data ['nis'];?>">
<i class="fa fa-eye"></i>fungsi</button>
<div class="modal fade" id="modalViewData<?php echo $data['nis'];?>" tabindex="-1" aria-labelledby="modalViewDataLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header bg-primary"> <h5 class="modal-title fw-bold text-white" id="modalViewDataLabel"> <i class="fa fa-eye"></i>Keterangan Fungsi Obat</h5> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body"> <div class="row"> <div class="col-sm-4 text-left"> Nama Obat <br/> Gol.Obat <br/> Ket.obat <br/> </div> <div class="col-sm-8 text-right"> : <?php echo $data['nama'] ?><br/> : <?php echo $data['golongan'] ?><br/> : <?php echo $data['ketobat'] ?><br/>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div> </div>
<td><a href="edit-obat.php?nis=<?= $data['nis']?>" class="btn btn-sm btn-info"><i class="fa-solid fa-edit" title="Update obat"></i>Ubah</a></td>
<td><a href="hapus-obat.php?nis=<?= $data['nis']?>&foto=<?=$data['foto']?>" class="btn btn-sm btn-danger" >
<i class="fa-solid fa-trash" title="Hapus obat" onclick="return confirm('Anda yakin Ingin menghapus data ini?')"></i>Hapus</a></td>
</tr>
<?php } ?>
</tbody> </table>
<!-- Button trigger modal -->
<!-- Modal --> <div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="exampleModalLabel">Modal title</h5> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body"> ... </div> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> <button type="button" class="btn btn-primary">Save changes</button> </div> </div> </div> </div>
</div> </div> </div> </main>
<?php
require_once "../template/footer.php";
?>
Tanggapan
Hi, jangan hanya copy paste kode kamu ya. Tapi coba buat pertanyaannya dengan jelas
Belum ada Jawaban. Jadi yang pertama Jawaban
Login untuk ikut Jawaban