/[dolibarr]/dolibarr/htdocs/telephonie/script/graph-statistiques-lignes.php
ViewVC logotype

Diff of /dolibarr/htdocs/telephonie/script/graph-statistiques-lignes.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by rodolphe, Wed Oct 19 08:59:43 2005 UTC revision 1.5 by rodolphe, Wed Oct 19 09:04:01 2005 UTC
# Line 23  Line 23 
23   *   *
24   *   *
25   */   */
 print strftime("%H:%M:%S",time())."\n";  
26  require ("../../master.inc.php");  require ("../../master.inc.php");
27  require_once (DOL_DOCUMENT_ROOT."/telephonie/stats/ProcessGraphLignes.class.php");  require_once (DOL_DOCUMENT_ROOT."/telephonie/stats/ProcessGraphLignes.class.php");
28    
 var_dump( $GLOBALS['argv']);  
   
29  $graph_all = 0;  $graph_all = 0;
30    
31  //loop through our arguments and see what the user selected  //loop through our arguments and see what the user selected
32  for ($i = 1; $i < $GLOBALS["argv"]; $i++)  for ($i = 1; $i < sizeof($GLOBALS["argv"]); $i++)
33  {  {
34    switch($GLOBALS["argv"][$i])    switch($GLOBALS["argv"][$i])
35      {      {
36      case "-v":      case "-v":
37      case "--version":      case "--version":
38        echo  $GLOBALS['argv'][0]." $Version:$";        echo  $GLOBALS['argv'][0]." $Revision$\n";
39        exit;        exit;
40        break;        break;
41      case "--all":      case "--all":
# Line 46  for ($i = 1; $i < $GLOBALS["argv"]; $i++ Line 43  for ($i = 1; $i < $GLOBALS["argv"]; $i++
43        break;        break;
44      }      }
45  }  }
         
 exit ;  
   
 $opt = getopt("a:");  
46    
47  $limit = $opt['l'];  print strftime("%H:%M:%S",time())."\n";
 $optcontrat = $opt['c'];  
48    
49  $datetime = time();  $datetime = time();
50  $month = strftime("%m", $datetime);  $month = strftime("%m", $datetime);
# Line 70  else Line 62  else
62    
63  $sql = "SELECT distinct(fk_ligne)";  $sql = "SELECT distinct(fk_ligne)";
64  $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_communications_details";  $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_communications_details";
65  $sql .= " WHERE date_format(date,'%m%Y') = '".$month.$year."'";  if ($graph_all == 0)
66    {
67      $sql .= " WHERE date_format(date,'%m%Y') = '".$month.$year."'";
68    }
69    
70  $resql = $db->query($sql);  $resql = $db->query($sql);
71    

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26