Nouvelle arbo des graphs
This commit is contained in:
parent
301a610e25
commit
c495a27c9b
@ -91,28 +91,31 @@ if ($_GET["id"])
|
|||||||
|
|
||||||
print '<tr><td width="50%" valign="top" align="center">';
|
print '<tr><td width="50%" valign="top" align="center">';
|
||||||
|
|
||||||
$img_root = DOL_DATA_ROOT."/graph/telephonie/";
|
$mesg_no_graph = 'Nous avons pas assez de données à ce jour pour générer ce graphique.';
|
||||||
$file = "client/".substr($soc->id,0,1)."/".$soc->id."/graphca.png";
|
|
||||||
|
|
||||||
if (file_exists($img_root . $file))
|
$img_root = DOL_DATA_ROOT."/graph/".substr($soc->id,-1)."/telephonie/client/";
|
||||||
|
|
||||||
|
$file = $img_root.$soc->id."/graphca.png";
|
||||||
|
|
||||||
|
if (file_exists($file))
|
||||||
{
|
{
|
||||||
print '<img src="'.DOL_URL_ROOT.'/telephonie/showgraph.php?graph='.$file.'" alt="CA Mensuel">';
|
print '<img src="'.DOL_URL_ROOT.'/telephonie/showgraph.php?graph='.$file.'" alt="CA Mensuel">';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print 'Nous avons pas assez de données à ce jour pour générer ce graphique.';
|
print $mesg_no_graph;
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</td><td width="50%" valign="top" align="center">';
|
print '</td><td width="50%" valign="top" align="center">';
|
||||||
|
|
||||||
$file = "client/".substr($soc->id,0,1)."/".$soc->id."/graphgain.png";
|
$file = $img_root.$soc->id."/graphgain.png";
|
||||||
if (file_exists($img_root . $file))
|
if (file_exists($file))
|
||||||
{
|
{
|
||||||
print '<img src="'.DOL_URL_ROOT.'/telephonie/showgraph.php?graph='.$file.'" alt="CA Mensuel">';
|
print '<img src="'.DOL_URL_ROOT.'/telephonie/showgraph.php?graph='.$file.'" alt="CA Mensuel">';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print 'Nous avons pas assez de données à ce jour pour générer ce graphique.';
|
print $mesg_no_graph;
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
@ -123,26 +126,28 @@ if ($_GET["id"])
|
|||||||
|
|
||||||
print '<tr><td width="50%" valign="top" align="center">';
|
print '<tr><td width="50%" valign="top" align="center">';
|
||||||
|
|
||||||
$file = "client/".substr($soc->id,0,1)."/".$soc->id."/graphappelsdureemoyenne.png";
|
$file = $img_root.$soc->id."/graphappelsdureemoyenne.png";
|
||||||
if (file_exists($img_root . $file))
|
|
||||||
|
if (file_exists($file))
|
||||||
{
|
{
|
||||||
print '<img src="'.DOL_URL_ROOT.'/telephonie/showgraph.php?graph='.$file.'" alt="CA Mensuel">';
|
print '<img src="'.DOL_URL_ROOT.'/telephonie/showgraph.php?graph='.$file.'" alt="CA Mensuel">';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print 'Nous avons pas assez de données à ce jour pour générer ce graphique.';
|
print $mesg_no_graph;
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</td><td width="50%" valign="top" align="center">';
|
print '</td><td width="50%" valign="top" align="center">';
|
||||||
|
|
||||||
$file = "client/".substr($soc->id,0,1)."/".$soc->id."/nb-comm-mensuel.png";
|
$file = $img_root.$soc->id."/nb-comm-mensuel.png";
|
||||||
if (file_exists($img_root . $file))
|
|
||||||
|
if (file_exists($file))
|
||||||
{
|
{
|
||||||
print '<img src="'.DOL_URL_ROOT.'/telephonie/showgraph.php?graph='.$file.'" alt="CA Mensuel">';
|
print '<img src="'.DOL_URL_ROOT.'/telephonie/showgraph.php?graph='.$file.'" alt="CA Mensuel">';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print 'Nous avons pas assez de données à ce jour pour générer ce graphique.';
|
print $mesg_no_graph;
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
|
|||||||
@ -139,12 +139,14 @@ class Process
|
|||||||
{
|
{
|
||||||
//print ".";
|
//print ".";
|
||||||
|
|
||||||
$file = $img_root . "client/".substr($client,0,1)."/".$client."/graphca.png";
|
$img_root = DOL_DATA_ROOT."/graph/".substr($client,-1)."/telephonie/client/";
|
||||||
|
|
||||||
|
$file = $img_root . $client."/graphca.png";
|
||||||
$graphca = new GraphCa($this->db, $file);
|
$graphca = new GraphCa($this->db, $file);
|
||||||
$graphca->client = $client;
|
$graphca->client = $client;
|
||||||
$graphca->GraphDraw();
|
$graphca->GraphDraw();
|
||||||
|
|
||||||
$file = $img_root . "client/".substr($client,0,1)."/".$client."/graphgain.png";
|
$file = $img_root . $client."/graphgain.png";
|
||||||
|
|
||||||
$graphgain = new GraphGain ($this->db, $file);
|
$graphgain = new GraphGain ($this->db, $file);
|
||||||
$graphgain->client = $client;
|
$graphgain->client = $client;
|
||||||
@ -164,14 +166,14 @@ class Process
|
|||||||
$this->db->query($sql);
|
$this->db->query($sql);
|
||||||
|
|
||||||
|
|
||||||
$file = $img_root . "client/".substr($client,0,1)."/".$client."/graphappelsdureemoyenne.png";
|
$file = $img_root . $client."/graphappelsdureemoyenne.png";
|
||||||
|
|
||||||
$graphgain = new GraphAppelsDureeMoyenne ($this->db, $file);
|
$graphgain = new GraphAppelsDureeMoyenne ($this->db, $file);
|
||||||
$graphgain->client = $client;
|
$graphgain->client = $client;
|
||||||
$graphgain->show_console = 0 ;
|
$graphgain->show_console = 0 ;
|
||||||
$graphgain->GraphDraw();
|
$graphgain->GraphDraw();
|
||||||
|
|
||||||
$file = $img_root . "client/".substr($client,0,1)."/".$client."/nb-comm-mensuel.png";
|
$file = $img_root . $client."/nb-comm-mensuel.png";
|
||||||
|
|
||||||
$graphx = new GraphCommNbMensuel ($this->db, $file);
|
$graphx = new GraphCommNbMensuel ($this->db, $file);
|
||||||
$graphx->client = $client;
|
$graphx->client = $client;
|
||||||
@ -180,6 +182,7 @@ class Process
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dolibarr_syslog("Fin client ".$this->ident);
|
dolibarr_syslog("Fin client ".$this->ident);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user