final

parent 220e42f3
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<div class="container"> <div class="container">
<h2><br>Detail keranjang belanja :</h2><br> <h2><br>Detail keranjang belanja :</h2><br>
<div class="checkout-right"> <div class="checkout-right">
<table class="timetable_sub table-bordered table-hover"> <table class="timetable_sub table table-bordered table-hover">
<thead> <thead>
<tr> <tr>
<th>No. Pesanan</th> <th>No. Pesanan</th>
...@@ -44,9 +44,7 @@ ...@@ -44,9 +44,7 @@
foreach ($_SESSION['items'] as $key => $val) { foreach ($_SESSION['items'] as $key => $val) {
$query = mysqli_query($koneksi, "SELECT * FROM t_buku WHERE isbn = '$key'"); $query = mysqli_query($koneksi, "SELECT * FROM t_buku WHERE isbn = '$key'");
$data = mysqli_fetch_array($query); $data = mysqli_fetch_array($query);
if (isset($_SESSION['pengunjung'])) {
$id_user = $_SESSION['id_user'];
}else{}
$jumlah_harga = $data['harga'] * $val; $jumlah_harga = $data['harga'] * $val;
$total += $jumlah_harga; $total += $jumlah_harga;
$no = 1; $no = 1;
...@@ -80,19 +78,21 @@ ...@@ -80,19 +78,21 @@
} }
?> ?>
<?php <?php
if($total != 0 && isset($_SESSION['pengunjung'])){?> if($total != 0 && isset($_SESSION['pengunjung'])){
<tr style="background-color:#dbase_delete_record(dbase_identifier, record_number);"><td colspan="5" align="right"><b>Total :</b></td><td align="right"><b>Rp. <?php echo number_format($total,2,",",".")?></b></tr></table> echo '
<tr style="background-color:#dbase_delete_record(dbase_identifier, record_number);"><td colspan="5" align="right"><b>Total :</b></td><td align="right"><b>Rp. '.number_format($total,2,",",".").'</b></tr></table>
<p><div align="right"> <p><div align="right">
<div class="checkout-right-basket"> <div class="checkout-right-basket">
<a href="allbook.php"><span class="glyphicon glyphicon-menu-left" aria-hidden="true"></span>Lanjut Berbelanja</a> <a href="allbook.php"><span class="glyphicon glyphicon-menu-left" aria-hidden="true"></span>Lanjut Berbelanja</a>
<a href="savebook.php?isbn=<?php echo $data['isbn']?>&id_user=<?php echo $id_user;?>&total=<?php echo $jumlah_harga;?>">Lakukan pembayaran &nbsp; &nbsp;<span class="glyphicon glyphicon-menu-right" aria-hidden="true"></span></a> <a href="savebook.php">Lakukan pembayaran &nbsp&nbsp;<span class="glyphicon glyphicon-menu-right" aria-hidden="true"></span></a>
<br><br><br><br><br><br> <br><br><br><br><br><br>
</div> </div>
</div></p> </div></p>
; ';
<?php } }
elseif($total != 0) { ?> elseif($total != 0) {
<tr style="background-color:#dbase_delete_record(dbase_identifier, record_number);"><td colspan="5" align="right"><b>Total :</b></td><td align="right"><b>Rp. <?php echo number_format($total,2,",",".")?></b></td></td></td></tr></table> echo '
<tr style="background-color:#dbase_delete_record(dbase_identifier, record_number);"><td colspan="5" align="right"><b>Total :</b></td><td align="right"><b>Rp. '.number_format($total,2,",",".").'</b></td></td></td></tr></table>
<p><div align="right"> <p><div align="right">
<div class="checkout-right-basket"> <div class="checkout-right-basket">
<a href="allbook.php"><span class="glyphicon glyphicon-menu-left" aria-hidden="true"></span>Lanjut Berbelanja</a> <a href="allbook.php"><span class="glyphicon glyphicon-menu-left" aria-hidden="true"></span>Lanjut Berbelanja</a>
...@@ -100,17 +100,18 @@ ...@@ -100,17 +100,18 @@
<br><br><br><br><br> <br><br><br><br><br>
</div> </div>
</div></p> </div></p>
; ';
<?php } }
else { ?> else {
echo '
<tr><td colspan="7" align="center" style="background-color:#ffffff"> <tr><td colspan="7" align="center" style="background-color:#ffffff">
Ups, Keranjang belanja kosong ! </td></tr></table> Ups, Keranjang belanja kosong ! </td></tr></table>
<div class="checkout-right-basket"> <div class="checkout-right-basket">
<a href="allbook.php"><span class="glyphicon glyphicon-menu-left" aria-hidden="true"></span>Lanjut Berbelanja</a> <a href="allbook.php"><span class="glyphicon glyphicon-menu-left" aria-hidden="true"></span>Lanjut Berbelanja</a>
<br><br><br><br><br> <br><br><br><br><br>
</div> </div>
; ';
<?php } ?> }
?> ?>
</table> </table>
</div> </div>
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<div class="col-md-3 agileinfo_single"> <div class="col-md-3 agileinfo_single">
<img src="<?php echo $data['gambar_artikel']; ?>" class="img-responsive" required/> <img src="<?php echo $data['gambar_artikel']; ?>" class="img-responsive" required/>
</div><br><br><br><br><br><br><br><br><br> </div><br><br><br><br><br><br><br><br><br>
<input type="file" name="gambar_artikel" value="<?php echo $data['gambar_artikel']; ?>" required/> <input type="file" name="gambar_artikel" value="<?php echo $data['gambar_artikel']; ?>"/>
<input type="submit" name="edit" value="edit"> <input type="submit" name="edit" value="edit">
</form> </form>
</div> </div>
......
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
</select> </select>
<b><br>File Gambar : <br></b> <b><br>File Gambar : <br></b>
<div class="col-md-5 agileinfo_single"> <div class="col-md-5 agileinfo_single">
<img src="<?php echo $data['gambar']; ?>" class="img-responsive" required/> <img src="<?php echo $data['gambar']; ?>" class="img-responsive"/>
</div><br> </div><br>
<input type="file" name="gambar" accept="img/*" required> <input type="file" name="gambar" accept="img/*" required>
<input type="submit" name="edit" value="edit"> <input type="submit" name="edit" value="edit">
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<input type="hidden" name="id_user" value="<?php $_GET['id_user'];?>"> <input type="hidden" name="id_user" value="<?php $_GET['id_user'];?>">
<input type="hidden" name="isbn" value="<?php $_GET['isbn'];?>"> <input type="hidden" name="isbn" value="<?php $_GET['isbn'];?>">
<input type="hidden" name="total" value="<?php $_GET['total'];?>"> <input type="hidden" name="total" value="<?php $_GET['total'];?>">
<input type="submit" name="pesan" value="Pesan Sekarang"> <input type="submit" name="pesan" value="Simpan Pesanan">
</form> </form>
</div> </div>
<div class="col-md-8"> <div class="col-md-8">
......
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