[ 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/rapport/ -> index.php (source)

   1  <?php
   2  /* Copyright (C) 2003 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: index.php,v 1.3 2005/09/03 18:22:18 eldy Exp $
  19   * $Source: /cvsroot/dolibarr/dolibarr/htdocs/rapport/index.php,v $
  20   *
  21   */
  22  require ("./pre.inc.php");
  23  
  24  require ("./AtomeFactureValidee.class.php");
  25  require ("./AtomePropaleValidee.class.php");
  26  
  27  llxHeader();
  28  
  29  print_fiche_titre("Rapports");
  30  
  31  
  32  
  33  /*
  34   * Initialisation d'un atome
  35   *
  36   * Parametre
  37   * - id de connexion à la bdd
  38   * - période 'year' ou 'month' (Reste à faire les hebdo)
  39   * - une date dans la période voulue
  40   * -> retourne un objet
  41   *
  42   */
  43  $x = new AtomeFactureValidee($db,'year', time());
  44  
  45  /*
  46   * Lecture des données
  47   * -> retourne un tableau
  48   */
  49  $arr = $x->fetch();
  50  /*
  51   * Création du graph 
  52   * -> retounre le nom du fichier
  53   */
  54  $img = $x->BarGraph();
  55  print $img."<br>";
  56  
  57  
  58  //
  59  
  60  $x = new AtomeFactureValidee($db,'year', mktime(12,0,0,1,12,2003));
  61  $arr = $x->fetch('year');
  62  
  63  $img = $x->BarGraph();
  64  print $img."<br>";
  65  for ($i = 1 ; $i < 5; $i++)
  66  {
  67    $x = new AtomeFactureValidee($db,'month', mktime(12,0,0,$i,12,2003));
  68    $x->periode = 'month';
  69    
  70    $arr = $x->fetch('month');
  71    
  72    
  73    $img = $x->BarGraph();
  74    print $img."<br>";
  75  }
  76  
  77  //
  78  
  79  $x = new AtomePropaleValidee($db,'year',mktime(12,0,0,1,12,2003));
  80  
  81  $arr = $x->fetch();
  82  
  83  var_dump($arr);
  84  
  85  $img = $x->BarGraph();
  86  print $img."<br>";
  87  
  88  $db->close();
  89  
  90  llxFooter('$Date: 2005/09/03 18:22:18 $ - $Revision: 1.3 $');
  91  ?>
  92  
  93  
  94  
  95  
  96  
  97  
  98  
  99  
 100  
 101  


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