valide) { echo '

Remarque : Il faut être inscrit pour pouvoir voter.

'; } echo '

', ($le_participant->valide ? '' : ''), ''; $jeux_query = mysql_query(" SELECT jeux.id, jeux.nom, jeux_choisis.participant_id, COUNT(*) + IF(participant_id is not null, 1, 0) - 1 AS nb_vote FROM jeux LEFT JOIN jeux_choisis ON jeux.id = jeux_choisis.jeu_id GROUP BY jeux.id ORDER BY nb_vote DESC, nom "); while ($jeu = mysql_fetch_object($jeux_query)) { // est-ce que le participant courant à voté pour ce jeu ? if ($le_participant->valide) { $a_vote = mysql_fetch_row(mysql_query(" SELECT COUNT(*) FROM jeux_choisis WHERE participant_id = ".$le_participant->info->id." AND jeu_id = ".$jeu->id )); $a_vote = $a_vote[0]; } else $a_vote = FALSE; echo '', $le_participant->valide ? '' : '', '', ''; } echo '
VotesJeux
' . $jeu->nb_vote . '' . traitement_pre_affichage($jeu->nom) . '
'; if ($le_participant->valide) echo '

Autre :

'; echo '
'; // affichage du nombre de vote restant if ($le_participant->valide) echo '

Nombre de votes restant : ' . $le_participant->nb_vote_restant() . '

'; ?>