X-Git-Url: http://git.euphorik.ch/?a=blobdiff_plain;f=index.php;h=3025188b54446a7b5008d5a85168ea0c153eda9d;hb=48b115df657e8101a8c1e5d0bb7bb6b315a52aa5;hp=d6241531435a5ae6bb366e0552bd022f7c99d136;hpb=557974b66bba86b74181d2b18569ee897eac60a8;p=cl7.git
diff --git a/index.php b/index.php
index d624153..3025188 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");
+
+# 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' => 'Acceuil',
- '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 '';
+
?>
';
- ';
-
+ if ($controller->message_utilisateur)
+ echo '';
+ else if ($connexion->message_utilisateur)
+ echo '';
+
# Des constantes stockées en BD accessible par le javascript.
echo '';
echo '';
- echo '';
+ $nbPeriodes = pg_fetch_array(pg_query("SELECT COUNT(*) FROM periodes"));
+ echo '';
+ echo '';
?>
- Corcelles-Lan 7
+ Corcelles-Lan 8
-
-
-
+
+
+
-
-
-
-
-
-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 7
-
-
-
-';
- include("php/menu_droit.php");
- 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";
+ }
+ 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/tx_informations.php");
- break;
- case 'jeux_joues' :
- include("php/pages/jeux_joues.php");
- break;
- case 'inscription' :
- if (Participant::nombre_participant_max_atteint() && !$le_participant->valide)
- echo 'Nous sommes désolés, il n\'y a plus de places libres';
- else
- include("php/pages/inscription.php");
- break;
- case 'inscrits' :
- include("php/pages/inscrits.php");
- break;
- case 'tournoi' :
- include("php/pages/tournoi.php");
- break;
- case 'intranet' :
- include("php/pages/intranet.php");
- break;
- case 'bienvenue' :
- include("php/pages/bienvenue.php");
- break;
- case 'contacts' :
- include("php/pages/contacts.php");
- break;
- case 'photos' :
- include("php/pages/photos.php");
- break;
- case 'pizzas':
- include("php/pizzas.php");
- break;
- default :
- echo 'erreur, page introuvable';
- break;
-}
-?>
-
-
-~ site codé en PHP avec les pieds ~
-
-
-
+ switch ($page)
+ {
+ case 'accueil':
+ include("php/pages/informations.php");
+ break;
+ case 'jeux_joues' :
+ include("php/pages/jeux_joues.php");
+ break;
+ case 'inscription' :
+ 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");
+ break;
+ case 'inscrits' :
+ include("php/pages/inscrits.php");
+ break;
+ case 'tournoi' :
+ include("php/pages/tournoi.php");
+ break;
+ case 'intranet' :
+ include("php/pages/intranet.php");
+ break;
+ case 'bienvenue' :
+ include("php/pages/bienvenue.php");
+ break;
+ case 'contacts' :
+ include("php/pages/contacts.php");
+ break;
+ case 'photos' :
+ include("php/pages/photos.php");
+ break;
+ case 'pizzas':
+ include("php/pages/pizzas.php");
+ break;
+ default :
+ echo 'erreur, page introuvable';
+ break;
+ }
+ ?>
+
+
+ ~ site
codé en PHP avec les pieds ~
+
+
+