Nouvelles options
This commit is contained in:
parent
6965e67861
commit
aa56fcfcdd
@ -23,22 +23,19 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
print strftime("%H:%M:%S",time())."\n";
|
|
||||||
require ("../../master.inc.php");
|
require ("../../master.inc.php");
|
||||||
require_once (DOL_DOCUMENT_ROOT."/telephonie/stats/ProcessGraphLignes.class.php");
|
require_once (DOL_DOCUMENT_ROOT."/telephonie/stats/ProcessGraphLignes.class.php");
|
||||||
|
|
||||||
var_dump( $GLOBALS['argv']);
|
|
||||||
|
|
||||||
$graph_all = 0;
|
$graph_all = 0;
|
||||||
|
|
||||||
//loop through our arguments and see what the user selected
|
//loop through our arguments and see what the user selected
|
||||||
for ($i = 1; $i < $GLOBALS["argv"]; $i++)
|
for ($i = 1; $i < sizeof($GLOBALS["argv"]); $i++)
|
||||||
{
|
{
|
||||||
switch($GLOBALS["argv"][$i])
|
switch($GLOBALS["argv"][$i])
|
||||||
{
|
{
|
||||||
case "-v":
|
case "-v":
|
||||||
case "--version":
|
case "--version":
|
||||||
echo $GLOBALS['argv'][0]." $Version:$";
|
echo $GLOBALS['argv'][0]." $Revision$\n";
|
||||||
exit;
|
exit;
|
||||||
break;
|
break;
|
||||||
case "--all":
|
case "--all":
|
||||||
@ -47,12 +44,7 @@ for ($i = 1; $i < $GLOBALS["argv"]; $i++)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
exit ;
|
print strftime("%H:%M:%S",time())."\n";
|
||||||
|
|
||||||
$opt = getopt("a:");
|
|
||||||
|
|
||||||
$limit = $opt['l'];
|
|
||||||
$optcontrat = $opt['c'];
|
|
||||||
|
|
||||||
$datetime = time();
|
$datetime = time();
|
||||||
$month = strftime("%m", $datetime);
|
$month = strftime("%m", $datetime);
|
||||||
@ -70,7 +62,10 @@ else
|
|||||||
|
|
||||||
$sql = "SELECT distinct(fk_ligne)";
|
$sql = "SELECT distinct(fk_ligne)";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."telephonie_communications_details";
|
$sql .= " FROM ".MAIN_DB_PREFIX."telephonie_communications_details";
|
||||||
$sql .= " WHERE date_format(date,'%m%Y') = '".$month.$year."'";
|
if ($graph_all == 0)
|
||||||
|
{
|
||||||
|
$sql .= " WHERE date_format(date,'%m%Y') = '".$month.$year."'";
|
||||||
|
}
|
||||||
|
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user