Suppression tableau inutile
This commit is contained in:
parent
38a7c5cfe4
commit
859809220c
@ -56,49 +56,11 @@ if ($_GET["id"])
|
||||
|
||||
print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">';
|
||||
|
||||
print '<tr><td width="30%" valign="top">';
|
||||
print '<tr><td width="50%" valign="top">';
|
||||
|
||||
print '<table class="border" width="100%" cellspacing="0" cellpadding="4">';
|
||||
|
||||
print '<tr class="liste_titre"><td width="50%" valign="top">Mois</td><td align="center">Nb Lignes</td></tr>';
|
||||
|
||||
$sql = "SELECT count(*) as cc, date_format(date_commande,'%m %Y')";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."telephonie_societe_ligne as l";
|
||||
$sql .= " , ".MAIN_DB_PREFIX."telephonie_distributeur_commerciaux as dc";
|
||||
$sql .= " WHERE dc.fk_distributeur = ".$_GET["id"];
|
||||
$sql .= " AND date_commande IS NOT NULL";
|
||||
$sql .= " AND dc.fk_user = l.fk_commercial_sign";
|
||||
$sql .= " AND l.statut <> 7";
|
||||
$sql .= " GROUP BY date_format(date_commande,'%Y%m') DESC";
|
||||
|
||||
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
$num = $db->num_rows();
|
||||
$i = 0;
|
||||
$datas = array();
|
||||
$legends = array();
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$row = $db->fetch_row($i);
|
||||
$var=!$var;
|
||||
|
||||
print "<tr $bc[$var]>";
|
||||
print '<td width="50%" valign="top">';
|
||||
print $row[2]." ". $row[1].'</td><td align="center">'.$row[0].'</td></tr>';
|
||||
$i++;
|
||||
}
|
||||
$db->free();
|
||||
}
|
||||
else
|
||||
{
|
||||
print $db->error() . ' ' . $sql;
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '</td><td valign="top" width="70%">';
|
||||
print '</td><td valign="top" width="50%">';
|
||||
|
||||
print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=telephoniegraph&file=distributeurs/'.$_GET["id"].'/clients.hebdomadaire.png" alt="Commandes de lignes par semaine" title="Lignes Actives"><br /><br />'."\n";
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user