-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreporte-acumulado.php
178 lines (149 loc) · 5.53 KB
/
reporte-acumulado.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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
<?php
include_once('config.php');
if ( (isset($_SESSION['username'])) && ( $_SESSION['rol'] == ROL_ADMIN || $_SESSION['rol'] == ROL_SUPERVISOR || $_SESSION['rol'] == ROL_JEFE ) ){
include_once('jupiter/code/fxModelo.php');
include_once('jupiter/code/fxVista.php');
include_once('jupiter/code/db_procter.php');
$resRpt = getEntrenamientoRptByCity($_SESSION['equipo_filtro'], $db);
$tblRpt = genReporteEAcumuladoCityTR($resRpt);
// Vars
$title = 'Reporte Acumulado P&G';
include_once('jupiter/code/fxMenu.php');
$mnuMain = crearMnuAdmin('reporte', null);
$mnuMainMobile = crearMnuAdminMobile('reporte', null);
} else {
// User No logeado
header ('Location: index.php');
}
?>
<!doctype html>
<html class="no-js" lang="es">
<head>
<?php include_once('code/header.php'); ?>
</head>
<body>
<div class="off-canvas-wrap" data-offcanvas>
<div class="inner-wrap">
<!-- Off Canvas Menu -->
<aside class="left-off-canvas-menu">
<?php print($mnuMainMobile); ?>
</aside>
<!-- Nav -->
<nav class="top-bar" data-topbar role="navigation">
<?php include_once('code/top-bar-title-admin.php'); ?>
<section class="top-bar-section">
<?php include_once('code/top-bar-admin.php'); ?>
</section>
</nav>
<!-- Menu -->
<div class="left-sidebar show-for-large-up">
<?php print($mnuMain); ?>
</div>
<main id="page" role="main" class="main mIzq45">
<section>
<div class="row pTop1">
<div class="large-12 columns">
<div class="row">
<div class="small-12 medium-12 large-6 columns text-left">
<ul class="button-group small round mDown1">
<li><a href="reporte-acumulado.php" class="button bgVerdeL m0 active">Acumulado</a></li>
<li><a href="reporte-entrenamiento.php" class="button bgVerdeL m0">Entrenamiento</a></li>
<li><a href="reporte-participante.php" class="button bgVerdeL m0">Participante</a></li>
<li><a href="reporte-personalizado.php" class="button bgVerdeL m0">Personalizado</a></li>
</ul>
</div>
<div class="small-12 medium-12 large-6 columns">
<ul class="button-group right small round mDown1">
<li><a href="reporte-acumulado2.php" class="button bgVerdeL m0">Distribuidor</a></li>
<li><a href="reporte-acumulado.php" class="button bgVerdeL m0 active">Sucursal</a></li>
</ul>
</div>
</div>
<div class="row text-left">
<form id="frmLista" action="reporte-lista-usuarios.php" method="post" target="_blank">
<input type="hidden" value="" name="pids" id="pids" />
<div class="small-12 columns">
<div class="row">
<div class="large-12 columns">
<table class="tblAzul responsive" id="tblShow">
<caption>
<div class="row">
<div class="small-12 columns text-center">
<h4 class="blanco">REPORTE ACUMULADO POR SUCURSAL</h4>
</div>
</div>
</caption>
<thead>
<tr>
<th>
<div class="categoria">
Sucursal
</div>
</th>
<th>
<div class="categoria">
Usuarios<br/>Entrenando
</div>
</th>
<th>
<div class="categoria">
Usuarios<br/>Entrenados
</div>
</th>
<th>
<div class="categoria">
% Usuarios<br/>Entrenados
</div>
</th>
<th>
<div class="categoria">
Usuarios<br/>En Proceso
</div>
</th>
</tr>
</thead>
<?php print($tblRpt); ?>
</div>
</div>
</div>
</form>
<p class="text-center"><button id="btnExport" class="button round"><i class="fa fa-file-excel-o fa-2x" aria-hidden="true"></i> Exportar Excel</button></p>
</div>
</div>
</div>
</section>
</main>
<!-- close the off-canvas menu -->
<a class="exit-off-canvas"></a>
</div>
</div>
<?php include_once('code/script.php'); ?>
<script src="js/responsive-tables.js"></script>
<script src="js/jquery.table2excel.min.js"></script>
<script>
$(document).on('ready', iniciar);
function iniciar(){
$(document).foundation();
$('#btnExport').on('click', exportXLS);
$('#tblShow tbody tr td a.lista').on('click', showLista);
};
function showLista(e){
e.preventDefault();
var rel = $(this).attr("rel");
$("#pids").val( rel );
$("#frmLista").submit();
}
function exportXLS(e){
$("#tblShow").table2excel({
exclude: ".noExl",
name: "ReporteExcelPG",
filename: "ReporteExcelPG",
fileext: ".xls",
exclude_img: true,
exclude_links: true,
exclude_inputs: true
});
};
</script>
</body>
</html>