forked from Biplob14/Restaurant-Finding-System
-
Notifications
You must be signed in to change notification settings - Fork 0
/
restaurant_home.php
220 lines (150 loc) · 4.19 KB
/
restaurant_home.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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
<?php include "header.php";?>
<?php include "server_connect.php"; ?>
<style>
<?php include "style/restaurant_home.css" ?>
</style>
<?php
if (isset($_SESSION['r_name'])) {
$r_name = $_SESSION['r_name'];
$query = "SELECT * FROM food_post WHERE r_name = '$r_name'";
$posts=mysqli_query($db,$query);
while ($row=mysqli_fetch_assoc($posts)) {
// $user_index = $row['id'];
$r_name = $row['r_name'];
$food_name = $row['food_name'];
$food_img = $row['food_img'];
}
}
$r_name = $_GET['name'];
?>
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<div class="container">
<div class="text-center">
<h2 class="text-primary" title="Restaurant name"><?php echo $r_name;?></h2>
</div>
<div class="row form-group"><?php include "r_slider.php" ?> </div>
<div class="transparent-box">
<p class="slider-text">Find your test from our best</p>
</div>
<div class="row form-group">
<div class="col-lg-9"> <!-- food items -->
<div class="row form-group">
<div class="col-lg-4 itm_img">
<img src="resource/item1.jpg" height="200px" width="100%">
<div class="middle">
<div class="text">Burger</div>
</div>
<p>Burger</p>
</div>
<div class="col-lg-4 itm_img">
<img src="resource/item2.jpg" height="200px" width="100%">
<div class="middle">
<div class="text">Pasta</div>
</div>
<p>Pasta</p>
</div>
<div class="col-lg-4 itm_img">
<img src="resource/item3.jpg"height="200px" width="100%">
<div class="middle">
<div class="text">Mojito</div>
</div>
<p>Mojito</p>
</div>
</div>
<div class="row form-group">
<div class="col-lg-4 itm_img">
<img src="resource/item4.jpg" height="200px" width="100%">
<div class="middle">
<div class="text">Pizza</div>
</div>
<p>Pizza</p>
</div>
<div class="col-lg-4 itm_img">
<img src="resource/item5.jpg" height="200px" width="100%">
<div class="middle">
<div class="text">Chicken</div>
</div>
<p>Chicken</p>
</div>
<div class="col-lg-4 itm_img">
<img src="resource/item6.jpg" height="200px" width="100%">
<div class="middle">
<div class="text">Spheghatti</div>
</div>
<p>Speghatti</p>
</div>
</div>
</div>
<div class="col-lg-3 align-self-center" >
<img src="resource/r_logo.png" class="rounded mx-auto d-block" height="100px" width="100px" align="align-self-center">
<?php echo"<label class='font-primary'><h2><a href='menu.php?name=$r_name'>Food Menu</a></h2></label>"?>
<img src="resource/menu.jpg" height="366px" width="100%">
</div>
</div>
</div>
</div>
</body>
</html>
<style type="text/css">
.col-lg-9 p{
text-align: center;
background-color: #ffd51e;
text-decoration: bold;
text-transform: uppercase;
letter-spacing: 3px;
font-weight: bold;
}
.itm_img {
opacity: 1;
display: block;
transition: .5s ease;
backface-visibility: hidden;
}
.middle {
transition: .5s ease;
opacity: 0;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
text-align: center;
}
.text {
border-radius: 25px;
background-color: #38006F;
color: white;
font-size: 16px;
padding: 16px 32px;
}
.text-primary{
border-radius: 25px;
background-color: #38006F;
color: white;
font-size: 40px;
}
.itm_img:hover {
opacity: 0.7;
}
.middle:hover {
opacity: 1;
}
</style>
<div class="container">
<!-- <marquee behavior="scroll" direction="left" scrollamount="10">Faster...</marquee> -->
<!-- Offer scrolling from db -->
<?php include "server_connect.php" ?>
<?php
$query = "SELECT * FROM food_post" ;
$select_posts=mysqli_query($db,$query);
while ($row=mysqli_fetch_assoc($select_posts)) {
$food_offer = $row['food_offer'];
echo "<marquee behavior='scroll' direction='right' scrollamount='10'>{$food_offer}</marquee>";
}
?>
</div>
<?php include "footer.php";?>