ADD premier commit
[cl7.git] / tx_inscrits.php
1 <?php # coding:utf-8
2
3 include_once("traitement_pre_affichage.php");
4
5 $res = mysql_query("SELECT pseudo, nom, prenom, age, clan_nom, clan_tag, remarques FROM participants ORDER by clan_nom, clan_tag, pseudo");
6
7 $debut_table = '
8 <table class="inscrits">
9 <tr>
10 <th>pseudo</th>
11 <th>nom</th>
12 <th>prénom</th>
13 <th>age</th>
14 <th>remarques</th>
15 </tr>';
16
17 $clan_courant = null;
18
19 while($participant = mysql_fetch_object($res))
20 {
21 if ($clan_courant !== $participant->clan_nom)
22 {
23 echo ($participant->clan_nom != '' ? '</table><h1>'.traitement_pre_affichage($participant->clan_nom).'</h1>' : ''), $debut_table;
24 $clan_courant = $participant->clan_nom;
25 }
26
27 echo '<tr>';
28 echo '<td>', htmlentities($participant->clan_tag, ENT_QUOTES, "UTF-8"), traitement_pre_affichage($participant->pseudo), '</td>';
29 echo '<td>', traitement_pre_affichage($participant->nom), '</td>';
30 echo '<td>', traitement_pre_affichage($participant->prenom), '</td>';
31 echo '<td>', traitement_pre_affichage($participant->age), '</td>';
32 echo '<td>', traitement_pre_affichage($participant->remarques), '</td>';
33 echo '</tr>';
34 }
35 echo '</table>';
36 ?>