-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreserva.php
97 lines (84 loc) · 4.67 KB
/
reserva.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
<?php
include_once('config/conexao.php');
include_once('config/constantes.php');
include_once('func/funcoes.php');
$listar_titulo_reserva = listarTodosRegistros('tituloreserva', 'idtituloreserva, titulo1, titulo2, titulo2_1, titulo2_2, cadastro, alteracao, ativo, img, msgreserva', 'A');
foreach ($listar_titulo_reserva as $item_titulo_reserva) {
$titulo1_reserva = $item_titulo_reserva->titulo1;
$titulo2_reserva = $item_titulo_reserva->titulo2;
$titulo2_1reserva = $item_titulo_reserva->titulo2_1;
$titulo2_2reserva = $item_titulo_reserva->titulo2_2;
$img_reserva = $item_titulo_reserva->img;
}
?>
<section id="book-a-table" class="book-a-table">
<div class="container" data-aos="fade-up">
<div class="section-header">
<h2><?php echo $titulo1_reserva; ?></h2>
<p><?php echo $titulo2_reserva; ?><span><?php echo $titulo2_1reserva; ?></span> <?php echo $titulo2_2reserva; ?></p>
</div>
<div class="row g-0">
<div class="col-lg-4 reservation-img" style="background-image: url(./assets/img/reserva/<?php echo $img_reserva; ?>);" data-aos="zoom-out" data-aos-delay="200"></div>
<div class="col-lg-8 d-flex align-items-center">
<form action="" method="POST" role="form" class="rafaelFrm" data-aos="fade-up" id="faelStyle">
<div class="row gy-4">
<div class="col-lg-4 col-md-6">
<input type="text" name="name" class="form-control" id="name" placeholder="Seu Nome" data-rule="minlen:4" data-msg="Please enter at least 4 chars">
<div class="validate"></div>
</div>
<div class="col-lg-4 col-md-6">
<input type="email" class="form-control" name="email" id="email" placeholder="Seu Email" data-rule="email" data-msg="Please enter a valid email">
<div class="validate"></div>
</div>
<div class="col-lg-4 col-md-6">
<input type="text" class="form-control" name="phone" id="phone" placeholder="Seu Telefone" data-rule="minlen:4" data-msg="Please enter at least 4 chars">
<div class="validate"></div>
</div>
<div class="col-lg-4 col-md-6">
<input type="text" name="date" class="form-control" id="date" placeholder="Data" data-rule="minlen:4" data-msg="Please enter at least 4 chars">
<div class="validate"></div>
</div>
<div class="col-lg-4 col-md-6">
<input type="text" class="form-control" name="time" id="time" placeholder="Hora" data-rule="minlen:4" data-msg="Please enter at least 4 chars">
<div class="validate"></div>
</div>
<div class="col-lg-4 col-md-6">
<input type="number" class="form-control" name="people" id="people" placeholder="Numero de Pessoas" data-rule="minlen:1" data-msg="Please enter at least 1 chars">
<div class="validate"></div>
</div>
</div>
<div class="form-group mt-3">
<textarea class="form-control" name="message" rows="5" placeholder="Mensagem"></textarea>
<div class="validate"></div>
</div>
<style>
button {
background-color: red;
padding: 20px;
width: 20%;
border-radius: 20px;
color: white;
border: none;
outline: none;
}
</style>
<br>
<div class="text-center"><button type="submit">Salvar</button></div>
</form>
</div><!-- End Reservation Form -->
</div>
</div>
</section><!-- End Book A Table Section -->
<?php
if (isset($_POST['name']) && isset($_POST['email']) && isset($_POST['phone']) && isset($_POST['date']) && isset($_POST['time']) && isset($_POST['people']) && isset($_POST['message'])) {
$nome = $_POST['name'];
$email = $_POST['email'];
$telefone = $_POST['phone'];
$data = $_POST['date'];
$hora = $_POST['time'];
$pessoas = $_POST['people'];
$mensagem = $_POST['message'];
$resultado = cadastro($nome, $email, $telefone, $data, $hora, $pessoas, $mensagem);
} else {
}
?>