[ Index ]
 

Code source de Dolibarr 2.0.1

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/htdocs/telephonie/script/ -> graph-statistiques-test.php (source)

   1  <?PHP
   2  /* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
   3   *
   4   * This program is free software; you can redistribute it and/or modify
   5   * it under the terms of the GNU General Public License as published by
   6   * the Free Software Foundation; either version 2 of the License, or
   7   * (at your option) any later version.
   8   *
   9   * This program is distributed in the hope that it will be useful,
  10   * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12   * GNU General Public License for more details.
  13   *
  14   * You should have received a copy of the GNU General Public License
  15   * along with this program; if not, write to the Free Software
  16   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  17   *
  18   * $Id: graph-statistiques-test.php,v 1.2 2005/10/26 18:56:33 rodolphe Exp $
  19   * $Source: /cvsroot/dolibarr/dolibarr/htdocs/telephonie/script/graph-statistiques-test.php,v $
  20   *
  21   *
  22   * Generation des graphiques
  23   *
  24   * Test de charges pour déploiement en cluster
  25   *
  26   */
  27  require  ("../../master.inc.php");
  28  
  29  require_once (DOL_DOCUMENT_ROOT."/telephonie/stats/graph/bar.class.php");
  30  
  31  $img_root = DOL_DATA_ROOT."/graph/telephonie/";
  32  
  33  $sql = "SELECT SQL_BIG_RESULT date_format(date, '%m'), duree, numero";
  34  $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_communications_details";
  35  $sql .= " ORDER BY fk_ligne";
  36  
  37  $resql = $db->query($sql);
  38  
  39  if ($resql)
  40  {
  41    $durees = array();
  42    $kilomindurees = array();
  43    $labels = array();
  44  
  45    $num = $db->num_rows($resql);
  46    $lim = ($num - $nbval);
  47    $i = 0;
  48    $j = 0;
  49  
  50    while ($i < $num)
  51      {
  52        $row = $db->fetch_row($resql);
  53  
  54        $labels[$j] = $row[0];
  55        $durees[$j] = $row[1];
  56        $kilomindurees_mob[$j] = ($row[1]/60000);
  57        
  58        $i++;
  59      }
  60  }
  61  
  62  
  63  ?>


Généré le : Mon Nov 26 12:29:37 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics