-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
90 lines (81 loc) · 4.19 KB
/
index.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
<?php
include "inc/config.php";
include "layout/header.php";
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Animate.css -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css" />
</head>
<body>
<div class="col-md-9">
<div class="row">
<div class="col-md-13">
<font class="text-color-heading">
<h2 class="animate__animated animate__lightSpeedInLeft animate__slower" align="center"> <b>Favorite
Menu</b> </h2>
</font>
<?php
$k = mysqli_query($konek, "SELECT * FROM produk ORDER BY id ASC limit 3");
while ($data = mysqli_fetch_array($k)) {
?>
<div class="col-md-4">
<font color="black">
<div class="panel panel-default">
<div class="panel-body">
<a href="<?php echo $url; ?>menu.php?id=<?php echo $data['id'] ?>">
<img src="<?php echo $url; ?>uploads/<?php echo $data['gambar'] ?>" width="100%">
<h4><?php echo $data['nama'] ?></h4>
</a>
<p><?php echo $data['deskripsi'] ?></p>
<p style="font-size:18px">Harga : <strong> Rp
<?php echo number_format($data['harga'], 0, ',', '.') ?></strong> </p>
<p>
<a href="<?php echo $url; ?>menu.php?id=<?php echo $data['id'] ?>" class="btn btn-success btn-sm" href="#" role="button">Lihat Detail</a>
<a href="<?php echo $url; ?>keranjang.php?act=beli&&produk_id=<?php echo $data['id'] ?>" class="btn btn-warning btn-sm" href="#" role="button">Pesan</a>
</p>
</div>
</div>
</font>
</div>
<?php } ?>
</div>
</div>
<div class="row">
<div class="col-md-13">
<font class="text-color-heading">
<h2 class="animate__animated animate__lightSpeedInLeft animate__slower" align="center"> <b>Menu
Terbaru</b> </h2>
</font>
<?php
$k = mysqli_query($konek, "SELECT * FROM produk ORDER BY id DESC limit 3");
while ($data = mysqli_fetch_array($k)) {
?>
<div class="col-md-4">
<div class="panel panel-default">
<font color="black">
<div class="panel-body">
<a href="<?php echo $url; ?>menu.php?id=<?php echo $data['id'] ?>">
<img src="<?php echo $url; ?>uploads/<?php echo $data['gambar'] ?>" width="100%">
<h4><?php echo $data['nama'] ?></h4>
</a>
<p style="font-size:18px">Harga : <strong>Rp
<?php echo number_format($data['harga'], 0, ',', '.') ?></strong> </p>
<p>
<a href="<?php echo $url; ?>menu.php?id=<?php echo $data['id'] ?>" class="btn btn-success btn-sm" href="#" role="button">Lihat Detail</a>
<a href="<?php echo $url; ?>keranjang.php?act=beli&&produk_id=<?php echo $data['id'] ?>" class="btn btn-warning btn-sm" href="#" role="button">Pesan</a>
</p>
</div>
</font>
</div>
</div>
<?php } ?>
</div>
</div>
</div>
</body>
</html>
<?php include "layout/footer.php"; ?>