-
Notifications
You must be signed in to change notification settings - Fork 0
/
local2.php
102 lines (91 loc) · 3.82 KB
/
local2.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
<DOCTYPE! hmtl>
<html lang="PT-BR">
<head>
<meta charset="UTF-8">
<link href="default.css" rel="stylesheet" type="text/css" media="all">
<link href='http://fonts.googleapis.com/css?family=Abel' rel='stylesheet' type='text/css'>
<title>
NutriMapa
</title>
</head>
<body>
<script type="text/javascript">
$(':radio').onClick(
function(){
$('.choice').text( this.value + ' Pimentas' );
}
)
</script>
<header>
<a href="index.php"><img style="margin-top:20px;margin-left:30px;widht:130px;height:130px" src="icones/logo.png"></a>
<a href="sobre.html"><img align="right" style="margin-top:40px;margin-right:50px" src="icones/sobre_escuro.png"></a>
<a href="favoritos.php"><img align="right" style="margin-top:37px;margin-right:40px" src="icones/favoritos_escuro.png"></a>
<a href="locais.php"><img align="right" style="margin-top:34px;margin-right:40px" src="icones/locais_claro.png"></a>
<a href="receitas.php"><img align="right" style="margin-top:38px;margin-right:40px" src="icones/receitas_escuro.png"></a>
<a href="mapas.html"><img align="right" style="margin-top:42px;margin-right:40px" src="icones/mapa_escuro.png"></a>
</header>
<div class="local">
<?php
$id = $_GET["id"];
$db = new SQLite3('nutrimapa.sqlite') or die('Unable to open database');
$statement = $db->prepare('SELECT * FROM locais WHERE id = :id;');
$endereco = $db ->query('SELECT * FROM enderecos WHERE lid ='.$id);
$statement->bindValue(':id', $id);
$result = $statement->execute();
$row = $result->fetchArray();
echo "<div id=\"imagem_local\">";
echo "<h1 id=\"plocal\">{$row['nome']}</h1><br>";
echo "<img src=\"imglojas/{$row['imagem']}\" width =\"300\" height=\"267\">";
echo "</div>";
echo "<div id=\"description\">";
echo "<h2 id=\"textlocal\"> {$row['categoria']} </h2>";
echo "<p id=\"intro\">“{$row['descricao']}”<br><br><br></p>";
while ($row2= $endereco->fetchArray()) {
echo "<p id=\"address\">{$row2['endereco']} -</p>";
echo "<p id=\"address2\">{$row2['horario']}<br><br></p>";
}
echo "</div>";
?>
</div>
<div id="body">
<span class="star-rating">
<input type="radio" name="rating1" value="1" id="rating"><i id="item2"></i>
<input type="radio" name="rating2" value="2" id="rating"><i id="item2"></i>
<input type="radio" name="rating3" value="3" id="rating"><i id="item2"></i>
<input type="radio" name="rating4" value="4" id="rating"><i id="item2"></i>
<input type="radio" name="rating5" value="5" id="rating"><i id="item2"></i>
</span>
</div>
<div id="cookieUsuarioLocal">
<p id = "cookieTextoLocal">Olá, <?php
$veri = $_COOKIE['cookieNome'];
$nutrimapa_db = new SQLite3('nutrimapa.sqlite') or die ('Unable to open DB');
$selectQuery = $nutrimapa_db ->query('SELECT * FROM usuarios WHERE id = '.$veri);
$row = ($selectQuery -> fetchArray());
echo $row['nome'];
?>
! <div id= 'sairLocal'><a href ="http://192.168.10.10/index2.php">(Sair)</a></div>
</p>
</div>
<div class = "com">
<div class="comentario">
Comentários
</div>
<div class="caixacomment">
<textarea style="margin-bottom: 0px; resize:none; margin-right: 150px; font-size: 15px; font-family: 'Abel', sans-serif;" cols="100" rows="10" placeholder="Deixe aqui seu comentário!"></textarea>
</div>
<div class="enviar" style = "width: 0; height: 0; padding: 0px 50px 0 0px;" >
<input type="submit" class="button_entrar" style = "margin-left: 882px; margin-top: 160px;" value="Post"></br>
<!--<input type="submit" value="Enviar" style="width:60px; height:30px;">-->
</div>
</div>
<div>
<input type="image" id="buttonFavorito" onClick= "favFunction2();" src="icones/estrela_claro.png" style ="width: 60px;">
<script type="text/javascript">
function favFunction2(){
window.location="http://192.168.10.10/redireciona3.php?id=<?=$id;?>";
}
</script>
</div>
</body>
</html>