Advertisement
Guest User

Untitled

a guest
Dec 7th, 2019
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.69 KB | None | 0 0
  1. <?php
  2. include("sess_check.php");
  3.  
  4. $pagedesc = "Info Pesanan";
  5. include("layout_top.php");
  6. include("dist/function/format_tanggal.php");
  7. include("dist/function/format_rupiah.php");
  8. ?>
  9. <div id="page-wrapper">
  10. <div class="container-fluid">
  11. <div class="row">
  12. <div class="col-lg-12">
  13. <h1 class="page-header">Info Pesanan</h1>
  14. </div>
  15. </div>
  16.  
  17. <div class="row">
  18. <div class="col-lg-12"><?php include("layout_alert.php"); ?></div>
  19. </div>
  20.  
  21. <div class="row">
  22. <div class="col-lg-12">
  23. <div class="panel panel-default">
  24. <div class="panel-heading">
  25. <a href="infopesan_tambah.php" class="btn btn-success">Tambah</a>
  26. </div>
  27. <div class="panel-body">
  28. <table class="table table-striped table-bordered table-hover" id="tabel-data">
  29. <thead>
  30. <tr>
  31. <th width="1%">No</th>
  32. <th width="5%">Menu</th>
  33. <th width="15%">Nama Pemesan</th>
  34. <th width="3%">Jumlah</th>
  35. <th width="5%">Tgl. Masuk</th>
  36. <th width="10%">Keterangan</th>
  37. <th width="5%">Opsi</th>
  38. </tr>
  39. </thead>
  40. <tbody>
  41. <?php
  42. $i = 1;
  43. $sql = "SELECT info_pesan.*, menu_makanan.*, data_pemesan.* FROM info_pesan, menu_makanan, data_pemesan WHERE info_pesan.id_menu=menu_makanan.id_menu AND info_pesan.id=data_pemesan.id ORDER BY info_pesan.tgl_pesan DESC";
  44. $ress = mysqli_query($conn, $sql);
  45. while($data = mysqli_fetch_array($ress)) {
  46. echo '<tr>';
  47. echo '<td class="text-center">'. $i .'</td>';
  48. echo '<td class="text-center">'. $data['id_menu'] .'</td>';
  49. echo '<td class="text-center">'. $data['id'] .'</td>';
  50. echo '<td class="text-center">'. $data['jml_pesan'] .'</td>';
  51. echo '<td class="text-center">'. format_tanggal($data['tgl_pesan']) .'</td>';
  52. echo '<td class="text-center">'. $data['ket_pesanan'] .'</td>';
  53. echo '<td class="text-center">';?>
  54. <a href="infopesan_edit.php?nama='. $data['id_pesan'] .'" class="btn btn-warning btn-xs">Edit</a>';?>
  55. <a href="infopesan_hapus.php?trx=<?php echo $data['id_pesan'];?>" onclick="return confirm('Apakah anda yakin akan menghapus <?php echo $data['id_pesan'];?>?');" class="btn btn-danger btn-xs">Hapus</a></td>
  56. <?php
  57. echo '</td>';
  58. echo '</tr>';
  59. $i++;
  60. }
  61. ?>
  62. </tbody>
  63. </table>
  64. </div>
  65.  
  66. <div class="modal fade bs-example-modal" id="myModal" tabindex="-1" role="dialog" aria-hidden="true">
  67. <div class="modal-dialog modal-lg">
  68. <div class="modal-content">
  69. <div class="modal-body">
  70. <p>One fine body…</p>
  71. </div>
  72. </div>
  73. </div>
  74. </div>
  75. </div>
  76. </div>
  77. </div>
  78. </div>
  79. </div>
  80. <script type="text/javascript">
  81. $(document).ready(function() {
  82. $('#tabel-data').DataTable({
  83. "responsive": true,
  84. "processing": true,
  85. "columnDefs": [
  86. { "orderable": false, "targets": [6] }
  87. ]
  88. });
  89.  
  90. $('#tabel-data').parent().addClass("table-responsive");
  91. });
  92. </script>
  93. <script>
  94. var app = {
  95. code: '0'
  96. };
  97.  
  98. $('[data-load-code]').on('click',function(e) {
  99. e.preventDefault();
  100. var $this = $(this);
  101. var code = $this.data('load-code');
  102. if(code) {
  103. $($this.data('remote-target')).load('karyawan_detail.php?code='+code);
  104. app.code = code;
  105.  
  106. }
  107. });
  108. </script>
  109. <?php
  110. include("layout_bottom.php");
  111. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement