-<?php # coding: utf-8\r
+<?php # coding: utf-8
$page = $_GET['page'];
if (!isset($page)) $page = "acceuil"; #la page par défaut
if($titre[1] && (ip2long($REMOTE_ADDR) & ip2long($MASK_RESEAU)) != (ip2long($IP_SERVEUR) & ip2long($MASK_RESEAU)))
*/
-include_once("php/class_participant.php");\r
+include_once("php/class_participant.php");
include_once("php/connexion.php");
include_once("php/config.php");
include_once("php/controller.php");
'acceuil' => 'Accueil',
'jeux_joues' => 'Jeux joués',
'inscription' => 'Inscription',
- 'inscrits' => 'Inscrits',\r
+ 'inscrits' => 'Inscrits',
'http://www.euphorik.ch/#page="minichat";conv=[1642]' => 'Chat',
'contacts' => 'Contacts',
#'mods' => 'Mods',
echo '<meta name="cout_periode" content="'.$config->get('cout_periode').'" />';
echo '<meta name="cout_total" content="'.$config->get('cout_total').'" />';
?>
- <title>Corcelles-Lan 7</title>\r
- <link rel="stylesheet" href="css/style.css" type="text/css" media="screen" ></link>\r
+ <title>Corcelles-Lan 7</title>
+ <link rel="stylesheet" href="css/style.css" type="text/css" media="screen" ></link>
<script type="text/javascript" src="js/jquery-1.2.6.min.js"></script>
- <script type="text/javascript" src="js/betterjs.js"></script>\r
+ <script type="text/javascript" src="js/betterjs.js"></script>
<script type="text/javascript" src="js/cl7.js"></script>
<script type="text/javascript" src="js/util.js"></script>
</head>
<div id="info" style="display:none" ><div id="icone"></div><div class="fermer" ></div><div class="message" ></div><div class="boutons"></div></div>
<div id="container">
<div id="cadre">
- <div id="titre">\r
- <div id="nbPlacesRestantes">\r
- <?php\r
- $nb_places_libres = Participant::nombre_place_restante();\r
- if ($nb_places_libres <= 0)\r
- {\r
- echo "Il n'y a plus de places libres";\r
- }\r
- else\r
- {\r
- $s = $nb_places_libres > 1 ? 's' : '';\r
- echo "Il reste <em>", $nb_places_libres, "</em> place", $s, " libre", $s; \r
- }\r
- ?>\r
- </div>\r
- Corcelles-Lan 7\r
+ <div id="titre">
+ <div id="nbPlacesRestantes">
+ <?php
+ $nb_places_libres = Participant::nombre_place_restante();
+ if ($nb_places_libres <= 0)
+ {
+ echo "Il n'y a plus de places libres";
+ }
+ else
+ {
+ $s = $nb_places_libres > 1 ? 's' : '';
+ echo "Il reste <em>", $nb_places_libres, "</em> place", $s, " libre", $s;
+ }
+ ?>
+ </div>
+ Corcelles-Lan 7
</div>
<ul id="menu">
<?php
# affichage du menu
foreach($MENU as $p => $titre )
- {\r
+ {
$lien_externe = substr($p, 0, 4) == 'http';
echo '<li' . ($p == $page ? ' class="courante"' : '') . '><a href="'.($lien_externe ? $p : $p.'.html').'" '.($lien_externe ? 'class="externe"' : '').'>' . $titre . '</a></li>';
}
?>
</ul>
<div id="contenu">
- <div id="informations"><?php include("php/menu_droit.php") ?></div>
<?php
+ if ($page != 'inscrits') {
+ echo '<div id="informations">';
+ include("php/menu_droit.php");
+ echo '</div>';
+ }
switch ($page)
{
case 'acceuil':
-<?php # coding:utf-8\r
-\r
-include_once("traitement_pre_affichage.php");\r
-\r
+<?php # coding:utf-8
+
+include_once("traitement_pre_affichage.php");
+
$participants = mysql_query("
SELECT id, pseudo, nom, prenom, clan_nom, clan_tag, remarques
FROM participants
ORDER by clan_nom, clan_tag, pseudo
-");\r
+");
-$periodes = mysql_query("SELECT nom_abrege FROM periodes ORDER BY id");\r
-$debut_table = '\r
-<table class="inscrits">\r
- <tr>\r
- <th>pseudo</th>\r
- <th>nom</th>\r
+$periodes = mysql_query("SELECT nom_abrege FROM periodes ORDER BY id");
+$debut_table = '
+ <tr>
+ <th>pseudo</th>
+ <th>nom</th>
<th>prénom</th>';
+$nb_periode = 0;
while($periode = mysql_fetch_object($periodes))
- $debut_table .= '<th>'.$periode->nom_abrege.'</th>';\r
-$debut_table .= '<th>remarques</th>\r
- </tr>';\r
- \r
-$clan_courant = null;\r
-\r
-while($participant = mysql_fetch_object($participants))\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
+{
+ $debut_table .= '<th>'.$periode->nom_abrege.'</th>';
+ $nb_periode++;
+}
+$debut_table .= '<th>remarques</th>
+ </tr>';
+
+$clan_courant = null;
+
+echo '<table class="inscrits">';
+while($participant = mysql_fetch_object($participants))
+{
+ if ($clan_courant !== $participant->clan_nom)
+ {
+ echo ($participant->clan_nom != '' ? '<tr><td colspan="'. ($nb_periode + 4) .'"><h1>'.traitement_pre_affichage($participant->clan_nom).'</h1></td>' : ''), $debut_table;
+ $clan_courant = $participant->clan_nom;
}
$participations = mysql_query("
SELECT periodes.nom, participations.participant_id FROM periodes
LEFT JOIN participations ON periodes.id = participations.periode_id AND participations.participant_id = ".$participant->id."
ORDER BY id
- ");\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 '<tr>';
+ echo '<td>', htmlentities($participant->clan_tag, ENT_QUOTES, "UTF-8"), traitement_pre_affichage($participant->pseudo), '</td>';
+ echo '<td>', traitement_pre_affichage($participant->nom), '</td>';
echo '<td>', traitement_pre_affichage($participant->prenom), '</td>';
while ($participation = mysql_fetch_object($participations))
echo '<td '.($participation->participant_id == $participant->id ? 'class="participe"' : '').'></td>';
- \r
- echo '<td>', traitement_pre_affichage($participant->remarques), '</td>';\r
- echo '</tr>';\r
-}\r
-echo '</table>';\r
-?>\r
+
+ echo '<td>', traitement_pre_affichage($participant->remarques), '</td>';
+ echo '</tr>';
+}
+echo '</table>';
+?>
+