MOD déplacement des fichiers php dans le dossier PHP (sauf index.php)
[cl7.git] / php / participants.php
diff --git a/php/participants.php b/php/participants.php
new file mode 100644 (file)
index 0000000..995752b
--- /dev/null
@@ -0,0 +1,56 @@
+<html>
+<head>
+<title>Toutes les infos des participants de la corcelles-lan</title>
+</head>
+<body>
+<h1>Toutes les infos des participants de la corcelles-lan</h1>
+<?php
+
+include('config.php');
+
+function ON($condition)
+{
+       return $condition ? 'Oui' : 'Non';
+}
+
+#connection à la base de données
+$lien_mysql = mysql_connect ($SQL_HOTE, $SQL_LOGIN, $SQL_PASS);
+mysql_select_db ($NOM_BASE);
+
+$requ = mysql_query("select * from participants order by pseudo");
+
+echo
+'<table width="100%" border="2" cellpadding="2" cellspacing="2"><tr>
+<td><b>Pseudo</b></td>
+<td><b>Clan</b></td>
+<td><b>Prénom + nom</b></td>
+<td><b>age</b></td>
+<td><b>E-mail</b></td>
+<td><b>N°ICQ</b></td>
+<td><b>Souhaite participer au tournoi War3 ?</b></td>
+<td><b>Souhaite participer au tournoi Ra3 ?</b></td>
+<td><b>Remarque</b></td>
+<td><b>A payé ?</b></td>
+</tr>
+';
+
+while($participant = mysql_fetch_object($requ))
+{
+       echo '<tr>',
+               '<td>',$participant->pseudo,'</td>',
+               '<td>',($participant->clan_nom==''?'':'('.$participant->clan_tag.')'.$participant->clan_nom),'</td>',
+               '<td>',$participant->prenom, ' ', $participant->nom,'</td>',
+               '<td>',$participant->age,'</td>',
+               '<td>',$participant->e_mail,'</td>',
+               '<td>',$participant->icq,'</td>',
+               '<td>',ON($participant->tournoi_war3_1),'</td>',
+               '<td>',ON($participant->tournoi_ra3_1),'</td>',
+               '<td>',$participant->remarque,'</td>',
+               '<td>',ON($participant->a_paye),'</td>',
+               '<tr>';
+}
+echo '</table>';
+
+?>
+</body>
+</html>