diff --git a/rn/MdEstatisticasColetarRN.php b/rn/MdEstatisticasColetarRN.php index 06ba6d2..d166d2e 100644 --- a/rn/MdEstatisticasColetarRN.php +++ b/rn/MdEstatisticasColetarRN.php @@ -162,7 +162,9 @@ class MdEstatisticasColetarRN extends InfraRN $extensoes = array(); // Calculando na aplicacao para funcionar independente do banco foreach ($rs as $r) { - $extensao = pathinfo($r['nome'], PATHINFO_EXTENSION); + /* $extensao = pathinfo($r['nome'], PATHINFO_EXTENSION); */ + $extensao = end(explode('.', $r['nome'])); + $extensao = utf8_encode($extensao); $qtd = $extensoes[$extensao]; if (! $qtd) { $qtd = 0; @@ -379,7 +381,7 @@ class MdEstatisticasColetarRN extends InfraRN } elseif ($sgbd == 'Oracle') { $query = "select count(*) as quantidade, to_char(dth_acesso,'YYYY-MM-DD') AS data from infra_navegador where dth_acesso >= date '%s' group by to_char(dth_acesso,'YYYY-MM-DD')"; } - + $rs = array(); if ($query) { $query = sprintf($query, $ultimadata); @@ -443,7 +445,7 @@ class MdEstatisticasColetarRN extends InfraRN if ($sgbd == 'MySql') { $query = "SELECT year(dth_acesso) as ano, month(dth_acesso) as mes, recurso, count(*) as quantidade FROM sei.infra_auditoria where date(dth_acesso) > '%s' and date(dth_acesso) < '%s' group by 1, 2, 3 order by 1, 2, 3"; } elseif ($sgbd == 'SqlServer') { - $query = "SELECT year(dth_acesso) as ano, month(dth_acesso) as mes, recurso, count(*) as quantidade FROM infra_auditoria where dth_acesso > '%s' and dth_acesso < '%s' group by year(dth_acesso), month(dth_acesso), recurso order by 1, 2, 3"; + $query = "SELECT year(dth_acesso) as ano, month(dth_acesso) as mes, recurso, count(*) as quantidade FROM infra_auditoria where dth_acesso > '%s' and dth_acesso < '%s' group by year(dth_acesso), month(dth_acesso), recurso order by 1, 2, 3"; } elseif ($sgbd == 'Oracle'){ $query = "SELECT to_char(dth_acesso, 'YYYY') AS ano, to_char(dth_acesso, 'MM') AS mes, recurso, count(*) as quantidade FROM sei.infra_auditoria WHERE dth_acesso > date '%s' AND dth_acesso < date '%s' GROUP BY to_char(dth_acesso, 'YYYY'), to_char(dth_acesso, 'MM'), recurso"; } -- libgit2 0.21.2