From 557974b66bba86b74181d2b18569ee897eac60a8 Mon Sep 17 00:00:00 2001 From: Greg Burri Date: Thu, 10 Sep 2009 18:01:30 +0200 Subject: [PATCH] MOD Petit refactoring #137 --- index.php | 87 ++++++++++--------- php/{tx_bienvenue.php => pages/bienvenue.php} | 0 php/{tx_contacts.php => pages/contacts.php} | 0 php/pages/fake | 0 .../informations.php} | 0 .../inscription.php} | 0 php/{tx_inscrits.php => pages/inscrits.php} | 0 php/{tx_intranet.php => pages/intranet.php} | 0 .../jeux_joues.php} | 0 php/{tx_photos.php => pages/photos.php} | 0 10 files changed, 44 insertions(+), 43 deletions(-) rename php/{tx_bienvenue.php => pages/bienvenue.php} (100%) rename php/{tx_contacts.php => pages/contacts.php} (100%) delete mode 100644 php/pages/fake rename php/{tx_informations.php => pages/informations.php} (100%) rename php/{tx_inscription.php => pages/inscription.php} (100%) rename php/{tx_inscrits.php => pages/inscrits.php} (100%) rename php/{tx_intranet.php => pages/intranet.php} (100%) rename php/{tx_jeux_joues.php => pages/jeux_joues.php} (100%) rename php/{tx_photos.php => pages/photos.php} (100%) diff --git a/index.php b/index.php index 8fc2259..d624153 100644 --- a/index.php +++ b/index.php @@ -1,7 +1,7 @@ 'Accueil', + 'acceuil' => 'Acceuil', 'jeux_joues' => 'Jeux joués', 'inscription' => 'Inscription', 'inscrits' => 'Inscrits', @@ -81,56 +81,57 @@ Corcelles-Lan 7 # affichage du menu foreach($MENU as $p => $titre ) { -$lien_externe = substr($p, 0, 4) == 'http'; -echo '' . $titre . ''; + $lien_externe = substr($p, 0, 4) == 'http'; + echo '' . $titre . ''; } ?>
'; -include("php/menu_droit.php"); -echo '
'; + echo '
'; + include("php/menu_droit.php"); + echo '
'; } + switch ($page) { -case 'acceuil': -include("php/tx_informations.php"); -break; -case 'jeux_joues' : -include("php/tx_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/tx_inscription.php"); -break; -case 'inscrits' : -include("php/tx_inscrits.php"); -break; -case 'tournoi' : -include("php/tx_tournoi.php"); -break; -case 'intranet' : -include("php/tx_intranet.php"); -break; -case 'bienvenue' : -include("php/tx_bienvenue.php"); -break; -case 'contacts' : -include("php/tx_contacts.php"); -break; -case 'photos' : -include("php/tx_photos.php"); -break; -case 'pizzas': -include("php/pizzas.php"); -break; -default : -echo 'erreur, page introuvable'; -break; + 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; } ?> diff --git a/php/tx_bienvenue.php b/php/pages/bienvenue.php similarity index 100% rename from php/tx_bienvenue.php rename to php/pages/bienvenue.php diff --git a/php/tx_contacts.php b/php/pages/contacts.php similarity index 100% rename from php/tx_contacts.php rename to php/pages/contacts.php diff --git a/php/pages/fake b/php/pages/fake deleted file mode 100644 index e69de29..0000000 diff --git a/php/tx_informations.php b/php/pages/informations.php similarity index 100% rename from php/tx_informations.php rename to php/pages/informations.php diff --git a/php/tx_inscription.php b/php/pages/inscription.php similarity index 100% rename from php/tx_inscription.php rename to php/pages/inscription.php diff --git a/php/tx_inscrits.php b/php/pages/inscrits.php similarity index 100% rename from php/tx_inscrits.php rename to php/pages/inscrits.php diff --git a/php/tx_intranet.php b/php/pages/intranet.php similarity index 100% rename from php/tx_intranet.php rename to php/pages/intranet.php diff --git a/php/tx_jeux_joues.php b/php/pages/jeux_joues.php similarity index 100% rename from php/tx_jeux_joues.php rename to php/pages/jeux_joues.php diff --git a/php/tx_photos.php b/php/pages/photos.php similarity index 100% rename from php/tx_photos.php rename to php/pages/photos.php -- 2.43.0