/
rel_history.php
41 lines (29 loc) · 1.12 KB
/
rel_history.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
<?php
require "src/scripts/conecta.php";
require "src/scripts/restrito.php";
include "src/scripts/functions.php";
require "src/classes/Template.class.php";
include_once "src/classes/Users.class.php";
include_once "src/classes/Notas.class.php";
include_once "src/classes/Contratos.class.php";
include_once "src/classes/Relatorio.class.php";
redirectByPermission(1); // SETAR PERMISSÃO DA PÁGINA
$inicio = execucao();
$tpl = new Template('html_libs/template.html');
$tpl->addFile('SECONDMENU','html_libs/udd_secondMenu.html');
$tpl->addFile('CONTEUDO','html_libs/rel_history.html');
$sql = "SELECT * FROM rel_history GROUP BY sigla, data";
$query = mysql_query($sql);
while($res = mysql_fetch_array($query)){
$tpl->USER = $res['usuario'];
$tpl->SIGLA = $res['sigla'];
$data_ref = explode("-", $res['data_ref']);
$tpl->MESREF= getMesNome($data_ref[1]) . "/" . $data_ref[0];
$tpl->DLDATE= ExplodeDateTime($res['data']);
$tpl->block('EACH_HIST');
}
$fim = execucao();
$tempo = number_format(($fim-$inicio),6);
$tpl->EXECTIME = "Tempo de Execução: <b>".$tempo."</b> segundos ";
$tpl->show();
?>