Commit f4b29b06 by Mei Romauli Sagala

edit

parent 7b1f33b4
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
<?php <?php
$kueri = mysqli_query($koneksi, "SELECT * FROM pembayaran WHERE member_id = '$member_id'"); $kueri = mysqli_query($koneksi, "SELECT * FROM pembayaran WHERE member_id = '$member_id'");
$row = mysqli_fetch_array($kueri); $row = mysqli_fetch_array($kueri);
if($row['bukti'] == NULL){
?> ?>
<h3> Terimakasih Telah Memesan. </h3> <h3> Terimakasih Telah Memesan. </h3>
<div> Pesanan anda sebesar Rp. <?= $total?>,- <br> <div> Pesanan anda sebesar Rp. <?= $total?>,- <br>
...@@ -33,6 +34,17 @@ ...@@ -33,6 +34,17 @@
<input type="submit" class="btn btn-info" value="Upload"> <input type="submit" class="btn btn-info" value="Upload">
</form> </form>
<br> </div> <br> </div>
<?php
}else{
if($row['status'] == NULL){
echo '<h3 style="color: #b30000"> Terimakasih telah membayar. </h3>';
echo 'Silahkan tunggu konfirmasi pembayaran dari admin. <br>';
}else{
echo 'Pesanan anda telah dikonfirmasi. Terimakasih telah memesan. <br> <br>';
echo "<a href='selesai.php?id=". $member_id ."' class='btn btn-success'> Selesai </a> <br>";
}
}
?>
<br> <br>
</div> </div>
......
<?php <?php
include 'koneksi.php'; include 'koneksi.php';
include 'common/header.php'; include 'common/header.php';
$id_member = $_GET['id_member'];
?> ?>
<h2> <span class="glyphicon glyphicon-shopping-cart"></span>Cart </h2> <h2> <span class="glyphicon glyphicon-shopping-cart"></span>Cart </h2>
<br/> <hr/> <br/> <hr/>
<div class="col-md-12" align="center"> <div class="col-md-12" align="center">
<?php
$sql = mysqli_query($koneksi, "SELECT * FROM pembayaran WHERE member_id = '$id_member'");
$q = mysqli_fetch_array($sql);
if($q['bukti'] == NULL && $q['status'] == NULL){
?>
<table class="table table-hover table-condensed"> <table class="table table-hover table-condensed">
<tr> <tr>
<th> No </th> <th> No </th>
...@@ -25,6 +18,7 @@ if($q['bukti'] == NULL && $q['status'] == NULL){ ...@@ -25,6 +18,7 @@ if($q['bukti'] == NULL && $q['status'] == NULL){
</tr> </tr>
<?php <?php
$id_member = $_GET['id_member'];
$query = mysqli_query($koneksi, "SELECT menu.nama AS nama_menu, menu.harga, pemesanan.id_pemesanan ,pemesanan.jumlah FROM menu $query = mysqli_query($koneksi, "SELECT menu.nama AS nama_menu, menu.harga, pemesanan.id_pemesanan ,pemesanan.jumlah FROM menu
INNER JOIN (pemesanan INNER JOIN member ON member_id = id_member) ON menu_id= id_menu WHERE member_id= '$id_member'"); INNER JOIN (pemesanan INNER JOIN member ON member_id = id_member) ON menu_id= id_menu WHERE member_id= '$id_member'");
$no = 1; $no = 1;
...@@ -64,17 +58,6 @@ if($q['bukti'] == NULL && $q['status'] == NULL){ ...@@ -64,17 +58,6 @@ if($q['bukti'] == NULL && $q['status'] == NULL){
<a href="bayar.php?id_member=<?= $id_member ?>" class="btn btn-success"> Checkout<span class="glyphicon glyphicon-chevron-right"></span> </a> <a href="bayar.php?id_member=<?= $id_member ?>" class="btn btn-success"> Checkout<span class="glyphicon glyphicon-chevron-right"></span> </a>
</div> </div>
<br> <br>
<?
}else if($q['bukti'] != NULL && $q['status'] == NULL){
echo '<h4 style="color: #b30000;"> Terimakasih telah membayar. </h4>';
echo 'Silahkan tunggu konfirmasi pembayaran dari admin.';
}else if($q['bukti'] != NULL && $q['status'] != NULL){
echo '<h4 style="color: #b30000;">Pesanan anda telah diterima. </h4> Terimakasih telah memesan. ';
echo '<a href="selesai.php?id='. $id_member '" class="btn btn-success"> Selesai </a>';
}
}
?>
</div> </div>
<?php <?php
......
...@@ -15,5 +15,5 @@ ...@@ -15,5 +15,5 @@
move_uploaded_file($_FILES['bukti']['tmp_name'], 'picture/'. $bukti); move_uploaded_file($_FILES['bukti']['tmp_name'], 'picture/'. $bukti);
mysqli_query($koneksi, "INSERT INTO pembayaran VALUES('', '$member_id', '$total', '$bukti', '') "); mysqli_query($koneksi, "INSERT INTO pembayaran VALUES('', '$member_id', '$total', '$bukti', '') ");
header('Location: cart.php?id_member='. $member_id); header('Location: bayar.php?id_member='. $member_id);
?> ?>
\ 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