/[dolibarr]/dolibarr/htdocs/telephonie/stats/distributeurs/resultats.php
ViewVC logotype

Diff of /dolibarr/htdocs/telephonie/stats/distributeurs/resultats.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by rodolphe, Wed Nov 16 12:33:38 2005 UTC revision 1.6 by rodolphe, Tue Nov 29 09:33:18 2005 UTC
# Line 142  print '<td align="right">'.price($total) Line 142  print '<td align="right">'.price($total)
142  print '</table>';  print '</table>';
143    
144    
145    print '</td></tr><tr><td valign="top" width="70%">';
146    
147    print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=telephoniegraph&file=distributeurs/ca.mensuel.'.$year.'.png" alt="Ca mensuel" title="Ca mensuel">'."\n";
148    print '</td><td valign="top" width="30%">';
149    print '<table class="border" width="100%" cellspacing="0" cellpadding="4">';
150    print '<tr class="liste_titre"><td>Mois</td><td align="right">Ca</td></tr>';
151    
152    $sql = "SELECT sum(valeur),legend FROM ".MAIN_DB_PREFIX."telephonie_stats";  
153    $sql .= " WHERE graph = 'distributeur.ca.mensuel'";
154    $sql .= " GROUP BY legend DESC";  
155    $resql = $db->query($sql);
156    $total = 0;
157    if ($resql)
158    {
159      while ($row = $db->fetch_row($resql))
160        {
161          print "<tr $bc[$var]><td>".$row[1].'</td>';  
162          print '<td align="right">'.price($row[0]).'</td></tr>';
163          $total += $row[0];
164          $var=!$var;
165        }
166      $db->free();
167    }
168    else
169    {
170      print $db->error() . ' ' . $sql;
171    }
172    print "<tr $bc[$var]><td>Total</td>";
173    print '<td align="right">'.price($total).'</td></tr>';
174    print '</table>';
175    
176  print '</td></tr>';  print '</td></tr>';
177    
178    
179  print '</table>';  print '</table>';
180    
181  $db->close();  $db->close();

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26