Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include("sess_check.php");
- $pagedesc = "Info Pesanan";
- include("layout_top.php");
- include("dist/function/format_tanggal.php");
- include("dist/function/format_rupiah.php");
- ?>
- <div id="page-wrapper">
- <div class="container-fluid">
- <div class="row">
- <div class="col-lg-12">
- <h1 class="page-header">Info Pesanan</h1>
- </div>
- </div>
- <div class="row">
- <div class="col-lg-12"><?php include("layout_alert.php"); ?></div>
- </div>
- <div class="row">
- <div class="col-lg-12">
- <div class="panel panel-default">
- <div class="panel-heading">
- <a href="infopesan_tambah.php" class="btn btn-success">Tambah</a>
- </div>
- <div class="panel-body">
- <table class="table table-striped table-bordered table-hover" id="tabel-data">
- <thead>
- <tr>
- <th width="1%">No</th>
- <th width="5%">Menu</th>
- <th width="15%">Nama Pemesan</th>
- <th width="3%">Jumlah</th>
- <th width="5%">Tgl. Masuk</th>
- <th width="10%">Keterangan</th>
- <th width="5%">Opsi</th>
- </tr>
- </thead>
- <tbody>
- <?php
- $i = 1;
- $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";
- $ress = mysqli_query($conn, $sql);
- while($data = mysqli_fetch_array($ress)) {
- echo '<tr>';
- echo '<td class="text-center">'. $i .'</td>';
- echo '<td class="text-center">'. $data['id_menu'] .'</td>';
- echo '<td class="text-center">'. $data['id'] .'</td>';
- echo '<td class="text-center">'. $data['jml_pesan'] .'</td>';
- echo '<td class="text-center">'. format_tanggal($data['tgl_pesan']) .'</td>';
- echo '<td class="text-center">'. $data['ket_pesanan'] .'</td>';
- echo '<td class="text-center">';?>
- <a href="infopesan_edit.php?nama='. $data['id_pesan'] .'" class="btn btn-warning btn-xs">Edit</a>';?>
- <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>
- <?php
- echo '</td>';
- echo '</tr>';
- $i++;
- }
- ?>
- </tbody>
- </table>
- </div>
- <div class="modal fade bs-example-modal" id="myModal" tabindex="-1" role="dialog" aria-hidden="true">
- <div class="modal-dialog modal-lg">
- <div class="modal-content">
- <div class="modal-body">
- <p>One fine body…</p>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <script type="text/javascript">
- $(document).ready(function() {
- $('#tabel-data').DataTable({
- "responsive": true,
- "processing": true,
- "columnDefs": [
- { "orderable": false, "targets": [6] }
- ]
- });
- $('#tabel-data').parent().addClass("table-responsive");
- });
- </script>
- <script>
- var app = {
- code: '0'
- };
- $('[data-load-code]').on('click',function(e) {
- e.preventDefault();
- var $this = $(this);
- var code = $this.data('load-code');
- if(code) {
- $($this.data('remote-target')).load('karyawan_detail.php?code='+code);
- app.code = code;
- }
- });
- </script>
- <?php
- include("layout_bottom.php");
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement