* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id: stats.php,v 1.1 2005/09/06 21:57:04 rodolphe Exp $ * $Source: /srv/cvs/sources/dolibarr/dolibarr/htdocs/telephonie/client/Attic/stats.php,v $ * */ require("./pre.inc.php"); $mesg = ''; llxHeader("","Téléphonie - Client"); if ($cancel == $langs->trans("Cancel")) { $action = ''; } /* * Affichage * */ if ($_GET["id"]) { $soc = new Societe($db); $result = $soc->fetch($_GET["id"], $user); if (!$soc->perm_read) { print "Lecture non authorisée"; } if ( $result == 1 && $soc->perm_read) { if ($_GET["action"] <> 'edit' && $_GET["action"] <> 're-edit') { $h=0; $head[$h][0] = DOL_URL_ROOT."/telephonie/client/fiche.php?id=".$soc->id; $head[$h][1] = $langs->trans("Contrats"); $h++; $head[$h][0] = DOL_URL_ROOT."/telephonie/client/lignes.php?id=".$soc->id; $head[$h][1] = $langs->trans("Lignes"); $h++; $head[$h][0] = DOL_URL_ROOT."/telephonie/client/factures.php?id=".$soc->id; $head[$h][1] = $langs->trans("Factures"); $h++; $head[$h][0] = DOL_URL_ROOT."/telephonie/client/stats.php?id=".$soc->id; $head[$h][1] = $langs->trans("Stats"); $hselected = $h; $h++; $head[$h][0] = DOL_URL_ROOT."/telephonie/client/tarifs.php?id=".$soc->id; $head[$h][1] = $langs->trans("Tarifs"); $h++; dolibarr_fiche_head($head, $hselected, 'Client : '.$soc->nom); print ''; print ''; print ''; print ""; print '
'.$langs->trans('Name').''.$soc->nom.''.$soc->code_client.'
".$langs->trans('Address')."".nl2br($soc->adresse)."
".$soc->cp." ".$soc->ville." ".$soc->pays."

'; print ''; print ''; print ''; print ''; print ''; print ''; print '
Chiffre d\'affaireGain
'; $mesg_no_graph = 'Nous avons pas assez de données à ce jour pour générer ce graphique.'; $img_root = DOL_DATA_ROOT."/graph/".substr($soc->id,-1)."/telephonie/client/"; $file = $img_root.$soc->id."/graphca.png"; if (file_exists($file)) { print 'CA Mensuel'; } else { print $mesg_no_graph; } print ''; $file = $img_root.$soc->id."/graphgain.png"; if (file_exists($file) && $user->rights->telephonie->ligne->gain) { print 'CA Mensuel'; } else { print $mesg_no_graph; } print '
AppelsCommunications
'; $file = $img_root.$soc->id."/graphappelsdureemoyenne.png"; if (file_exists($file)) { print 'CA Mensuel'; } else { print $mesg_no_graph; } print ''; $file = $img_root.$soc->id."/nb-comm-mensuel.png"; if (file_exists($file)) { print 'CA Mensuel'; } else { print $mesg_no_graph; } print '
'; } } } else { print "Error"; } print ''; /* ************************************************************************** */ /* */ /* Barre d'action */ /* */ /* ************************************************************************** */ $db->close(); llxFooter("Dernière modification $Date: 2005/09/06 21:57:04 $ révision $Revision: 1.1 $"); ?>