X-Git-Url: http://git.euphorik.ch/?a=blobdiff_plain;f=index.php;h=e0b42df58eedf8b2b43c24c4bca4e8a0c812a8c5;hb=7e415f0586afe35a45d7fc6c34bfe32f55381096;hp=575f4b019667091219b2dada5da4ca78a5e1b225;hpb=7ba28ff47a9cec801736677a79b3bf4d3a5adb03;p=cl7.git
diff --git a/index.php b/index.php
index 575f4b0..e0b42df 100644
--- a/index.php
+++ b/index.php
@@ -1,7 +1,7 @@
participant;
+$controller = new Controller($participant);
+$panel = new Panel($participant);
$MENU = array(
- 'acceuil' => 'Accueil',
+ 'accueil' => 'Accueil',
'jeux_joues' => 'Jeux joués',
'inscription' => 'Inscription',
'inscrits' => 'Inscrits',
@@ -35,9 +43,14 @@ echo '';
';
+ # Permet d'afficher un message à l'utilisateur lors du chargement de la page via le javascript, voir 'cl7.js'.
+ if ($controller->message_utilisateur) echo '';
+
+ # Des constantes stockées en BD accessible par le javascript.
echo '';
echo '';
+ $nbPeriodes = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM periodes"));
+ echo '';
?>
Corcelles-Lan 7
@@ -46,15 +59,19 @@ echo '';
-
-
+
+
get("inscription_terminees"))
+ {
+ echo "Les inscriptions sont terminées !";
+ }
+ else if ($nb_places_libres <= 0)
{
echo "Il n'y a plus de places libres";
}
@@ -69,66 +86,67 @@ echo '';
- ';
- include("php/menu_droit.php");
- echo '
';
- }
- switch ($page)
- {
- case 'acceuil':
- include("php/tx_informations.php");
+ ';
+ $panel->rendre();
+ echo '
';
+ }
+
+ switch ($page)
+ {
+ case 'accueil':
+ include("php/pages/informations.php");
break;
case 'jeux_joues' :
- include("php/tx_jeux_joues.php");
+ include("php/pages/jeux_joues.php");
break;
case 'inscription' :
- if (Participant::nombre_participant_max_atteint() && !$le_participant->valide)
+ if (Participant::nombre_participant_max_atteint() && !$participant->valide)
echo 'Nous sommes désolés, il n\'y a plus de places libres';
else
- include("php/tx_inscription.php");
+ include("php/pages/inscription.php");
break;
case 'inscrits' :
- include("php/tx_inscrits.php");
+ include("php/pages/inscrits.php");
break;
case 'tournoi' :
- include("php/tx_tournoi.php");
+ include("php/pages/tournoi.php");
break;
case 'intranet' :
- include("php/tx_intranet.php");
+ include("php/pages/intranet.php");
break;
case 'bienvenue' :
- include("php/tx_bienvenue.php");
+ include("php/pages/bienvenue.php");
break;
case 'contacts' :
- include("php/tx_contacts.php");
+ include("php/pages/contacts.php");
break;
case 'photos' :
- include("php/tx_photos.php");
+ include("php/pages/photos.php");
break;
case 'pizzas':
- include("php/pizzas.php");
+ include("php/pages/pizzas.php");
break;
default :
echo 'erreur, page introuvable';
break;
- }
- ?>
-
-
- ~ site codé en PHP avec les pieds ~
-
+ }
+ ?>
+
+
+ ~ site codé en PHP avec les pieds ~
-
+
+