Commit 2a702f87 by Roy Junedi Simamora

edit

parent 04c8f444
......@@ -61,7 +61,7 @@
}
else{
echo '<a href="member_menu.php" class="btn btn-info"><span class="glyphicon glyphicon-chevron-left"></span> Pesan Lagi</a> ';
echo '<a href="bayar.php?id_member=<?= $id_member ?>" class="btn btn-success"> Checkout<span class="glyphicon glyphicon-chevron-right"></span> </a>';
echo '<a href="bayar.php?id_member='. $id_member .'" class="btn btn-success"> Checkout<span class="glyphicon glyphicon-chevron-right"></span> </a>';
}
?>
</div>
......
......@@ -46,8 +46,11 @@
}
echo'<li><a href="cart.php?id_member='.$id_member.'"><span class="glyphicon glyphicon-shopping-cart "></span>&nbsp;Cart</a></li>';
}
if(isset($_SESSION['user']) || isset($_SESSION['admin']))
{
echo '<li><a href="form_comment.php"><span class="glyphicon glyphicon-comment"></span>feedback</a></li>';
}
?>
<li><a href="form_comment.php"><span class="glyphicon glyphicon-comment"></span>feedback</a></li>
<?php
if(isset($_SESSION['user']) || isset($_SESSION['admin'])){
......
<?php
include 'koneksi.php';
include 'common/header.php';
?>
<h2> <span class="glyphicon glyphicon-eye-open"></span> Order Detail</h2>
<hr> <br>
<a href="daftar_pesanan.php" class="btn btn-info"> <span class="glyphicon glyphicon-chevron-left"></span> Kembali </a>
<br> <br>
<table class="table table-condensed table-hover">
<tr>
<th> NO </th>
<th> Gambar </th>
<th> Nama Menu </th>
<th> Tanggal di pesan</th>
<th> Harga Satuan </th>
<th> Jumlah </th>
<th> Subtotal </th>
</tr>
<?php
global $total;
$id_member = $_GET['id_member'];
$query = mysqli_query($koneksi, "SELECT pemesanan.id_pemesanan, pemesanan.tanggal, pemesanan.jumlah, menu.nama AS nama_menu, menu.gambar,
menu.kategori_id, menu.harga,kategori.nama_kategori FROM pemesanan INNER JOIN (menu INNER JOIN kategori ON kategori_id = id_kategori) ON menu_id = id_menu WHERE member_id = '$id_member'");
$no = 1;
while($row = mysqli_fetch_assoc($query)){
$subtotal = $row['harga'] * $row['jumlah'];
?>
<tr>
<td> <?= $no;?> </td>
<td> <img src="picture/<?= $row['gambar']?>" width="150" height="140"> </td>
<td> <?= $row['nama_menu'] ?> </td>
<td> <?= $row['tanggal']?> </td>
<td> Rp. <?= number_format($row['harga'])?>,- </td>
<td> <?= $row['jumlah']?> </td>
<td> Rp. <?= number_format($subtotal) ?>,- </td>
</tr>
<?php
$no++;
$total = $total += $subtotal;
}
?>
</table>
<div align="right"> <font size="5" color="#321324"> Total : Rp. <?= number_format($total)?>,- </font> </div>
<br>
<?php include 'common/footer.php'; ?>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment