diff --git a/htdocs/telephonie/script/graph-statistiques-tempsreels.php b/htdocs/telephonie/script/graph-statistiques-tempsreels.php index cc20e1d0674..c8c69c09356 100644 --- a/htdocs/telephonie/script/graph-statistiques-tempsreels.php +++ b/htdocs/telephonie/script/graph-statistiques-tempsreels.php @@ -50,6 +50,9 @@ $colors[10] = 'yellow'; $colors[11] = 'red'; $months = array(10,11); +$month = strftime("%m",time()); +$year = strftime("%Y",time()); + print "$month\n"; $sql = "SELECT distinct ligne"; @@ -103,7 +106,16 @@ if ($resql) $total = $total + $datas[$i]; $moydatas[$i] = $total / $j; + $labels[$i] = $j; + if (strftime('%u',mktime(12,12,12,$month,$j,$year)) == 6) + { + $labels[$i] = 'S'; + } + if (strftime('%u',mktime(12,12,12,$month,$j,$year)) == 7) + { + $labels[$i] = 'D'; + } } $img_root = DOL_DATA_ROOT."/graph/".substr($ligne->id,-1)."/telephonie/ligne/";