From 6965e67861eff89413e93ac8c976e172bd4feaad Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Wed, 19 Oct 2005 08:59:43 +0000 Subject: [PATCH] Ajout options --- .../script/graph-statistiques-lignes.php | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/htdocs/telephonie/script/graph-statistiques-lignes.php b/htdocs/telephonie/script/graph-statistiques-lignes.php index 506a06529a3..3461578fdfa 100644 --- a/htdocs/telephonie/script/graph-statistiques-lignes.php +++ b/htdocs/telephonie/script/graph-statistiques-lignes.php @@ -27,6 +27,33 @@ print strftime("%H:%M:%S",time())."\n"; require ("../../master.inc.php"); require_once (DOL_DOCUMENT_ROOT."/telephonie/stats/ProcessGraphLignes.class.php"); +var_dump( $GLOBALS['argv']); + +$graph_all = 0; + +//loop through our arguments and see what the user selected +for ($i = 1; $i < $GLOBALS["argv"]; $i++) +{ + switch($GLOBALS["argv"][$i]) + { + case "-v": + case "--version": + echo $GLOBALS['argv'][0]." $Version:$"; + exit; + break; + case "--all": + $graph_all = 1; + break; + } +} + +exit ; + +$opt = getopt("a:"); + +$limit = $opt['l']; +$optcontrat = $opt['c']; + $datetime = time(); $month = strftime("%m", $datetime); $year = strftime("%Y", $datetime);