1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
$requete0 = "INSERT INTO tempprest SELECT prestations , COUNT(prestations) AS nb, SUM(prixhtmvt) AS somprest, '0' FROM tempfact1 WHERE client='$pseudo' && datesortie >='$datedeb' && datesortie <='$datefin' && neuf='$neuf' GROUP BY prestations" ;
$result0 = mysql_query ( $requete0 ) ;
// selection et affichage des infos
$requete = "SELECT prestations ,nb, somprest,remprest FROM tempprest " ;
$result = mysql_query ( $requete ) ;
echo "<table class=\"texte\" width=\"100%\" border=\"0\" bordercolor=\"#000066\" cellspacing=\"0\" align=\"center\">";
echo "<tr>";
echo "<th align=\"left\" bgcolor=\"#DBE8E8\">Prestations</th>";
echo "<th align=\"center\" bgcolor=\"#DBE8E8\">Quantité</th>";
echo "<th align=\"right\" bgcolor=\"#DBE8E8\">Total Prest.()</th>";
echo "<th align=\"center\" bgcolor=\"#DBE8E8\">Remise</th>";
echo "</tr>";
$i=1;
while($row = mysql_fetch_array($result))
{
$vali=strval($i);
$varremise=sprintf("remiseprest$vali");
$colon1="<th align=\"left\">". stripslashes($row['prestations'])." </th>";
$colon2="<th align=\"center\">". stripslashes($row['nb'])." </th>";
$colon3="<th align=\"right\">". stripslashes($row['somprest'])." </th>";
?>
<tr>
<th align="left"><? echo "$colon1"?> </th>
<th align="center"><? echo "$colon2" ?> </th>
<th align="right"><? echo "$colon3" ?></th>
<th><input name='$varremise' type="Text" id='$varremise' onchange="majprest(this)" size="5" style="COLOR : #0000FF; FONT-FAMILY: Verdana; FONT-SIZE: 10pt"></th>
</tr>
<?
$i++;
echo $varremise;
}
echo "</table>";
?> |
Partager