From 40caa407ae0e16ce8c6cf1c9ec78d54b3b121735 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Wed, 7 Dec 2005 15:31:56 +0000 Subject: [PATCH] Ajout mode verbose --- .../script/graph-statistiques-commerciaux.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/htdocs/telephonie/script/graph-statistiques-commerciaux.php b/htdocs/telephonie/script/graph-statistiques-commerciaux.php index abea118a295..38dec9faa38 100644 --- a/htdocs/telephonie/script/graph-statistiques-commerciaux.php +++ b/htdocs/telephonie/script/graph-statistiques-commerciaux.php @@ -23,6 +23,14 @@ * */ require ("../../master.inc.php"); +$verbose = 0; +for ($i = 1 ; $i <= sizeof($argv) ; $i++) +{ + if ($argv[$i] == "-v") + $verbose = 1; + if ($argv[$i] == "-vv") + $verbose = 2; +} require_once (DOL_DOCUMENT_ROOT."/telephonie/lignetel.class.php"); require_once (DOL_DOCUMENT_ROOT."/telephonie/facturetel.class.php"); @@ -87,7 +95,7 @@ if ($resql) /* Chiffre d'affaire mensuel */ $file = $img_root . "commercials/".$row[0]."/ca.mensuel.$year.png"; - if ($verbose) print "Graph : Lignes commandes$file\n"; + if ($verbose) print "CA ".$row[0]."\n"; $graph = new GraphCommercialChiffreAffaire($db, $file, $year); $graph->width = 400; $graph->GraphMakeGraph($row[0]); @@ -95,7 +103,7 @@ if ($resql) /* Gain */ $file = $img_root . "commercials/".$row[0]."/gain.mensuel.$year.png"; - if ($verbose) print "Graph : Lignes commandes$file\n"; + if ($verbose) print "Gain ".$row[0]."\n"; $graph = new GraphCommercialGain($db, $file, $year); $graph->width = 400; $graph->GraphMakeGraph($row[0]);