MOD déplacement des fichiers php dans le dossier PHP (sauf index.php)
[cl7.git] / php / tx_inscrits.php
diff --git a/php/tx_inscrits.php b/php/tx_inscrits.php
new file mode 100644 (file)
index 0000000..89ff6a0
--- /dev/null
@@ -0,0 +1,36 @@
+<?php # coding:utf-8\r
+\r
+include_once("traitement_pre_affichage.php");\r
+\r
+$res = mysql_query("SELECT pseudo, nom, prenom, age, clan_nom, clan_tag, remarques FROM participants ORDER by clan_nom, clan_tag, pseudo");\r
+\r
+$debut_table = '\r
+<table class="inscrits">\r
+ <tr>\r
+  <th>pseudo</th>\r
+  <th>nom</th>\r
+  <th>prénom</th>\r
+  <th>age</th>\r
+  <th>remarques</th>\r
+ </tr>';\r
\r
+$clan_courant = null;\r
+\r
+while($participant = mysql_fetch_object($res))\r
+{  \r
+   if ($clan_courant !== $participant->clan_nom)\r
+   {\r
+      echo ($participant->clan_nom != '' ? '</table><h1>'.traitement_pre_affichage($participant->clan_nom).'</h1>' : ''), $debut_table;\r
+      $clan_courant = $participant->clan_nom;\r
+   }\r
+   \r
+   echo '<tr>';\r
+       echo '<td>', htmlentities($participant->clan_tag, ENT_QUOTES, "UTF-8"), traitement_pre_affichage($participant->pseudo), '</td>';\r
+       echo '<td>', traitement_pre_affichage($participant->nom), '</td>';\r
+       echo '<td>', traitement_pre_affichage($participant->prenom), '</td>';\r
+       echo '<td>', traitement_pre_affichage($participant->age), '</td>';\r
+       echo '<td>', traitement_pre_affichage($participant->remarques), '</td>';\r
+       echo '</tr>';\r
+}\r
+echo '</table>';\r
+?>\r