Bonjour je suis entrain de creer un poduim des 3 premier de diffrente categorie que j'ai sur mon site ,

j'ai donc recuper les 3 premiers, reussi a connaitre le rang (1er 2eme et 3em), mias je ne sais pas comment faire pour que le 1er ce mette au milieu et le second a gauche , voilà mon code qui vous permettra de me repondre :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
<div align="center">
<?
$top = rand(0,8);
if($lang == fr){
$titre = array('Joueurs les plus riches', 'Joueurs ayants le plus de chevaux', 'Joueurs ayants le plus de horsy', 'Joueurs ayants le plus de horsa', 'Derniers joueurs inscrits', 'Chevaux ayants le plus de victoires', 'Chevaux ayant le plus d\'endurance', 'Chevaux ayants le plus de saillies', 'Chevaux les plus vieux');
}
 
if($lang == en){
$titre = array('The richest players', 'Having players the most horses', 'Having players the most horsy', 'Having players the most horsa', 'Last registered players', 'Having horses the most victories', 'Horses having the most endurance', 'Having horses the most projections', 'The oldest horses');
}
 
if($lange == fr){
$titre = array('Joueurs les plus riches', 'Joueurs ayants le plus de chevaux', 'Joueurs ayants le plus de horsy', 'Joueurs ayants le plus de horsa', 'Derniers joueurs inscrits', 'Chevaux ayants le plus de victoires', 'Chevaux ayant le plus d\'endurance', 'Chevaux ayants le plus de saillies', 'Chevaux les plus vieux');
}
 
if($lange == en){
$titre = array('The richest players', 'Having players the most horses', 'Having players the most horsy', 'Having players the most horsa', 'Last registered players', 'Having horses the most victories', 'Horses having the most endurance', 'Having horses the most projections', 'The oldest horses');
}
 
echo '<strong>'.$titre[$top].'</strong>';
?>
</div>
<table>
<?
if($top == 0)
{
	mysql_connect($host,$username,$password);
	mysql_select_db($bdd_name);
	$sql_top = 'SELECT * FROM membres ORDER BY argent DESC LIMIT 0,3';
	$NbTot = 'SELECT COUNT(id) FROM membres ORDER BY argent DESC LIMIT 0,3';
	$query_top = mysql_query($sql_top)or die(mysql_error());
 
$NbCol=6;
 
 
 
// Il va falloir un certain nombre de lignes
$NbLigne=1+(int)($NbTot/$NbCol);
// Premier enregsitrement
$Col=1; // Pour savoir dans quelle colonne on est
$Lig=0; // Pour savoir sur quelle ligne on est
$i=1;
// tant qu'il y a des fiches
 
   $Valeur=$Col+($Lig*$NbCol);
 
   $Lig=$Lig+1;
   // si on a fait NbLigne ou si le compteur est supérieur au nombre total
   // il faut passer à la colonne suivante et à la première ligne
   if (($Lig==$NbLigne) or ($Valeur>($NbTot-$NbCol))) {$Lig=0;$Col=$Col+1;}
 
 
	while($top = mysql_fetch_array($query_top))
	{
$idmem= $top['id'];
$pseudom = $top['pseudo'];
$avatar = $top['avatar'];
$argentop = $top['argent'];
 
 
$rang1 = 'SELECT DISTINCT count(*) as rang FROM membres where argent>='.$argentop.' ';
$rang2 = mysql_query($rang1)or die(mysql_error());
$rang = $rang2 -12;
 
if ($Col==1) {echo '<tr>';}
if ($rang == 1){
$align =center;
}
 
	echo '<td><div align='.$align.'><strong>Rang : '.$rang.' <a href="modules.php?page=fiche%20du%20membre&id='.$idmem.'">'.$pseudom.'</a></strong><br /><img src="http://www.horsevirtuel.com/site/images/avatars/'.$avatar.'"><br><i>Argent: '.$argentop.' €</i></td>';
 
$Col=$Col+1;   
   If ($Col>$NbCol) {$Col=1;echo '</tr>';}
}
 
 
// Ici, il faut peut-être finir la ligne
if ($Col<>1) {
   for ($i=$Col;$i<=$NbCol;$i++) {echo '<td>&nbsp;</td>';}
   echo '</tr>';
   }
}
 
