-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
156 lines (148 loc) · 8.46 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
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
<?php
session_start();
include 'components/connection.php';
if (isset($_SESSION['user_id'])) {
$user_id = $_SESSION['user_id'];
} else {
$user_id = '';
};
include 'components/add_to_cart.php';
?>
<!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">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons+Outlined" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="./styles/styles.css ?v=<?php echo time(); ?>">
<link rel="stylesheet" href="https://unpkg.com/swiper@8/swiper-bundle.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="https://kit.fontawesome.com/8eb0534a39.js" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.11.3/gsap.min.js" integrity="sha512-gmwBmiTVER57N3jYS3LinA9eb8aHrJua5iQD7yqYCKa5x6Jjc7VDVaEA0je0Lu0bP9j7tEjV3+1qUm6loO99Kw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<title>BURPGER</title>
</head>
<body>
<?php include 'components/loading.php'; ?>
<div class="main-container">
<?php include 'components/main_header.php'; ?>
<main class="main-bg">
<!-- HERO SECTION -->
<section class="hero | padding-block-80">
<div class="container">
<div class="even-columns">
<div class="flow">
<h1 class="fs-primary-heading fw-extrabold">Your home of the best delicious patties!</h1>
<p>Burpger is now online! Order your favorite burgers and combos with just few clicks at the comfort of your home.</p>
<button class="btn transition primary-btn">Order Now</button>
</div>
<div>
<img src="./assets/images/hero.svg" alt="">
</div>
</div>
</div>
</section>
<!-- CATEGORY SECTION -->
<section class="home-category | padding-block-50 container" id="menu">
<h2 class="title | fs-secondary-heading">Categories</h2>
<div class="box-container">
<a href="category.php?category=Fries" class="box transition">
<img src="assets/images/cat-fries.png" alt="">
<h3 class="fs-third-heading fw-semi-bold">Fries</h3>
<p>Enjoy our crispy and golden fries made from the finest potatoes, seasoned to perfection</p>
</a>
<a href="category.php?category=Burger" class="center-box transition">
<img src="assets/images/cat-burger.png" alt="">
<h3 class="fs-third-heading fw-semi-bold">Burger Club</h3>
<p>Indulge in mouthwatering burgers crafted with juicy beef patties or plant-based alternatives, topped with fresh ingredients and served on toasted buns</p>
</a>
<a href="category.php?category=Drinks" class="box transition">
<img src="assets/images/cat-drinks.png" alt="">
<h3 class="fs-third-heading fw-semi-bold">Drinks</h3>
<p>Quench your thirst with our refreshing selection of customizable drinks</p>
</a>
</div>
</section>
<!-- SHOW PRODUCTS -->
<section class="products">
<h1 class="title">Fresh menus</h1>
<div class="box-container">
<?php
$select_products = "SELECT * FROM `products` LIMIT 5";
$res = mysqli_query($conn, $select_products);
if (mysqli_num_rows($res) > 0) {
while ($row = $res->fetch_assoc()) {
?>
<form action="" method="post" class="box">
<input type="hidden" name="pid" value="<?php echo $row['product_ID']; ?>">
<input type="hidden" name="name" value="<?php echo $row['name']; ?>">
<input type="hidden" name="price" value="<?php echo $row['price']; ?>">
<input type="hidden" name="image" value="<?php echo $row['image']; ?>">
<a href="quick_view.php?pid=<?php echo $row['product_ID']; ?>" class="fas fa-eye"></a>
<button type="submit" class="fas fa-shopping-cart" name="add_to_cart"></button>
<img src="./assets/images/<?php echo $row['image']; ?>" alt="">
<a href="category.php?category=<?php echo $row['category']; ?>" class="cat"><?php echo $row['category']; ?></a>
<div class="name"><?php echo $row['name']; ?></div>
<div class="flex">
<div class="price"><span>₱</span><?php echo $row['price']; ?></div>
<input type="number" name="qty" class="qty" min="1" max="99" value="0" maxlength="2">
<script>
document.querySelectorAll('input[type="number"]').forEach(numberInput => {
numberInput.oninput = () => {
if (numberInput.value.length > numberInput.maxLength) numberInput.value = numberInput.value.slice(0, numberInput.maxLength);
};
});
</script>
</div>
</form>
<?php
}
} else {
echo '<p class="empty">no products added yet!</p>';
}
?>
</div>
<!-- <div class="more-btn">
<a href="menu.html" class="btn">veiw all</a>
</div> -->
</section>
</main>
<footer id="contacts">
<section class="contact | container">
<div class="row">
<div class="image">
<img id="contacts-bg" src="./assets/images/contacts.png" alt="">
<div class="info">
<div class="information">
<img src="./assets/icons/location.png" class="icon" alt="" />
<p>124 Bikini Bottom, Cronch St.</p>
</div>
<div class="information">
<img src="./assets/icons/mail.png" class="icon" alt="" />
<p>service@burpger.com</p>
</div>
<div class="information">
<img src="./assets/icons/phone.png" class="icon" alt="" />
<p>123-456-789</p>
</div>
</div>
</div>
<form action="" method="POST">
<h3 class="third-heading fw-medium">Contact Us</h3>
<input type="text" name="name" maxlength="50" class="box" placeholder="Name" required>
<input type="email" name="email" maxlength="50" class="box" placeholder="Email" required>
<textarea name="msg" class="box" required placeholder="Message" maxlength="500" cols="30" rows="10"></textarea>
<input type="submit" value="Send Message" name="send" class="send-btn | btn transition primary-btn">
</form>
</div>
</section>
<div id="copyright">
<p>© 2023 | Burpger Inc.<br><br>DISCLAIMER<br>Burpger Inc. is not a real fast food company.<br>For educational purposes only.</p>
</div>
</footer>
</div>
<script src="./js/main-container.js"></script>
<script src="./js/script.js"></script>
</body>
</html>