-
Notifications
You must be signed in to change notification settings - Fork 17
/
produk.php
54 lines (47 loc) · 1.38 KB
/
produk.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
include 'header.php';
?>
<!-- PRODUK TERBARU -->
<div class="container">
<h2 style=" width: 100%; border-bottom: 4px solid #ff8680"><b>Produk Kami</b></h2>
<div class="row">
<?php
$result = mysqli_query($conn, "SELECT * FROM produk");
while ($row = mysqli_fetch_assoc($result)) {
?>
<div class="col-sm-6 col-md-4">
<div class="thumbnail">
<img src="image/produk/<?= $row['image']; ?>" >
<div class="caption">
<h3><?= $row['nama']; ?></h3>
<h4>Rp.<?= number_format($row['harga']); ?></h4>
<div class="row">
<div class="col-md-6">
<a href="detail_produk.php?produk=<?= $row['kode_produk']; ?>" class="btn btn-warning btn-block">Detail</a>
</div>
<?php if(isset($_SESSION['kd_cs'])){ ?>
<div class="col-md-6">
<a href="proses/add.php?produk=<?= $row['kode_produk']; ?>&kd_cs=<?= $kode_cs; ?>&hal=1" class="btn btn-success btn-block" role="button"><i class="glyphicon glyphicon-shopping-cart"></i> Tambah</a>
</div>
<?php
}
else{
?>
<div class="col-md-6">
<a href="keranjang.php" class="btn btn-success btn-block" role="button"><i class="glyphicon glyphicon-shopping-cart"></i> Tambah</a>
</div>
<?php
}
?>
</div>
</div>
</div>
</div>
<?php
}
?>
</div>
</div>
<?php
include 'footer.php';
?>