- }\r
- \r
- /**\r
- * Renvoie le nombre de votes restant pour le participant.\r
- */\r
- function nb_vote_restant()\r
- {\r
- $nombre_de_vote = mysql_fetch_array(mysql_query("\r
- SELECT COUNT(*) FROM participants RIGHT JOIN jeux_choisis ON participants.id = jeux_choisis.participant_id\r
- WHERE participants.id = " . $this->info->id . "\r
- GROUP BY participants.id\r
- "));\r
- \r
- return Participant::$NB_VOTES_PAR_PARTICIPANT - $nombre_de_vote[0];\r
- }\r
-\r
- /**\r
- * Renvois TRUE si le nombre de participant max est atteint.\r
- */\r
- static function nombre_participant_max_atteint()\r
- {\r
- global $config;\r
- $res_SQL = mysql_query("SELECT COUNT(*) FROM participants");\r
- $nb_participant = mysql_fetch_row($res_SQL);\r
-\r
- return $nb_participant[0] >= $config->get('nb_max_participant');\r
- }\r
- \r
- /**\r
- * Renvois le nombre de places restantes.\r
- */\r
- static function nombre_place_restante()\r
- {\r
- global $config;\r
- $res_SQL = mysql_query("SELECT COUNT(*) FROM participants");\r
- $nb_participant = mysql_fetch_row($res_SQL);\r
- \r
- return $config->get('nb_max_participant') - $nb_participant[0];\r
+ }
+
+ /**
+ * Renvoie le nombre de votes restant pour le participant.
+ */
+ function nb_vote_restant()
+ {
+ $nombre_de_vote = mysql_fetch_array(mysql_query("
+ SELECT COUNT(*) FROM participants RIGHT JOIN jeux_choisis ON participants.id = jeux_choisis.participant_id
+ WHERE participants.id = " . $this->info->id . "
+ GROUP BY participants.id
+ "));
+
+ return Participant::$NB_VOTES_PAR_PARTICIPANT - $nombre_de_vote[0];
+ }
+
+ /**
+ * Renvois TRUE si le nombre de participant max est atteint.
+ */
+ static function nombre_participant_max_atteint()
+ {
+ global $config;
+ $res_SQL = mysql_query("SELECT COUNT(*) FROM participants");
+ $nb_participant = mysql_fetch_row($res_SQL);
+
+ return $nb_participant[0] >= $config->get('nb_max_participant');
+ }
+
+ /**
+ * Renvois le nombre de places restantes.
+ */
+ static function nombre_place_restante()
+ {
+ global $config;
+ $res_SQL = mysql_query("SELECT COUNT(*) FROM participants");
+ $nb_participant = mysql_fetch_row($res_SQL);
+
+ return $config->get('nb_max_participant') - $nb_participant[0];