[ 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/ -> stats.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: stats.php,v 1.4 2004/10/20 21:15:19 opensides Exp $
  19   * $Source: /cvsroot/dolibarr/dolibarr/htdocs/stats.php,v $
  20   *
  21   */
  22  
  23  require ("./pre.inc.php");
  24  
  25  llxHeader();
  26  
  27  $mesg = '';
  28  
  29  /*
  30   *
  31   *
  32   */
  33  $sql = array(
  34           array("Société","SELECT count(*) FROM ".MAIN_DB_PREFIX."societe"),
  35           array("Contacts","SELECT count(*) FROM ".MAIN_DB_PREFIX."socpeople"),
  36           array("Facture","SELECT count(*) FROM ".MAIN_DB_PREFIX."facture"),
  37           array("Proposition commerciales","SELECT count(*) FROM ".MAIN_DB_PREFIX."propal")
  38  );
  39  
  40  
  41  print_fiche_titre('Statistiques produits et services', $mesg);
  42        
  43  print '<table class="liste" width="100%">';
  44  
  45  foreach ($sql as $key => $value)
  46  {
  47    $titre = $sql[$key][0];
  48  
  49    if ($db->query($sql[$key][1]))
  50      {
  51        $row = $db->fetch_row(0);
  52        $nbhv = $row[0];
  53        $db->free();
  54  
  55        print "<tr $bc[1]>";
  56        print '<td width="40%">'.$titre.'</td>';
  57        print '<td>'.$nbhv.'</td></tr>';
  58  
  59      }
  60  
  61  
  62  }
  63  
  64  print '</table>';
  65  
  66  $db->close();
  67  
  68  llxFooter("<em>Derni&egrave;re modification $Date: 2004/10/20 21:15:19 $ r&eacute;vision $Revision: 1.4 $</em>");
  69  ?>


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