[ 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: index.php,v 1.7 2005/08/24 08:55:11 rodolphe Exp $ 19 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/telephonie/stats/communications/index.php,v $ 20 * 21 */ 22 require ("./pre.inc.php"); 23 24 if (!$user->rights->telephonie->lire) accessforbidden(); 25 if (!$user->rights->telephonie->stats->lire) accessforbidden(); 26 27 llxHeader('','Telephonie - Statistiques'); 28 /* 29 * Sécurité accés client 30 */ 31 if ($user->societe_id > 0) 32 { 33 $action = ''; 34 $socidp = $user->societe_id; 35 } 36 37 38 $h = 0; 39 40 $head[$h][0] = DOL_URL_ROOT.'/telephonie/stats/communications/index.php'; 41 $head[$h][1] = "Global"; 42 $hselected = $h; 43 $h++; 44 45 $head[$h][0] = DOL_URL_ROOT.'/telephonie/stats/communications/lastmonth.php'; 46 $head[$h][1] = "Durée"; 47 $h++; 48 $head[$h][0] = DOL_URL_ROOT.'/telephonie/stats/communications/destmonth.php'; 49 $head[$h][1] = "Destinations"; 50 $h++; 51 52 $head[$h][0] = DOL_URL_ROOT.'/telephonie/stats/communications/analyse.php'; 53 $head[$h][1] = "Analyse"; 54 $h++; 55 56 57 dolibarr_fiche_head($head, $hselected, "Communications"); 58 59 print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'."\n"; 60 61 print '<tr><td width="50%" valign="top">'."\n"; 62 63 print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=telephoniegraph&file=communications/duree.png" alt="Nb Minutes"><br /><br />'."\n"; 64 65 print '</td><td valign="top" width="50%">'."\n"; 66 67 _legend($db, "communications.duree"); 68 69 print '</td></tr>'; 70 print '<tr><td width="50%" valign="top">'."\n"; 71 72 print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=telephoniegraph&file=communications/duree_loc.png" alt="Communications locales"><br /><br />'."\n"; 73 74 print '</td><td valign="top" width="50%">'."\n"; 75 76 print '</td></tr><tr><td width="50%" valign="top">'."\n"; 77 78 print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=telephoniegraph&file=communications/duree_mob.png" alt="Communications Mobiles"><br /><br />'."\n"; 79 80 print '</td><td valign="top" width="50%">'."\n"; 81 82 _legend($db, "communications.duree_mobiles"); 83 print '</td></tr>'; 84 85 print '<tr><td width="50%" valign="top">'."\n"; 86 87 print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=telephoniegraph&file=communications/duree_inter.png" alt="Duree Moyenne vers Mobiles"><br /><br />'."\n"; 88 89 print '</td><td valign="top" width="50%">'."\n"; 90 91 print '</td></tr>'; 92 93 94 95 print '</table>'; 96 97 $db->close(); 98 99 100 function _legend($db, $graph) 101 { 102 print '<table>'; 103 print '<table class="noborder" cellspacing="0" cellpadding="4">'; 104 print '<tr class="liste_titre">'; 105 print '<td colspan="2">Légende</td></tr>'; 106 $sql = "SELECT legend, valeur"; 107 $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_stats"; 108 $sql .= " WHERE graph = '".$graph."'"; 109 $sql .= " ORDER BY ord DESC"; 110 111 $resql = $db->query($sql); 112 113 if ($resql) 114 { 115 $num = $db->num_rows($resql); 116 $i = 0; 117 118 while ($i < $num) 119 { 120 $row = $db->fetch_row($resql); 121 $var = !$var; 122 print "<tr $bc[$var]>"; 123 print '<td>'.$row[0].'</td><td align="right">'.ceil($row[1]).'</td></tr>'; 124 125 $i++; 126 } 127 } 128 print '</table>'; 129 } 130 131 llxFooter("<em>Dernière modification $Date: 2005/08/24 08:55:11 $ révision $Revision: 1.7 $</em>"); 132 ?>
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 |
![]() |