X-Git-Url: http://git.euphorik.ch/?a=blobdiff_plain;f=index.php;h=eb2401365c3d228b92940eccbaf0d110324c2ce7;hb=c75da06bb039de2a43f21b6e853a72745f753dca;hp=363de7a6fae7f94503fd191ed9f02e20742d2da0;hpb=474845951b5f5c2ebedaffc05d5bf396c878fdc4;p=cl7.git diff --git a/index.php b/index.php index 363de7a..eb24013 100644 --- a/index.php +++ b/index.php @@ -1,33 +1,36 @@ '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'; +$connexion = new Connexion(); +$config = new Config(); +$participant = $connexion->participant; +$controller = new Controller($participant, $config); +$panel = new Panel($participant); + +if ($controller->nouvel_inscrit) + $page = "bienvenue"; echo ''; + ?> '; - '; - + if ($controller->message_utilisateur) + echo ''; + else if ($connexion->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")); + $nbPeriodes = pg_fetch_array(pg_query("SELECT COUNT(*) FROM periodes")); echo ''; ?> Corcelles-Lan 8 @@ -91,7 +97,7 @@ echo ''; '; - include("php/menu_droit.php"); + $panel->rendre(); echo ''; } @@ -104,7 +110,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 +134,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';