[ 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: graph-statistiques-week.php,v 1.15 2005/11/23 22:54:36 rodolphe Exp $ 19 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/telephonie/script/graph-statistiques-week.php,v $ 20 * 21 * 22 * Generation des graphiques des données hébdomadaire 23 * Ce script doit-être exécuté au minimum une fois par semaine 24 * 25 * 26 */ 27 require ("../../master.inc.php"); 28 29 require_once (DOL_DOCUMENT_ROOT."/telephonie/lignetel.class.php"); 30 require_once (DOL_DOCUMENT_ROOT."/telephonie/facturetel.class.php"); 31 32 require_once (DOL_DOCUMENT_ROOT."/telephonie/stats/distributeurs/distributeur.po.month.class.php"); 33 34 require_once (DOL_DOCUMENT_ROOT."/telephonie/stats/lignes/commandes.class.php"); 35 require_once (DOL_DOCUMENT_ROOT."/telephonie/stats/lignes/commandes.week.class.php"); 36 require_once (DOL_DOCUMENT_ROOT."/telephonie/stats/lignes/resiliation.week.class.php"); 37 require_once (DOL_DOCUMENT_ROOT."/telephonie/stats/lignes/rejet.week.class.php"); 38 39 require_once (DOL_DOCUMENT_ROOT."/telephonie/stats/clients/clientsmoyenne.week.class.php"); 40 41 $error = 0; 42 43 $img_root = DOL_DATA_ROOT."/graph/telephonie/"; 44 45 /***** 46 * 47 * 48 * 49 */ 50 require_once (DOL_DOCUMENT_ROOT."/telephonie/stats/commerciaux/commerciaux.po.class.php"); 51 $file = $img_root . "commerciaux/po.mensuel.png"; 52 53 $graph = new GraphCommerciauxPO($db, $file); 54 $graph->width = 400; 55 $graph->GraphMakeGraph(); 56 57 /***********************************************************************/ 58 /* 59 /* Contrats 60 /* 61 /***********************************************************************/ 62 63 require_once (DOL_DOCUMENT_ROOT."/telephonie/stats/contrats/modereglement.class.php"); 64 65 $file = $img_root . "contrats/modereglement.png"; 66 if ($verbose) print "Graph : Contrats Reglement $file\n"; 67 $graph = new GraphContratModeReglement($db, $file); 68 $graph->GraphMakeGraph(); 69 70 /***********************************************************************/ 71 /* 72 /* Lignes actives 73 /* 74 /***********************************************************************/ 75 76 require_once (DOL_DOCUMENT_ROOT."/telephonie/stats/lignes/actives.class.php"); 77 78 $file = $img_root . "lignes/lignes.actives.png"; 79 if ($verbose) print "Graph : Lignes actives$file\n"; 80 $graph = new GraphLignesActives($db, $file); 81 $graph->GraphMakeGraph(); 82 83 $file = $img_root . "lignes/lignes.commandees.png"; 84 if ($verbose) print "Graph : Lignes actives$file\n"; 85 $graph = new GraphLignesCommandees($db, $file); 86 $graph->GraphMakeGraph(); 87 88 require_once (DOL_DOCUMENT_ROOT."/telephonie/stats/lignes/statut.class.php"); 89 90 $file = $img_root . "lignes/lignes.statut.png"; 91 if ($verbose) print "Graph : Lignes statut $file\n"; 92 $graph = new GraphLignesStatut($db, $file); 93 $graph->GraphMakeGraph(); 94 95 /***********************************************************************/ 96 /* 97 /* Lignes commandes 98 /* 99 /***********************************************************************/ 100 101 require_once DOL_DOCUMENT_ROOT."/telephonie/stats/clients/clients.week.class.php"; 102 require_once DOL_DOCUMENT_ROOT."/telephonie/stats/clients/clients.month.class.php"; 103 104 $file = $img_root . "lignes/commandes.mensuels.png"; 105 if ($verbose) print "Graph : Lignes commandes$file\n"; 106 $graph = new GraphLignesCommandes($db, $file); 107 $graph->width = 400; 108 $graph->GraphMakeGraph(); 109 110 $file = $img_root . "lignes/commandes.hebdomadaire.png"; 111 if ($verbose) print "Graph : Lignes commandes$file\n"; 112 $graph = new GraphLignesCommandesWeek($db, $file); 113 $graph->width = 400; 114 $graph->GraphMakeGraph(); 115 116 $file = $img_root . "commercials/clientsmoyenne.hebdomadaire.png"; 117 if ($verbose) print "Graph : Clients Moyenne $file\n"; 118 $graph = new GraphClientsMoyenneWeek($db, $file); 119 $graph->width = 400; 120 $graph->GraphMakeGraph(); 121 122 $file = $img_root . "commercials/clients.hebdomadaire.png"; 123 $graph = new GraphClientsWeek($db, $file); 124 $graph->width = 400; 125 $graph->GraphMakeGraph(); 126 127 $file = $img_root . "commercials/clients.mensuel.png"; 128 $graph = new GraphClientsMonth($db, $file); 129 $graph->width = 400; 130 $graph->GraphMakeGraph(); 131 132 $sql = "SELECT distinct fk_commercial"; 133 $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_societe_ligne"; 134 135 if ($db->query($sql)) 136 { 137 $num = $db->num_rows(); 138 $i = 0; 139 140 while ($i < $num) 141 { 142 $row = $db->fetch_row(); 143 144 $file = $img_root . "commercials/".$row[0]."/lignes.commandes.mensuels.png"; 145 if ($verbose) print "Graph : Lignes commandes$file\n"; 146 $graph = new GraphLignesCommandes($db, $file); 147 $graph->width = 400; 148 $graph->GraphMakeGraph($row[0]); 149 150 $file = $img_root . "commercials/".$row[0]."/lignes.commandes.hebdomadaire.png"; 151 if ($verbose) print "Graph : Lignes commandes$file\n"; 152 $graph = new GraphLignesCommandesWeek($db, $file); 153 $graph->width = 400; 154 $graph->GraphMakeGraph($row[0]); 155 156 $file = $img_root . "commercials/".$row[0]."/clients.hebdomadaire.png"; 157 if ($verbose) print "Graph : Lignes commandes$file\n"; 158 $graph = new GraphClientsWeek($db, $file); 159 $graph->width = 400; 160 $graph->commercial = $row[0]; 161 $graph->GraphMakeGraph(); 162 163 $file = $img_root . "commercials/".$row[0]."/clientsmoyenne.hebdomadaire.png"; 164 if ($verbose) print "Graph : Moyenne nouveaux clients $file\n"; 165 $graph = new GraphClientsMoyenneWeek($db, $file); 166 $graph->width = 400; 167 $graph->GraphMakeGraph($row[0]); 168 169 $i++; 170 } 171 } 172 173 /***********************************************************************/ 174 /* 175 /* Prise ordre des distributeur 176 /* 177 /***********************************************************************/ 178 require_once (DOL_DOCUMENT_ROOT."/telephonie/stats/contrats/modereglement.class.php"); 179 180 $sql = "SELECT distinct p.fk_distributeur, d.nom"; 181 $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_contrat_priseordre as p"; 182 $sql .= " , ".MAIN_DB_PREFIX."telephonie_distributeur as d"; 183 $sql .= " WHERE d.rowid = p.fk_distributeur"; 184 185 $resql = $db->query($sql); 186 187 if ($resql) 188 { 189 $num = $db->num_rows($resql); 190 $i = 0; 191 192 while ($i < $num) 193 { 194 $row = $db->fetch_row($resql); 195 196 $file = $img_root . "distributeurs/".$row[0]."/po.month.png"; 197 198 $graph = new GraphDistributeurPoMensuel($db, $file); 199 $graph->width = 500; 200 $graph->GraphMakeGraph($row[0], $row[1]); 201 $i++; 202 } 203 } 204 205 206 207 /* 208 * 209 */ 210 211 $sql = "SELECT rowid"; 212 $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_distributeur"; 213 $resql = $db->query($sql); 214 if ($resql) 215 { 216 $num = $db->num_rows($resql); 217 $i = 0; 218 219 while ($i < $num) 220 { 221 $row = $db->fetch_row($resql); 222 $file = $img_root . "distributeurs/".$row[0]."/clients.hebdomadaire.png"; 223 if ($verbose) print "Graph : Lignes commandes$file\n"; 224 $graph = new GraphClientsWeek($db, $file); 225 $graph->width = 500; 226 $graph->distributeur = $row[0]; 227 $graph->GraphMakeGraph(); 228 $i++; 229 } 230 } 231 232 /***** 233 * 234 * 235 * 236 */ 237 $file = $img_root . "lignes/resiliations.hebdomadaire.png"; 238 239 $graph = new GraphLignesResiliationWeek($db, $file); 240 $graph->width = 400; 241 $graph->GraphMakeGraph(); 242 /***** 243 * 244 * 245 * 246 */ 247 $file = $img_root . "lignes/rejets.hebdomadaire.png"; 248 249 $graph = new GraphLignesRejetWeek($db, $file); 250 $graph->width = 400; 251 $graph->GraphMakeGraph(); 252 253 ?>
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 |
![]() |