elseif($top == 1)
{
echo 'A venir';
}
elseif($top == 2)
{
	mysql_connect($host,$username,$password);
	mysql_select_db($bdd_name);
	$sql_top = 'SELECT * FROM membres ORDER BY horsies DESC LIMIT 0,10';
	$query_top = mysql_query($sql_top)or die(mysql_error());
	mysql_close();
 
	while($top = mysql_fetch_array($query_top))
	{
	echo '<li><strong><a href="modules.php?page=fiche%20du%20membre&id='.$top['id'].'">'.$top['pseudo'].'</a><br><img src="http://www.horsevirtuel.com/site/images/avatars/'.$top['avatar'].'"></strong><br /><i>'.$top['horsies'].' pts</i></li>';
	}
}
elseif($top == 3)
{
	mysql_connect($host,$username,$password);
	mysql_select_db($bdd_name);
	$sql_top = 'SELECT * FROM membres ORDER BY cote DESC LIMIT 0,10';
	$query_top = mysql_query($sql_top)or die(mysql_error());
	mysql_close();
 
	while($top = mysql_fetch_array($query_top))
	{
	echo '<li><strong><a href="modules.php?page=fiche%20du%20membre&id='.$top['id'].'">'.$top['pseudo'].'</a></strong><br /><i>'.$top['cote'].' pts</i></li>';
	}
 
}
elseif($top == 4)
{
	mysql_connect($host,$username,$password);
	mysql_select_db($bdd_name);
	$sql_top = 'SELECT * FROM membres ORDER BY inscription DESC LIMIT 0,10';
	$query_top = mysql_query($sql_top)or die(mysql_error());
	mysql_close();
 
	while($top = mysql_fetch_array($query_top))
	{
	echo '<li><strong><a href="modules.php?page=fiche%20du%20membre&id='.$top['id'].'">'.$top['pseudo'].'</a></strong><br /><i>Le: '.date('d/m/Y \à H\h i\m\i\n',$top['inscription']).'</i></li>';
	}
}
elseif($top == 5)
{
echo "A venir";
}
elseif($top == 6)
{
	mysql_connect($host,$username,$password);
	mysql_select_db($bdd_name);
	$sql_top = 'SELECT * FROM chevaux ORDER BY endurance DESC LIMIT 0,10';
	$query_top = mysql_query($sql_top)or die(mysql_error());
	mysql_close();
 
	while($top = mysql_fetch_array($query_top))
	{
	$endu = number_format($top['endurance'], 2, '.', '');
	echo '<li><strong>'.$top['nom'].'</strong><br /><i>Endurance: '.$endu.'</i></li>';
	}
 
}
elseif($top == 7)
{
	mysql_connect($host,$username,$password);
	mysql_select_db($bdd_name);
	$sql_top = 'SELECT * FROM chevaux ORDER BY saillies DESC LIMIT 0,10';
	$query_top = mysql_query($sql_top)or die(mysql_error());
	mysql_close();
 
	while($top = mysql_fetch_array($query_top))
	{
	echo '<li><strong>'.$top['nom'].'</strong><br /><i>Saillies: '.$top['saillies'].'</i></li>';
	}
 
}
elseif($top == 8)
{
 
  	mysql_connect($host,$username,$password);
	mysql_select_db($bdd_name);
	$sql_top = 'SELECT * FROM chevaux ORDER BY timestamp LIMIT 0,10';
	$query_top = mysql_query($sql_top)or die(mysql_error());
	mysql_close();
 
	while($top = mysql_fetch_array($query_top))
	{
 
	echo '<li><strong>'.$top['nom'].'</strong><br /><i>Age:';
	$timestamp_actuel = time();
	$time_chev = $top['timestamp'];
	$age = $timestamp_actuel - $time_chev;
	$age = $age / 43200;
	$age = ceil($age);
	$mois = $age;
	if($age > 12)
	{
	$age2 = $age / 12;
	$age2 = floor($age2);
 
	$mois = $age - $age2 * 12;
	echo ''.$age2.' ans et ';
	}
 
	echo ''.$mois.' mois';
 
	echo "</i></li>";
	}
 
 
 
}
 
?></table>
 
<br />
<em><strong><a href="modules.php?page=classement">Tous les classements</a></strong></em>