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
|
$Mess .= '
<table width="100">
<tr>
<th width="100" class="tableau01">Les Terrains</th>
</tr>
<tr>
<th class="tableau03">
<table width="600" height="50">
<tr height="10">';
$sql5 = mysql_query("SELECT * FROM terrain WHERE pseudo='".$donnees['login']."' ") or die(mysql_error());
while ($data = mysql_fetch_array($sql5))
{
if (empty($MAP[$data['posy']]))
$MAP1[$data['posy']] = $data['posy'];
$MAP2[$data['posx']] = $data['posx'];
$MAP3[$data['posy']] = '<img src="img/Achat.png" height="32" width="32">';
}
mysql_free_result($sql5);
for($posx=1;$posx<=$Terre;$posx++)
{
for($posy=1;$posy<=10;$posy++)
{
if ($posy == 10){
$finligne = '</tr><tr>';
}elseif ($posy == 10){
$finligne = '</tr>';
}else{
$finligne = '';
}
if(!empty($MAP2[$posx]) && !empty($MAP1[$posy]))
{
$Mess .= '<th class="tableau02" valign="middle" width="10" height="1"><font color="red" face="Verdana" size="1">'.$MAP3[$posy].'</font></th>'.$finligne;
}else{
$Mess .= '<th class="tableau02" valign="middle" width="5" height="5"><font color="black" face="Verdana" size="1"><a href="general.php?Page=ID1&x='.$posx.'&y='.$posy.'"><img src="img/acheter.png" border="0" height="32" width="32" title="Acheter un batiment"></a></font></th>'.$finligne;
}
}
}
$Mess .= '</table></th></tr></table>'; |
Partager