-
Notifications
You must be signed in to change notification settings - Fork 0
/
agenda.php
158 lines (148 loc) · 5.94 KB
/
agenda.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
<!DOCTYPE html>
<html lang="pt-br">
<head>
<title>Vote Bem - Agenda de Eventos</title>
<link rel="icon" href="imgs/favicon.ico">
<meta charset="UTF-8">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link type="text/css" rel="stylesheet" href="css/materialize.min.css" media="screen,projection" />
<link rel="stylesheet" href="css/estilo.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>
<?php
if(isset($_POST['periodo'])){
$dataInicial = $_POST['dataInicial'];
$dataFinal = $_POST['dataFinal'];
$order = "WHERE data BETWEEN '$dataInicial' AND '$dataFinal'";
}else{
$order = "";
}
?>
<?php
$sql = "SELECT * FROM tb_eventos $order";
include "PaginasProcessamento/conexao.php";
$vb = $banco -> prepare($sql);
$vb -> execute();
?>
<style>
.img {
padding-top: 3%;
}
.botao {
margin: 0 auto;
}
.separador {
height: 4px;
width: 45px;
margin-top: -10px;
}
</style>
<body>
<main>
<?php include "PaginasProcessamento/nav.php"; ?>
<nav>
<div class="nav-wrapper blue espacamento-lateral">
<div class="col s12">
<a href="index.php" class="breadcrumb">Home</a>
<a href="agenda.php" class="breadcrumb">Agenda</a>
</div>
</div>
</nav>
<div class='container'>
<h1 class='center'>Agenda de Eventos</h1><br><br>
<form method="POST" action="" class="col s12">
<div class="row">
<p>
<h5>Selecione um período:</h5>
</p>
<div class="input-field col s12 m6">
<i class="material-icons prefix">event_note</i>
<input id="de" name="dataInicial" type="date" required class="validate">
</div>
<div class="input-field col s12 m6">
<i class="material-icons prefix">event_note</i>
<input id="ate" name="dataFinal" type="date" required class="validate">
</div>
</div>
<div class="row">
<div class="input-field col s12 m12 l12 center">
<button class="btn waves-effect waves-light blue botao" type="submit" name="periodo">Conferir
<i class="material-icons right">send</i>
</button>
</div>
</div>
<br><br>
</form>
<?php
foreach($vb as $agenda){
$id = $agenda['id_evento'];
$nome = $agenda["nome"];
$imagem = $agenda["imagem"];
$descricao = $agenda["descricao"];
$ingresso = $agenda["ingresso"];
$ingresso = ' R$ ' . number_format($ingresso, 2, ',', '.');
$data = $agenda["data"];
$horario = $agenda["horario"];
$local = $agenda["local"];
echo "<div class='row'>
<div class='col s12 m6 center'>
<img class='img' width='200px' height='200px' src='imgs/eventos/$imagem'>
</div>
<div class='col s12 m6'><a name='ev1'></a>
<h5>Nome:$nome </h5>
<h5>Descrição:$descricao</h5>
<h5>Ingresso:$ingresso</h5>
<h5>Data:$data</h5>
<h5>Horário:$horario</h5>
<h5>Local:$local</h5>
</div>
</div><hr>";
}
?>
</div>
<!-- FIM DOS BLOCOS -->
<h1 class="center">Contagem para a próxima eleição</h1>
<div class="container center">
<div class="row">
<div class="col s12 m4">
<h1 style="font-size:15em;">10</h1>
<h3>Meses</h3>
</div>
<div class="col s12 m4">
<h1 style="font-size:15em;">1</h1>
<h3>Semanas</h3>
</div>
<div class="col s12 m4">
<h1 style="font-size:15em;">1</h1>
<h3>Dias</h3>
</div>
</div>
</div>
</main>
<footer class="page-footer blue">
<div class="container">
<div class="row">
<div class="col l6 s12">
<p><a href="index.php"><img src="imgs/footer-logo.png"></a></p>
</div>
<div class="col l4 offset-l2 s12">
<h5 class="white-text">Compartilhe</h5>
<ul>
<li><a class="grey-text text-lighten-3" href="#!">Twitter</a></li>
<li><a class="grey-text text-lighten-3" href="#!">Facebook</a></li>
<li><a class="grey-text text-lighten-3" href="#!">Instagram</a></li>
</ul>
</div>
</div>
</div>
<div class="footer-copyright">
<div class="container">
© 2017 Copyright - Todos os direitos reservados
</div>
</div>
</footer>
<script type="text/javascript" src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="js/materialize.min.js"></script>
<script type="text/javascript" src="js/custom.js"></script>
</body>
</html>