X-Git-Url: http://git.euphorik.ch/?p=cl7.git;a=blobdiff_plain;f=index.php;fp=index.php;h=e0b42df58eedf8b2b43c24c4bca4e8a0c812a8c5;hp=f7136c5c64d5b051ac94080d1a0273e2fb386e7b;hb=7e415f0586afe35a45d7fc6c34bfe32f55381096;hpb=c1d939c263d7748af8a126f4fba72972c263561d diff --git a/index.php b/index.php index f7136c5..e0b42df 100644 --- a/index.php +++ b/index.php @@ -3,17 +3,24 @@ $page = $_GET['page']; if (!isset($page)) $page = "accueil"; #la page par défaut - /* Pour déterminer si en LAN !? $IP_SERVEUR = '192.168.1.1'; $MASK_RESEAU = '255.255.255.0'; if($titre[1] && (ip2long($REMOTE_ADDR) & ip2long($MASK_RESEAU)) != (ip2long($IP_SERVEUR) & ip2long($MASK_RESEAU))) */ -include_once("php/class_participant.php"); +include_once("php/participant.php"); include_once("php/connexion.php"); include_once("php/config.php"); include_once("php/controller.php"); +include_once("php/panel.php"); + +# Différents objets, sont accessibles directements par les pages (voir dossier '/php/pages/'). +$config = new Config(); +$connexion = new Connexion(); +$participant = $connexion->participant; +$controller = new Controller($participant); +$panel = new Panel($participant); $MENU = array( 'accueil' => 'Accueil', @@ -35,10 +42,10 @@ echo ''; - '; - + if ($controller->message_utilisateur) echo ''; + # Des constantes stockées en BD accessible par le javascript. echo ''; echo ''; @@ -91,7 +98,7 @@ echo ''; '; - include("php/menu_droit.php"); + $panel->rendre(); echo ''; } @@ -104,7 +111,7 @@ echo ''; 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/pages/inscription.php"); @@ -128,7 +135,7 @@ echo ''; include("php/pages/photos.php"); break; case 'pizzas': - include("php/pizzas.php"); + include("php/pages/pizzas.php"); break; default : echo 'erreur, page introuvable';