Synchro
This commit is contained in:
parent
f20d894b5d
commit
426f07e9e9
@ -326,11 +326,18 @@ if ($db->query($sql))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
$sql = "SELECT date_format(date, '%Y%m'), sum(duree), count(duree)";
|
$sql = "SELECT date_format(date, '%Y%m'), sum(duree), count(duree)";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."telephonie_communications_details";
|
$sql .= " FROM ".MAIN_DB_PREFIX."telephonie_communications_details";
|
||||||
$sql .= " GROUP BY date_format(date, '%Y%m') ASC";
|
$sql .= " GROUP BY date_format(date, '%Y%m') ASC";
|
||||||
|
|
||||||
if ($db->query($sql))
|
$resql = $db->query($sql);
|
||||||
|
|
||||||
|
if ($resql)
|
||||||
{
|
{
|
||||||
$durees = array();
|
$durees = array();
|
||||||
$kilomindurees = array();
|
$kilomindurees = array();
|
||||||
@ -338,13 +345,13 @@ if ($db->query($sql))
|
|||||||
$nombres = array();
|
$nombres = array();
|
||||||
$labels = array();
|
$labels = array();
|
||||||
|
|
||||||
$num = $db->num_rows();
|
$num = $db->num_rows($resql);
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$row = $db->fetch_row();
|
$row = $db->fetch_row($resql);
|
||||||
$labels[$i] = substr($row[0],4,2) . '/'.substr($row[0],2,2);
|
$labels[$i] = substr($row[0],4,2) . '/'.substr($row[0],2,2);
|
||||||
$durees[$i] = $row[1];
|
$durees[$i] = $row[1];
|
||||||
$kilomindurees[$i] = ($row[1]/60000);
|
$kilomindurees[$i] = ($row[1]/60000);
|
||||||
@ -360,6 +367,7 @@ if ($db->query($sql))
|
|||||||
$file = $img_root . "communications/duree.png";
|
$file = $img_root . "communications/duree.png";
|
||||||
$graphgain = new GraphBar ($db, $file);
|
$graphgain = new GraphBar ($db, $file);
|
||||||
$graphgain->show_console = 0 ;
|
$graphgain->show_console = 0 ;
|
||||||
|
$graphgain->width = 480 ;
|
||||||
$graphgain->titre = "Nb minutes (milliers)";
|
$graphgain->titre = "Nb minutes (milliers)";
|
||||||
print $graphgain->titre."\n";
|
print $graphgain->titre."\n";
|
||||||
$graphgain->GraphDraw($file, $kilomindurees, $labels);
|
$graphgain->GraphDraw($file, $kilomindurees, $labels);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user