-
Notifications
You must be signed in to change notification settings - Fork 0
/
informasiProduk.php
121 lines (118 loc) · 4.88 KB
/
informasiProduk.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pareanom</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-ENjdO4Dr2bkBIFxQpeoTz1HIcje39Wm4jDKdf19U8gI4ddQ3GYNS7NTKfAdVQSZe" crossorigin="anonymous">
</script>
<link rel="stylesheet" href="assets/styles/infromasiProduk.css">
</head>
<body>
<main>
<nav>
<header>
<a href="index.php">
<!--? Halaman Informasi Produk -->
<div class="garis-bawah-gambar">
<img src="assets/image/Logo Pareanom.png" alt="Logo Pareanom">
</div>
</a>
<h1>PAREANOM</h1>
<h1>CHICKEN BAR</h1>
</header>
<ul>
<a href="index.php">
<li>
<div class="kotak-ikon">
<img src="assets/image/Produk.png">
</div>
<p>PRODUK</p>
</li>
</a>
<a href="halamanBahan.php">
<li>
<div class="kotak-ikon">
<img src="assets/image/Bahan.png">
</div>
<p>BAHAN</p>
</li>
</a>
<a href="halamanRekap.php">
<li>
<div class="kotak-ikon">
<img src="assets/image/Rekap.png">
</div>
<p>REKAP</p>
</li>
</a>
<a href="halamanReject.php">
<li>
<div class="kotak-ikon">
<img src="assets/image/Reject.png">
</div>
<p>REJECT</p>
</li>
</a>
</ul>
</nav>
<article>
<div class="judul">
<h1>INFORMASI PRODUK</h1>
</div>
<section>
<?php
include 'database.php';
$query = mysqli_query($connect, "SELECT DISTINCT nama_produk, harga, foto FROM produk ORDER BY harga ASC, nama_produk ASC");
?>
<div class="tabel">
<table class="table table-striped">
<thead>
<tr>
<th scope="col">No</th>
<th scope="col">Nama Produk</th>
<th scope="col">Bahan Baku</th>
<th scope="col">Harga</th>
</tr>
</thead>
<?php
$id = 1;
while($data = mysqli_fetch_array($query)) :
?>
<tbody>
<tr>
<td><?php echo $id ?></td>
<td><?php echo $data['nama_produk'] ?></td>
<?php
$namaProduk = $data['nama_produk'];
$queryBahan = mysqli_query($connect, "SELECT b.nama_bahan FROM bahan_baku b
INNER JOIN produk p ON b.id_bahan_baku = p.id_bahan_baku WHERE p.nama_produk = '$namaProduk'");
?>
<td>
<ul style="list-style-type: none; padding-left: 20px; text-align: left;">
<?php while($bahanBaku = mysqli_fetch_array($queryBahan)) : ?>
<li>
- <?php echo $bahanBaku['nama_bahan'] ?>
</li>
<?php endwhile ?>
</ul>
</td>
<td><?php echo $data['harga'] ?></td>
</tr>
</tbody>
<?php
$id++;
endwhile
?>
</table>
</div>
</section>
</article>
</main>
<script src="assets/scripts/notifikasi.js"></script>
</body>
</html>