[ Index ] |
|
Code source de Dolibarr 2.0.1 |
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: modereglement.class.php,v 1.1 2005/02/24 12:34:35 rodolphe Exp $ 19 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/telephonie/stats/contrats/modereglement.class.php,v $ 20 * 21 */ 22 23 require_once (DOL_DOCUMENT_ROOT."/telephonie/stats/graph/pie.class.php"); 24 25 class GraphContratModeReglement extends GraphPie { 26 27 Function GraphContratModeReglement($DB, $file) 28 { 29 $this->db = $DB; 30 $this->file = $file; 31 32 $this->client = 0; 33 $this->titre = "Mode de réglement des contrats"; 34 35 $this->barcolor = "yellow"; 36 $this->showframe = true; 37 } 38 39 Function GraphMakeGraph() 40 { 41 $num = 0; 42 43 $sql = "SELECT mode_paiement, count(*)"; 44 $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_contrat"; 45 // $sql .= " WHERE statut = 3"; 46 $sql .= " GROUP BY mode_paiement"; 47 48 $result = $this->db->query($sql); 49 if ($result) 50 { 51 $num = $this->db->num_rows(); 52 $i = 0; 53 $datas = array(); 54 $labels = array(); 55 56 while ($i < $num) 57 { 58 $row = $this->db->fetch_row(); 59 60 $datas[$i] = $row[1]; 61 $labels[$i] = $row[0]; 62 63 $i++; 64 } 65 66 $this->db->free(); 67 } 68 else 69 { 70 print $this->db->error() . ' ' . $sql; 71 } 72 73 $this->GraphDraw($this->file, $datas, $labels); 74 } 75 } 76 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 12:29:37 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |