X-Git-Url: http://git.euphorik.ch/?a=blobdiff_plain;f=index.php;h=eb2401365c3d228b92940eccbaf0d110324c2ce7;hb=c75da06bb039de2a43f21b6e853a72745f753dca;hp=9e1c8786676beefe51fd28b07f8262ddea09c005;hpb=262be7e249593a2764a7c452f70dc5ac68887d5c;p=cl7.git diff --git a/index.php b/index.php index 9e1c878..eb24013 100644 --- a/index.php +++ b/index.php @@ -1,32 +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', +); -/* 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/participant.php"); +include_once("php/connexion.php"); +include_once("php/config.php"); +include_once("php/controller.php"); +include_once("php/panel.php"); -include_once("config.php"); -include_once("class_participant.php"); -include_once("connexion.php"); -include_once("controller.php"); +# 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); -$MENU = array( - 'acceuil' => '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', -); +if ($controller->nouvel_inscrit) + $page = "bienvenue"; echo ''; + ?> '; - Corcelles-Lan 7 - + message_utilisateur) + echo ''; + else if ($connexion->message_utilisateur) + echo ''; + + # Des constantes stockées en BD accessible par le javascript. + echo ''; + echo ''; + $nbPeriodes = pg_fetch_array(pg_query("SELECT COUNT(*) FROM periodes")); + echo ''; + ?> + Corcelles-Lan 8 + - + - - + +
-
-
- 1 ? 's' : ''; - echo "Il reste ", $nb_places_libres, " place", $s, " libre", $s; - } - ?> -
- Corcelles-Lan 7 +
+
+ get("inscription_terminees")) + { + echo "Les inscriptions sont terminées !"; + } + else if ($nb_places_libres <= 0) + { + echo "Il n'y a plus de places libres"; + } + else + { + $s = $nb_places_libres > 1 ? 's' : ''; + echo "Il reste ", $nb_places_libres, " place", $s, " libre", $s; + } + ?> +
+ Corcelles-Lan 8
-
- '; + $panel->rendre(); + echo '
'; + } + + switch ($page) + { + case 'accueil': + include("php/pages/informations.php"); break; case 'jeux_joues' : - include("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("tx_inscription.php"); + include("php/pages/inscription.php"); break; case 'inscrits' : - include("tx_inscrits.php"); + include("php/pages/inscrits.php"); break; case 'tournoi' : - include("tx_tournoi.php"); + include("php/pages/tournoi.php"); break; case 'intranet' : - include("tx_intranet.php"); + include("php/pages/intranet.php"); break; case 'bienvenue' : - include("tx_bienvenue.php"); + include("php/pages/bienvenue.php"); break; case 'contacts' : - include("tx_contacts.php"); + include("php/pages/contacts.php"); break; case 'photos' : - include("tx_photos.php"); + include("php/pages/photos.php"); break; case 'pizzas': - include("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 ~
- + +