-
Notifications
You must be signed in to change notification settings - Fork 0
/
feedback.php
104 lines (80 loc) · 2.39 KB
/
feedback.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
<?php
session_start();
require 'conexao.php';
?>
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="styles-cadastro.css">
<title>Feedbacks</title>
</head>
<body>
<section><div class="login-box">
<img class="logo" src="images/vibe.png" alt="logotipo da loja" >
<div class="login-box">
<div class="login-box1">
<input type="button" value="Voltar para pagina Principal" onclick="javascript: location.href='index.php';" />
<h1> Veja a opinião de nossos clientes </h1>
<?php
if (!empty($_SESSION['NomeUsuario'])){
if($_SESSION['nivelAutenticacao'] == 1){
?>
<input type="button" value="Deixe seu feedback" onclick="javascript: location.href='cadastroFeedback.php';" />
<?php
}}
?>
</div>
<br>
<div id="boxOrcamento" >
<?php
$feedbacks = dbBuscaFeedbacks();
$feedbacks2 = dbBuscaFeedbacks();
$notas1 = 0;
$notas2 = 0;
$notas3 = 0;
$notas4 = 0;
$notas5 = 0;
while ($linha = mysqli_fetch_array($feedbacks)) {
if ($linha['nota'] == 1) {
$notas1++;
}elseif ($linha['nota'] == 2) {
$notas2++;
}elseif ($linha['nota'] == 3) {
$notas3++;
}elseif ($linha['nota'] == 4) {
$notas4++;
}elseif ($linha['nota'] == 5) {
$notas5++;
}
}
echo "____________________________________" ?><br />
<h2>Notas obtidas:</h2><br>
<?php
echo " NOTA 5 (Excelente) :".$notas5; ?><br /><?php
echo " NOTA 4 (Bom) :".$notas4; ?><br /><?php
echo " NOTA 3 (Regular) :".$notas3; ?><br /><?php
echo " NOTA 2 (Ruim) :".$notas2; ?><br /><?php
echo " NOTA 1 (Péssimo) :".$notas1; ?><br /><?php
echo "____________________________________" ?><br /><br />
<?php
while ($linha = mysqli_fetch_array($feedbacks2)) {
$txtNomeCliente = $linha['nome'];
$txtNota = $linha['nota'];
$txtComentario = $linha['comentario'];
?><br /><?php
echo "-----------------";
?><br /><?php
echo "Cliente: ".$txtNomeCliente;
?><br /><?php
echo "Nota: ".$txtNota;
?><br /><?php
echo "Comentário: ".$txtComentario;
?><br /><?php
echo "-----------------";
?><br /><?php
}
?>
</div>
</div></section>
</body>
</html>