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 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
| <?
$sql = "Select * From groupe";
$sql_exe = mysql_query($sql) or die('Erreur : ' . mysql_error());
while($Tab = mysql_fetch_array($sql_exe))
{
?>
<table width="860" height="480" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="420" height="200" valign="top" align="center">
<table width="420" cellpadding="0" cellspacing="0">
<tr>
<td background="images/cadre_01.gif" width="5" height="5"></td>
<td background="images/cadre_02.gif" width="410" height="5"></td>
<td background="images/cadre_03.gif" width="5" height="5"></td>
</tr>
</table>
<table width="420" cellpadding="0" cellspacing="0">
<tr>
<td background="images/cadre_04.gif" width="5" height="190"></td>
<td background="images/cadre_05.gif" width="410" height="190" valign="top" align="center">
<? $linecount = 2; //Nbr d'enregistrement par lignes
$count=0; //Nbr d'enregistrement compté sur la ligne
echo "<table width='100%' border='0' cellpadding='2'><tr>";
for ($x=0;$x=count($mydata);$x++) {
echo "<td>$mydata[$x]['value']</td>";
$count++;
if ($count == $linecount) {
echo "<span class='nom_groupe'><?php echo $Tab['nom_groupe']; ?></span><br><br>
<a href=''><img border='0' src='images/<?php echo $Tab["img_groupe"]; ?>'></a>";
$count=0; //reinitialisation du compteur
}
}//end for
//si on a debuté une ligne il faut remplir les cases restantes
for ($y=$count;$y=$linecount;$y++) {
echo "<td> </td>";
}
echo "</tr></table>";?>
</td>
<td background="images/cadre_06.gif" width="5" height="190"></td>
</tr>
</table>
<table width="420" cellpadding="0" cellspacing="0">
<tr>
<td background="images/cadre_07.gif" width="5" height="5"></td>
<td background="images/cadre_08.gif" width="410" height="5"></td>
<td background="images/cadre_09.gif" width="5" height="5"></td>
</tr>
</table>
<? } ?> |
Partager