X-Git-Url: http://git.euphorik.ch/?p=cl7.git;a=blobdiff_plain;f=index.php;h=73edd6ef0d9a91f04d152f4a951927fd12516d17;hp=363de7a6fae7f94503fd191ed9f02e20742d2da0;hb=72508fb3290057e8afd090d06e5763ee8ff68cd7;hpb=474845951b5f5c2ebedaffc05d5bf396c878fdc4 diff --git a/index.php b/index.php index 363de7a..73edd6e 100644 --- a/index.php +++ b/index.php @@ -1,31 +1,30 @@ 'Accueil', # la page par défaut + 'jeux_joues' => 'Jeux joués', + 'inscription' => 'Inscription', + 'inscrits' => 'Inscrits', + 'http://www.euphorik.ch/#page="minichat";conv=[1642]' => 'Chat', + 'contacts' => 'Contacts', + #'mods' => 'Mods', + #'cracks' => 'Cracks', + #'pizzas' => 'Pizza', +); -$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"); -$MENU = array( - 'accueil' => 'Accueil', - 'jeux_joues' => 'Jeux joués', - 'inscription' => 'Inscription', - 'inscrits' => 'Inscrits', - 'http://www.euphorik.ch/#page="minichat";conv=[1642]' => 'Chat', - 'contacts' => 'Contacts', - #'mods' => 'Mods', - #'cracks' => 'Cracks', - #'pizzas' => 'Pizza', -); +# Différents objets, sont accessibles directement par les pages (voir dossier '/php/pages/'). +$page = $_GET['page'] ? $_GET['page'] : 'accueil'; +$config = new Config(); +$connexion = new Connexion(); +$participant = $connexion->participant; +$controller = new Controller($participant); +$panel = new Panel($participant); echo ''; ?> @@ -35,10 +34,10 @@ echo ''; - '; - + if ($controller->message_utilisateur) echo ''; + # Des constantes stockées en BD accessible par le javascript. echo ''; echo ''; @@ -91,7 +90,7 @@ echo ''; '; - include("php/menu_droit.php"); + $panel->rendre(); echo ''; } @@ -104,7 +103,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 +127,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';