-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
464 lines (335 loc) · 16.1 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
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
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
<?php
session_start();
include_once "includes/db.inc.php";
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta name="description" content="" />
<meta name="author" content="" />
<title>Elevens Caffé</title>
<!-- Font Awesome icons (free version)-->
<script src="https://use.fontawesome.com/releases/v5.12.1/js/all.js" crossorigin="anonymous"></script>
<!-- Google fonts-->
<link href="https://fonts.googleapis.com/css?family=Merriweather+Sans:400,700" rel="stylesheet" />
<link href="https://fonts.googleapis.com/css?family=Merriweather:400,300,300italic,400italic,700,700italic" rel="stylesheet" type="text/css" />
<link href="https://fonts.googleapis.com/css?family=Great+Vibes&display=swap" rel="stylesheet">
<!-- Third party plugin CSS-->
<link href="https://cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/1.1.0/magnific-popup.min.css" rel="stylesheet" />
<!-- Core theme CSS (includes Bootstrap)-->
<link href="assets/css/styles.css" rel="stylesheet" />
</head>
<style>
/*--------------------*/
/* ABOUT US */
/*--------------------*/
#mu-about {
background-color: #fff;
display: inline;
float: left;
width: 100%;
}
.mu-about-area {
display: inline;
float: left;
padding: 100px 0;
width: 100%;
}
.mu-about-left {
display: inline;
float: left;
width: 100%;
}
.mu-about-right {
display: inline;
float: left;
margin-top: 35px;
width: 100%;
background-color: #fff;
padding: 40px;
margin-left: -175px;
box-shadow: 3px 1px 18px -9px #000;
}
.mu-about-right p {
font-size: 15px;
margin: 10px 0;
}
.itemEvento {
display: flex;
}
.itemEvento p {
margin-left: 10px;
}
section#events img.eventImg {
width: 700px;
height: 400px;
}
.titleSection {
background: var(--green);
padding-top: 20px;
display: flex;
justify-content: center;
align-items: center;
box-shadow: 5px 10px var(--yellow);
}
.justify {
display: flex;
justify-content: center;
align-items: center;
}
</style>
<!---- Icon admin Login -->
<?php
if(isset($_SESSION['fname'])){
include "assets/content/icon_admin.php" ;
}
?>
<?php include "assets/content/navbar.php" ?>
<header class="masthead">
<div class="container h-100">
<div class="row h-100 align-items-center justify-content-center text-center">
<div class="col-lg-10 align-self-end">
<?php if(isset($_SESSION['userId'])) {?>
<?php if(isset($_SESSION['foto_status']) == "com") {?>
<a>
<img class="img-thumbnail img-index" src="includes/showfile.php?user_id=<?php echo $_SESSION['userId'];?>" width="100">
</a>
<?php } ?>
<?php if(isset($_SESSION['foto_status']) == "sem") {?>
<?php } ?>
<?php } ?>
<h1 class="text-uppercase text-white font-weight-bold">Bem-Vindo
<?php
if(isset($_SESSION['fname'])){
if($_SESSION['userStatus'] == 'admin'){
echo $_SESSION['userStatus'];
}else{
echo "<span>" . $_SESSION['fname'] . "</span>";
}
}
else{
echo '';
}
?>
</h1>
<hr class="divider my-4" />
</div>
<div class="col-lg-8 align-self-baseline">
<p class="text-white-75 font-weight-light mb-5">Seja Bem-Vindo ao espaço mais agradável da cidade</p>
<a class="btn btn-main-color btn-xl js-scroll-trigger" href="#about">Navegar</a>
</div>
</div>
</div>
</header>
<!-- About section-->
<?php
if(isset($_SESSION['userId'])){
echo '<section class="page-section bg-warning" id="about">
<div class="container">
<div class="row justify-content-center">
<div class="col-lg-8 text-center">
<h2 class="text-white mt-0">Está<span> Autenticado! </span></h2>
<hr class="divider light my-4" />
<p class="text-white-50 mb-4">Agora pode fazer uma reserva!</p>
<a class="btn btn-light btn-xl js-scroll-trigger" href="reservar/menu_reservas.php">Reservar Mesa!</a>
</div>
</div>
</div>
</section>';
}
else{
echo '<section class="page-section bg-warning" id="about">
<div class="container">
<div class="row justify-content-center">
<div class="col-lg-8 text-center">
<h2 class="text-white mt-0">Não está <span>autenticado</span></h2>
<p class="text-white-50 mb-4"></p>
<a href="autenticar.php" class="btn btn-light btn-xl js-scroll-trigger" href="#services">Autenticar!</a>
</div>
</div>
</div>
</section>';
}
?>
<section class="page-section bg-elevens" id="about">
<div class="container">
<div class="row justify-content-center">
<div class="col-lg-8 text-center">
<h1 class="text-white mt-0">Elevens Caffé</h1>
<h2 class="text-white mt-0">Abertos <span>todos os dias </span> das 8:00 as 23:00 </h2>
</div>
</div>
</div>
</section>
<?php require "./includes/showEventos.php"?>
<section id="events">
<div class="bg-elevensEvents">
<div class="container">
<div class="titleSection">
<h1 class="text-white"">Nossos eventos</h1>
</div>
<?php foreach($result as $evento) :?>
<div class="row">
<div class="col-md-12">
<?php if($evento['evento_status'] == 'ativo') : ?>
<div class="mu-about-area">
<!-- Start Feature Content -->
<div class="row noWrap">
<div class="col-md-6">
<div class="mu-about-left">
<img class="eventImg" src="includes/showFotoEvento.php?id=<?= $evento['id'];?>" >
</div>
</div>
<div class="col-md-6">
<div class="mu-about-right">
<h2><?=$evento['title']?></h2>
<p class="mt-3 mb-3"><?=$evento['descricao']?></p>
<div class="itemEvento">
<img src="assets\img\calendario.svg" width="40" height="40" alt="" >
<p class="font-weight-bolder labelEvento"> Data do evento: <span class="font-weight-bolder"><?= $evento['data'] ?></span></p>
</div>
<div class="mt-3 itemEvento">
<img src="assets/img/tempo.svg" width="40" height="40" alt="">
<p class="font-weight-bolder labelEvento"> Hora: <span class="font-weight-bolder"><?= $evento['hora'] ?></span></p>
</div>
<?php if(isset($_SESSION['userId']) ) : ?>
<div class="row mt-6">
<a class="btn btn-outline btn-secondary d-flex justify-content-end mt-5" href="eventos/reservarEvento.php?id=<?= $evento['id'];?>">Quero fazer reserva para este evento</a>
</div>
<?php endif ?>
</div>
</div>
</div>
<!-- End Feature Content -->
<?php if(isset($_SESSION['userId'])) : ?>
<?php if($_SESSION['userStatus'] == 'admin') : ?>
<div class="container-fluid p-0">
<div class=" text-center ">
<a class="btn btn-warning text-white mt-4" name="submit-foto" href="eventos/editarEvento.php?id=<?= $evento['id'];?>" type="submit">Editar Evento<a>
</div>
</div>
<?php endif ?>
<?php endif ?>
</div>
<?php endif ?>
</div>
</div>
<?php endforeach ?>
<?php if(isset($_SESSION['userId']) ) : ?>
<?php if($_SESSION['userStatus'] == 'admin') : ?>
<div class="justify pb-5">
<a href="eventos/add_evento.php" class="btn btn-success btn-xl ">Inserir Evento</a>
</div>
</div>
<?php endif ?>
<?php if($_SESSION['userStatus'] == 'user') : ?>
<div class="justify pb-5">
<a href="reservar/consultarReservas_eventos.php " class="btn btn-success btn-xl ">Consultar as minhas reservas em eventos</a>
</div>
</div>
<?php endif ?>
<?php endif ?>
</div>
</section>
<!-- Services section-->
<section class="page-section" id="services">
<div class="container">
<h2 class="text-center mt-0">Visite-nos</h2>
<hr class="divider my-4" />
<div class="row justify">
<div class="col-lg-3 col-md-6 text-center">
<div class="mt-5">
<i class="fas fa-4x fa-gem text-warning mb-4"></i>
<h3 class="h4 mb-2">Eventos</h3>
<p class="text-muted mb-0">Os nossos eventos são muito conhecidos por Espinho e arredores!</p>
</div>
</div>
<div class="col-lg-3 col-md-6 text-center">
<div class="mt-5">
<i class="fas fa-4x fa-coffee text-warning mb-4"></i>
<h3 class="h4 mb-2">Excelente espaço</h3>
<p class="text-muted mb-0">Furnecemos o espaço perfeito para convivio</p>
</div>
</div>
</div>
</div>
</section>
</section>
<!-- Call to action section-->
<section class="page-section bg-dark text-white">
<div class="container text-center">
<h2 class="mb-4">O que acha do <span>Elevens Caffe</span>?</h2>
<a class="btn btn-light btn-xl" href="opiniao\menuOpiniao.php">Dê-nos a sua opinião</a>
</div>
</section>
<?php require "./includes/showOpinions.php"?>
<section class="page-section ">
<div class="container">
<h2 class="text-center"><span> Algumas opiniões de clientes</span></h2>
<?php foreach($opinioes as $opiniao) :?>
<?php if($opiniao['status'] == "aceito") : ?>
<div class="card">
<div class="card-body">
<div class="row">
<div class="col-md-2">
<img src="includes/showfile.php?user_id=<?php echo $opiniao['id_client'];?>" class="img img-rounded img-fluid"/>
<p class="text-secondary text-center"><?=$opiniao['dateTotal']?></p>
</div>
<div class="col-md-10">
<p>
<a class="float-left text-danger" href="https://maniruzzaman-akash.blogspot.com/p/contact.html"><strong><?=$opiniao['username']?></strong></a>
</p>
<div class="clearfix"></div>
<p><?= $opiniao['opiniao']?></p>
<?php if(isset($_SESSION['userId']) ) : ?>
<?php if($opiniao['id_client'] == $_SESSION['userId'] ) : ?>
<div class="container-fluid p-0">
<div class=" text-center ">
<a class="btn btn-warning text-white mt-4" name="submit-foto" href="eventos/editarEvento.php?id=<?= $evento['id'];?>" type="submit">Editar<a>
</div>
</div>
<?php endif ?>
</div>
</div>
</div>
<?php endif ?>
</div>
<?php endif ?>
<?php endforeach ?>
</div>
</section>
<!-- Contact section-->
<section class="page-section " id="contact">
<div class="container ">
<div class="row justify-content-center">
<div class="col-lg-8 text-center">
<h2 class="mt-0">Deseja mais alguma coisa?</h2>
<hr class="divider my-4" />
<p class="text-muted mb-5">Entre em contacto connosco!</p>
</div>
</div>
<div class="row">
<div class="col-lg-4 ml-auto text-center mb-5 mb-lg-0">
<i class="fas fa-phone fa-3x mb-3 text-muted"></i>
<div>+351 (91) 9999999</div>
</div>
<div class="col-lg-4 mr-auto text-center">
<i class="fas fa-envelope fa-3x mb-3 text-muted"></i><a class="d-block" href="mailto:[email protected]">[email protected]</a>
</div>
</div>
</div>
</section>
<!-- Footer-->
<?php include "assets/content/footer.php"?>
<!-- Bootstrap core JS-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.bundle.min.js"></script>
<!-- Third party plugin JS-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.4.1/jquery.easing.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/1.1.0/jquery.magnific-popup.min.js"></script>
<!-- Core theme JS-->
<script src="js/scripts.js"></script>
</body>
</html>