Advertisement
rafisbr

r_pendaftaran.php

Aug 15th, 2022
262
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.13 KB | None | 0 0
  1. <?php
  2. require '../api/koneksi.php';
  3. // require 'api_checksessions.php';
  4. ?>
  5.  
  6. <!-- ======= Header ======= -->
  7. <?php require '../widgets/header.php'; ?>
  8. <!-- End Header -->
  9.  
  10. <!-- ======= Sidebar ======= -->
  11. <?php require '../widgets/sidebar.php'; ?>
  12.  
  13. <!-- End Sidebar-->
  14.  
  15. <!-- <script src="http://code.jquery.com/jquery-1.11.3.min.js"></script> -->
  16. <!-- <link rel="stylesheet" type="text/css" href="../assets/css/datatables.min.css" /> -->
  17.  
  18. <!-- <script type="text/javascript" src="https://cdn.datatables.net/v/dt/dt-1.11.4/date-1.1.1/datatables.min.js"></script> -->
  19.  
  20. <!-- <link href="https://nightly.datatables.net/css/jquery.dataTables.css" rel="stylesheet" type="text/css" /> -->
  21. <!-- <script src="https://nightly.datatables.net/js/jquery.dataTables.js"></script> -->
  22. <!-- <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/dt/jszip-2.5.0/dt-1.11.4/b-2.2.2/b-colvis-2.2.2/b-html5-2.2.2/b-print-2.2.2/datatables.min.css" /> -->
  23.  
  24. <?php
  25. function tanggal_indo($tanggal)
  26. {
  27. $bulan = array(
  28. 1 => 'Januari',
  29. 'Februari',
  30. 'Maret',
  31. 'April',
  32. 'Mei',
  33. 'Juni',
  34. 'Juli',
  35. 'Agustus',
  36. 'September',
  37. 'Oktober',
  38. 'November',
  39. 'Desember'
  40. );
  41. $pecahkan = explode('-', $tanggal);
  42.  
  43. // variabel pecahkan 0 = tanggal
  44. // variabel pecahkan 1 = bulan
  45. // variabel pecahkan 2 = tahun
  46.  
  47. return $pecahkan[2] . ' ' . $bulan[(int)$pecahkan[1]] . ' ' . $pecahkan[0];
  48. }
  49. ?>
  50. <body>
  51. <main id="main" class="main">
  52.  
  53. <div class="pagetitle">
  54. <h1>DATA PENDAFTARAN</h1>
  55. <nav>
  56. <ol class="breadcrumb">
  57. <li class="breadcrumb-item"><a href="../pages/home.php">Home</a></li>
  58. <li class="breadcrumb-item"><a href="../forms/add_pendaftaran.php">Input Pendaftaran</a></li>
  59. <li class="breadcrumb-item active">Data Pendaftaran</li>
  60. </ol>
  61. </nav>
  62. </div><!-- End Page Title -->
  63.  
  64. <section class="section">
  65. <div class="card shadow mb-4">
  66. <div class="col-lg-12">
  67. <div class="card-body">
  68. <h5 class="card-title">Data Pasien</h5>
  69. <div class="card-body">
  70. <table border="0" cellspacing="5" cellpadding="5">
  71. <tbody>
  72. <tr>
  73. <td>Start Date:</td>
  74. <td><input type="text" class="form-control ml-2" id="min" name="min"></td>
  75. </tr>
  76. <tr>
  77. <td>End Date:</td>
  78. <td><input type="text" class="form-control ml-2 mt-2" id="max" name="max"></td>
  79. </tr>
  80. </tbody>
  81. </table>
  82.  
  83. <br>
  84. <div class="table-responsive">
  85. <table class="table table-striped table-bordered" id="rPendaftaran" width="100%" cellspacing="1">
  86. <thead>
  87. <tr>
  88. <th>#</th>
  89. <th>NO. PENDAFTARAN</th>
  90. <th>NO. PASIEN</th>
  91. <th>NAMA</th>
  92. <th>TANGGAL BEROBAT</th>
  93. <th>JAM BEROBAT</th>
  94. <th>INFORMASI</th>
  95. <th>KELUHAN</th>
  96. <th>STATUS</th>
  97. <th>AUTHOR</th>
  98. <th>Opsi</th>
  99. </tr>
  100. </thead>
  101. <tbody>
  102.  
  103. <?php
  104. require '../api/koneksi.php';
  105. $sql = mysqli_query($koneksi, "SELECT * from tbl_pendaftaran order by id_pendaftaran DESC") or die("error karena" . mysqli_error($koneksi));
  106. $no = 1;
  107. while ($read = mysqli_fetch_array($sql)) {
  108. $id_pendaftaran = $read['id_pendaftaran'];
  109. $id_pasien = $read['id_pasien'];
  110. $tanggal_pendaftaran = $read['tanggal_pendaftaran'];
  111. $jam_b = $read['jam_b'];
  112. $tinggi_badan = $read['tinggi_badan'];
  113. $berat_badan = $read['berat_badan'];
  114. $lingkar_perut = $read['lingkar_perut'];
  115. $tensi_darah = $read['tensi_darah'];
  116. $suhu = $read['suhu'];
  117. $nadi = $read['nadi'];
  118. $pernafasan = $read['pernafasan'];
  119. $keluhan_pasien = $read['keluhan_pasien'];
  120. $status = $read['status'];
  121. $author = $read['author'];
  122.  
  123. ?>
  124. <tr>
  125. <td style="width:2%" ;><?php echo $no++; ?></td>
  126. <td style="width:3%; text-align:center;"><?php echo $id_pendaftaran; ?></td>
  127. <td style="width:3%; text-align:left;"><?php echo $id_pasien; ?></td>
  128. <td style="width:15%; text-align:left;">
  129. <?php
  130. require '../api/koneksi.php';
  131. $pasien = mysqli_query($koneksi, "SELECT * from tbl_pasien where id_pasien='$id_pasien'") or die("error karena " . mysqli_error($koneksi));
  132. while ($reads = mysqli_fetch_array($pasien)) {
  133. echo $nama_pasien = $reads['nama_pasien'];
  134. }
  135. ?>
  136. </td>
  137. <td style="width:5%; text-align:left;"><?php echo $tanggal_pendaftaran; ?></td>
  138. <td style="width:5%; text-align:left;"><?php echo $jam_b; ?></td>
  139. <td style="width:20%; text-align:left;"><?php echo "Tinggi : ";
  140. echo $tinggi_badan, " Cm";
  141. echo " <br> Berat Badan : ";
  142. echo $berat_badan, " Kg";
  143. echo " <br> Lingkar Perut : ";
  144. echo $lingkar_perut, " Cm";
  145. echo " <br> Tensi Darah : ";
  146. echo $tensi_darah, " mmHg";
  147. echo " <br> Suhu : ";
  148. echo $suhu, " °C";
  149. echo " <br> Nadi : ";
  150. echo $nadi, " kali per menit";
  151. echo " <br> Pernafasan : ";
  152. echo $pernafasan, " kali per menit"; ?></td>
  153. <td><?php echo $keluhan_pasien; ?></td>
  154. <td style="width: 8%;"><?php echo $status; ?></td>
  155. <td style="width: 20%;"><?php echo $author; ?></td>
  156. <td style="text-align: center; width: 7%;">
  157. <a href="../forms/edit_pendaftaran.php?id=<?= $read['id_pendaftaran'] ?>" class="label label-sm label-info">
  158. <i class="bi bi-pencil-square btn btn-success btn-sm"></i></a>
  159. <a href="../api/delete_pendaftaran.php?id=<?= $read['id_pendaftaran'] ?>" onclick="return confirm('Apakah Anda Yakin Ingin Menghapusnya ?')">
  160. <i class="bi bi-trash btn btn-danger btn-sm"></i></a>
  161. </td>
  162. </tr>
  163. <?php } ?>
  164. </tbody>
  165. </table>
  166. </div>
  167. </div>
  168. </div>
  169. </div>
  170. </div>
  171. </section>
  172. </main>
  173. <!-- End #main -->
  174.  
  175. <?php require '../widgets/footer.php'; ?>
  176.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement