3 include_once("php/traitement_pre_affichage.php");
5 $participants = pg_query("
6 SELECT id, pseudo, nom, prenom, clan_nom, clan_tag, remarques
8 ORDER by clan_nom NULLS FIRST, clan_tag NULLS FIRST, pseudo
11 $periodes = pg_query("SELECT nom_abrege FROM periodes ORDER BY id");
18 while($periode = pg_fetch_object($periodes))
20 $debut_table .= '<th>'.$periode->nom_abrege
.'</th>';
23 $debut_table .= '<th>remarques</th>
26 $clan_courant = "PHP c'est du CACA";
28 echo '<table class="inscrits">';
29 while($participant = pg_fetch_object($participants))
31 if ($clan_courant !== $participant->clan_nom
)
33 echo ($participant->clan_nom
!= '' ? '<tr><td colspan="'. ($nb_periode +
4) .'"><h1>'.traitement_pre_affichage($participant->clan_nom
).'</h1></td></tr>' : ''), $debut_table;
34 $clan_courant = $participant->clan_nom
;
37 $participations = pg_query_params("
38 SELECT periodes.nom, participations.participant_id FROM periodes
39 LEFT JOIN participations ON periodes.id = participations.periode_id AND participations.participant_id = $1
41 ", array($participant->id
));
44 echo '<td>', htmlentities($participant->clan_tag
, ENT_QUOTES
, "UTF-8"), traitement_pre_affichage($participant->pseudo
), '</td>';
45 echo '<td>', traitement_pre_affichage($participant->nom
), '</td>';
46 echo '<td>', traitement_pre_affichage($participant->prenom
), '</td>';
47 while ($participation = pg_fetch_object($participations))
48 echo '<td '.($participation->participant_id
== $participant->id
? 'class="participe"' : '').'></td>';
50 echo '<td>', traitement_pre_affichage($participant->remarques
), '</td>';