-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpainel.php
74 lines (68 loc) · 3.44 KB
/
painel.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
<!DOCTYPE html>
<html>
<head>
<style>
.sombra {
box-shadow: 6px 9px 7px 0px rgba(176, 176, 176, 0.75);
}
</style>
</head>
<body style="background-color: #f3f3f3;">
<div class="container-fluid">
<div class="row">
<div class="col-md-4">
<div class="card text-white bg-primary mb-3 sombra" style="max-width: 18rem;">
<div class="card-header">Total Clientes / Ano</div>
<div class="card-body">
<h5 class="card-title" style="text-align: center; font-size: 40px;">
<?php
include 'conexao/conexao.php';
$sql = "SELECT SUM(quantidade) AS total FROM clientes";
$consulta = mysqli_query($conexao, $sql);
$dados = mysqli_fetch_array($consulta);
echo $dados['total'];
?>
<span style="font-size: 10px;"> / unid</span>
</h5>
</div>
</div>
</div>
<div class="col-md-4">
<div class="card text-white bg-success mb-3 sombra" style="max-width: 18rem;">
<div class="card-header">Faturamento / Ano</div>
<div class="card-body">
<h5 class="card-title" style="text-align: center; font-size: 40px;">
<?php
include 'conexao/conexao.php';
$sql = "SELECT SUM(valor_venda) AS total_venda FROM vendas";
$consulta = mysqli_query($conexao, $sql);
$dados = mysqli_fetch_array($consulta);
$valor = $dados['total_venda'];
echo 'R$ ' . number_format($valor, 2, '.', '');
?>
<span style="font-size: 10px;"> / BRL</span>
</h5>
</div>
</div>
</div>
<div class="col-md-4">
<div class="card text-white bg-danger mb-3 sombra" style="max-width: 18rem;">
<div class="card-header">Total Vendas / Ano</div>
<div class="card-body">
<h5 class="card-title" style="text-align: center; font-size: 40px;">
<?php
include 'conexao/conexao.php';
$sql = "SELECT SUM(quantidade_venda) AS total_quantidade FROM vendas ";
$consulta = mysqli_query($conexao, $sql);
$dados = mysqli_fetch_array($consulta);
echo $dados['total_quantidade'];
?>
<span style="font-size: 10px;"> / qtd</span>
</h5>
</div>
</div>
</div>
</div>
</div>
</body>
</html>