Commit db015d2736ba63e4df100f8fcd93519265229d50
1 parent
d3e53852
Exists in
master
and in
1 other branch
- correção para adequação ao PHP >= 5.3
git-svn-id: http://svn.softwarepublico.gov.br/svn/cacic/cacic/trunk/gerente@946 fecfc0c7-e812-0410-ae72-849f08638ee7
Showing
4 changed files
with
6 additions
and
6 deletions
Show diff stats
include/library.php
... | ... | @@ -1421,7 +1421,7 @@ return $resultado; |
1421 | 1421 | // Função usada para calcular diferença entre datas... |
1422 | 1422 | // É necessário usar o formato MM-DD-AAAA nessa função |
1423 | 1423 | // -------------------------------------------------------------------------------------- |
1424 | -function date_diff($from, $to) | |
1424 | +function data_diff($from, $to) | |
1425 | 1425 | { |
1426 | 1426 | list($from_month, $from_day, $from_year) = explode("-", $from); |
1427 | 1427 | list($to_month, $to_day, $to_year) = explode("-", $to); | ... | ... |
relatorios/computador/inc_detalhes_computador.php
... | ... | @@ -56,7 +56,7 @@ $linha = '<tr bgcolor="#e7e7e7"> |
56 | 56 | <? |
57 | 57 | $today=date('m-d-Y'); |
58 | 58 | $access_day = explode('-',mysql_result($result, 0, "dt_hr_ult_acesso")); |
59 | - $diference = date_diff(trim(substr($access_day[1],0,2)).'-'.$access_day[2].'-'.$access_day[0],$today); | |
59 | + $diference = data_diff(trim(substr($access_day[1],0,2)).'-'.$access_day[2].'-'.$access_day[0],$today); | |
60 | 60 | |
61 | 61 | if ($diference > 4) // Acima de 5 dias |
62 | 62 | $img_date = '<img src="../../imgs/arvore/tree_computer_red.gif" title="Último acesso realizado há mais de 5 dias (120 horas)" width="16" height="16">'; |
... | ... | @@ -103,4 +103,4 @@ $linha = '<tr bgcolor="#e7e7e7"> |
103 | 103 | </tr> |
104 | 104 | </table></td> |
105 | 105 | </tr> |
106 | -</table> | |
107 | 106 | \ No newline at end of file |
107 | +</table> | ... | ... |
relatorios/inventario_softwares/combo_software_inv.php
... | ... | @@ -25,7 +25,7 @@ $today=date('m-d-Y'); |
25 | 25 | |
26 | 26 | while($row = mysql_fetch_array($RResult)) { |
27 | 27 | $access_day = explode('-',$row['dt_hr_ult_acesso']); |
28 | - $diference = date_diff(trim(substr($access_day[1],0,2)).'-'.$access_day[2].'-'.$access_day[0],$today); | |
28 | + $diference = data_diff(trim(substr($access_day[1],0,2)).'-'.$access_day[2].'-'.$access_day[0],$today); | |
29 | 29 | |
30 | 30 | if ($diference > 4) // Acima de 5 dias |
31 | 31 | $img_date = '<img src=http://' . $_SERVER['HTTP_HOST'] . '/cacic2/imgs/arvore/tree_computer_red.gif title=Último_acesso_realizado_há_mais_de_5_dias_(120_horas) width=16 height=16 hspace=5>'; |
... | ... | @@ -45,4 +45,4 @@ echo $texto; |
45 | 45 | parent.document.getElementById('texto_<? echo $_REQUEST['id_software_inventariado']?>').innerHTML= "<? echo $texto?>"; |
46 | 46 | parent.mostratab('<? echo $_REQUEST['id_software_inventariado']?>'); |
47 | 47 | //alert (parent.document.all["texto_<? echo $_REQUEST['id_software_inventariado']?>"].innerHTML); |
48 | -</script> | |
49 | 48 | \ No newline at end of file |
49 | +</script> | ... | ... |
relatorios/navegacao.php
... | ... | @@ -184,7 +184,7 @@ if ($_GET['p']=='' && $_POST['consultar'] == '') |
184 | 184 | |
185 | 185 | $today=date('m-d-Y'); |
186 | 186 | $access_day = explode('-',$row["dt_hr_ult_acesso"]); |
187 | - $diference = date_diff(trim(substr($access_day[1],0,2)).'-'.$access_day[2].'-'.$access_day[0],$today); | |
187 | + $diference = data_diff(trim(substr($access_day[1],0,2)).'-'.$access_day[2].'-'.$access_day[0],$today); | |
188 | 188 | |
189 | 189 | // Mostrarei a quantidade de dias e a data de último acesso para a diferença maior que 4 dias |
190 | 190 | if ($diference > 4) | ... | ... |