-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdashboard.php
123 lines (113 loc) · 4.97 KB
/
dashboard.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
<?php
include 'libreria/php/principal.php';
restricionAcceso();
$usuario = $_SESSION['IDusuario'];
$fecha = date("Y-m-d");
// EXTRAER número de ventas
$queryVentas = "SELECT COUNT(id) AS ventas FROM tbl_venta
WHERE usuario = '$usuario' AND status = 2 AND fecha LIKE '$fecha%'";
$resultVentas = mysql_query($queryVentas) or die(mysql_error());
$datosVentas = mysql_fetch_array($resultVentas);
$numVentas = $datosVentas['ventas'];
// EXTRAER importe de ventas
$queryImporte = "SELECT SUM(total) AS importe FROM tbl_venta
WHERE usuario = '$usuario' AND status = 2 AND fecha LIKE '$fecha%'";
$resultImporte = mysql_query($queryImporte) or die(mysql_error());
$datosImporte = mysql_fetch_array($resultImporte);
$importeVentas = number_format($datosImporte['importe'],2);
?>
<!DOCTYPE html>
<html lang="es-MX">
<head>
<meta charset="UTF-8" />
<title>Sistema PDV Tezontle Express</title>
<meta name="author" content="Fernando Magrosoto V. | info@fmagrosoto.com" />
<meta name="description" content="Sistema PDV para Tezontle Express" />
<meta name="keywords" content="PDV, magrosoto, tezontle, fernando magrosoto,
nimbus, digitae" />
<meta name="robots" content="INDEX,NOFOLLOW" />
<link rel="stylesheet" type="text/css" href="css/principal.css" />
<link href='http://fonts.googleapis.com/css?family=Roboto+Slab:400,700' rel='stylesheet' type='text/css'>
<script src="libreria/js/interno.js"></script>
</head>
<!-- Gracias por ver nuestro código
Este sitio está hecho en HTML5.
Desarrollado por Fernando Magrosoto V. - info@fmagrosoto.com -->
<body>
<!-- área del WRAPPER -->
<div id="contenedor-principal">
<!-- ZONA DE ENCABEZADO -->
<header>
<h1><img src="imagenes/express.png" alt="" /></h1>
</header>
<!-- FIN ENCABEZADO -->
<!-- Navegación -->
<nav>
<ul>
<li><a href="venta.php">Nueva venta</a></li>
<li><a href="portero.php?accion=cerrarSesion">Cerrar sesión</a></li>
<li><em class="tip">Usuario activo: <?php echo $_SESSION['Nusuario']; ?></em></li>
</ul>
</nav>
<!-- ZONA DEL CUERPO -->
<section>
<div class="titulo">
<h2>Dashboard</h2>
</div>
<div>
<table class="mostrar-datos">
<thead>
<tr>
<th>Actividades en el día</th>
<th>Números</th>
<th>Acciones</th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="3">Actividades del usuario: <em><?php echo $_SESSION['Nusuario']; ?></em></td>
</tr>
</tfoot>
<tbody>
<tr>
<td>Ventas realizadas</td>
<td><span>$ <?php echo $importeVentas; ?></span></td>
<td class="acciones"><a href="detalles.php">Ver detalles</a></td>
</tr>
<tr>
<td>No. de boletos vendidos</td>
<td><span><?php echo $numVentas; ?></span></td>
<td class="acciones"><a href="detalles.php">Ver detalles</a></td>
</tr>
</tbody>
</table>
</div>
<div class="espacio"></div>
<div>
<button type="button"
name="nueva-venta"
onclick="nuevaVenta();">Nueva venta</button>
</div>
</section>
<!-- fin CUERPO -->
<!-- ZONA DE PIE DE PÁGINA -->
<footer>
<div class="legales">
<p>©2013 - Sistema PDV Tezontle Express</p>
<p>Todos los Derechos Reservados</p>
</div>
<div class="creditos">
<a href="javascript:void(0);"
onclick="nimbus();">
<img src="imagenes/logoNimbus.png"
alt="Tecnología NIMBUS"
title="Tecnología NIMBUS"
height="35" />
</a>
</div>
</footer>
<!-- FIN DE PIE DE PÁGINA -->
</div>
<!-- fin WRAPPER -->
</body>
</html>