-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathhome.php
136 lines (125 loc) · 6.69 KB
/
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
<?php
//include formador de dropdown
include "formadrops.php";
session_start();
?>
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Bairro Buddy</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="index.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="index.js"></script>
</head>
<body >
<div class="container-fluid">
<nav class="navbar navbar-default navbar-expand-lg ">
<div class="navbar-header">
<a class="navbar-brand" href="./home.php"><b>Bairro Buddy</b></a>
</div>
<!-- Collection of nav links, forms, and other content for toggling -->
<div id="navbarCollapse" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="./home.php">Home</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li ><a data-toggle="dropdown" class="dropdown-toggle" href="#">Login</a>
<!-- dropdown do login -->
<ul class="dropdown-menu form-wrapper">
<li>
<!-- FORM DO LOGIN AQUI! -->
<form method="post" action="login.php">
<div class="form-group">
<input type="text" class="form-control" name="usuario" placeholder="Username" required="required">
</div>
<div class="form-group">
<input type="password" class="form-control" name="password" placeholder="Password" required="required">
</div>
<input type="submit" class="btn btn-primary btn-block" value="Login">
<div class="form-footer">
<a href="#">Forgot Your password?</a>
</div>
</form>
</li>
</ul>
</li>
<li >
<a data-toggle="dropdown" class="dropdown-toggle" href="#">Registre-se</a>
<ul class="dropdown-menu">
<li><a href="./registro_cliente.html" class="dropdown-link">Cliente</a></li>
<li><a href="./registro_empresa.html" class="dropdown-link">Empresa</a></li>
</ul>
</li>
<li>
<a data-toggle="" class="" href="#">
<?php
if(isset($_SESSION['uname'])){
echo "Olá, ".$_SESSION['uname']."!";
} else {
echo "Olá, Visitante!";
}
?></a>
</li>
<li>
<a data-toggle="" class="" href="logout.php">Sair</a>
</li>
</ul>
</div>
</nav>
<div class="estabelecimentos">
<form class="filtroEstabelecimento" action="resultados.php" method="post">
<label style="padding-left: 10px;">Área</label>
<select name="select-localidade" class="ls-select" style="width:300px" data-search="false">
<option value="todas">Todas</option>
<?php
/* aqui entra um echo formador de tags option
isso é pra fazer uso dos dados que existem no BD
ele vai ser sempre formado quando a página carrega porque será
importado logo no começo do Doc. (select distinct)
*/
if ($resultBairro->num_rows > 0) {
while($row = $resultBairro->fetch_assoc()) {
echo "<option value='".$row['bairro']."'>".$row['bairro']."</option>";
}
} else {
echo "Desculpa, mas esse nome não existe aqui. (0 results)";
};
?>
<!--<option value="norte">Zona Norte</option>
<option value="oeste">Zona Oeste</option>
<option value="sul">Zona Sul</option>-->
</select>
<label style="padding-left: 10px;">Tipo</label>
<select name="select-tipo" class="ls-select" style="width:300px" data-search="false">
<option value="todas">Todas</option>
<?php
/* aqui entra um echo formador de tags option
isso é pra fazer uso dos dados que existem no BD
ele vai ser sempre formado quando a página carrega porque será
importado logo no começo do Doc. (select distinct)
*/
if ($resultTipo->num_rows > 0) {
while($row = $resultTipo->fetch_assoc()) {
echo "<option value='".$row['tipo']."'>".$row['tipo']."</option>";
}
} else {
echo "Desculpa, mas esse nome não existe aqui. (0 results)";
};
?>
<!--<option value="restaurante">Restaurantes</option>
<option value="lanchonetes">Lanchonetes</option>
<option value="sul">Zona Sul</option>-->
</select>
<input type="submit" value="Pesquisar">
</form>
</div>
<!-- fim do estabelecimentos-->
</div>
</body>
</html>