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>

                    &lt;a href=&quot;&lt;?=$main_url?&gt;obat/add-obat.php&quot; class=&quot;btn btn-sm btn-primary float-left&quot;&gt;
                    &lt;i class=&quot;fa-solid fa-circle-plus&quot;&gt;&lt;/i&gt; Input Obat&lt;/a&gt;
                    
                    &lt;div class=&quot;card&quot;&gt;

<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>

&lt;/tr&gt;

</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>

  &lt;td align=&quot;center&quot;&gt;
  &lt;button type=&quot;button&quot; class=&quot;btn btn-primary&quot; data-bs-toggle=&quot;modal&quot; data-bs-target=&quot;#modalViewData&lt;?php echo $data [&#039;nis&#039;];?&gt;&quot;&gt;
  &lt;i class=&quot;fa fa-eye&quot;&gt;&lt;/i&gt;fungsi&lt;/button&gt;

<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/>

      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;modal-footer&quot;&gt;
    &lt;button type=&quot;button&quot; class=&quot;btn btn-secondary&quot; data-bs-dismiss=&quot;modal&quot;&gt;Close&lt;/button&gt;
  &lt;/div&gt;
&lt;/div&gt;

</div> </div>

    &lt;td&gt;&lt;a href=&quot;edit-obat.php?nis=&lt;?= $data[&#039;nis&#039;]?&gt;&quot; class=&quot;btn btn-sm btn-info&quot;&gt;&lt;i class=&quot;fa-solid fa-edit&quot; title=&quot;Update obat&quot;&gt;&lt;/i&gt;Ubah&lt;/a&gt;&lt;/td&gt;
    &lt;td&gt;&lt;a href=&quot;hapus-obat.php?nis=&lt;?= $data[&#039;nis&#039;]?&gt;&amp;foto=&lt;?=$data[&#039;foto&#039;]?&gt;&quot; class=&quot;btn btn-sm btn-danger&quot; &gt;
        &lt;i class=&quot;fa-solid fa-trash&quot; title=&quot;Hapus obat&quot; onclick=&quot;return confirm(&#039;Anda yakin Ingin menghapus data ini?&#039;)&quot;&gt;&lt;/i&gt;Hapus&lt;/a&gt;&lt;/td&gt;

&lt;/tr&gt;
&lt;?php } ?&gt;

</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";

?>

avatar KUSRENI
@KUSRENI

1 Kontribusi 0 Poin

Dipost 4 bulan yang lalu

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