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

   1  <?php
   2  /* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
   3   * Copyright (C) 2004      Laurent Destailleur  <eldy@users.sourceforge.net>
   4   *
   5   * This program is free software; you can redistribute it and/or modify
   6   * it under the terms of the GNU General Public License as published by
   7   * the Free Software Foundation; either version 2 of the License, or
   8   * (at your option) any later version.
   9   *
  10   * This program is distributed in the hope that it will be useful,
  11   * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13   * GNU General Public License for more details.
  14   *
  15   * You should have received a copy of the GNU General Public License
  16   * along with this program; if not, write to the Free Software
  17   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  18   *
  19   * $Id: index.php,v 1.6 2005/04/04 19:38:17 eldy Exp $
  20   * $Source: /cvsroot/dolibarr/dolibarr/htdocs/expedition/stats/index.php,v $
  21   *
  22   */
  23  
  24  /**
  25          \file       htdocs/expedition/stats/index.php
  26          \ingroup    expedition
  27          \brief      Page des stats expeditions
  28          \version    $Revision: 1.6 $
  29  */
  30  
  31  require ("./pre.inc.php");
  32  require ("../expedition.class.php");
  33  
  34  $langs->load("sendings");
  35  
  36  
  37  llxHeader();
  38  
  39  print_fiche_titre($langs->trans("StatisticsOfSendings"), $mesg);
  40        
  41  print '<table class="border" width="100%">';
  42  print '<tr><td align="center">'.$langs->trans("Year").'</td>';
  43  print '<td width="40%" align="center">'.$langs->trans("NbOfSendings").'</td></tr>';
  44  
  45  $sql = "SELECT count(*), date_format(date_expedition,'%Y') as dm FROM ".MAIN_DB_PREFIX."expedition WHERE fk_statut > 0 GROUP BY dm DESC ";
  46  if ($db->query($sql))
  47  {
  48    $num = $db->num_rows();
  49    $i = 0;
  50    while ($i < $num)
  51      {
  52        $row = $db->fetch_row($i);
  53        $nbproduct = $row[0];
  54        $year = $row[1];
  55        print "<tr>";
  56        print '<td align="center"><a href="month.php?year='.$year.'">'.$year.'</a></td><td align="center">'.$nbproduct.'</td></tr>';
  57        $i++;
  58      }
  59  }
  60  $db->free();
  61  
  62  print '</table><br><i>Statistiques effectuées sur les expéditions validées uniquement</i>';
  63  
  64  $db->close();
  65  
  66  llxFooter('$Date: 2005/04/04 19:38:17 $ - $Revision: 1.6 $');
  67  ?>


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