From 52d836b2a531fe94371844e91b4cb8fd5f43e3f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Georges=20Dup=C3=A9ron?= Date: Sun, 1 Aug 2010 05:21:19 +0200 Subject: [PATCH] Nouvelle version du cms.php (post-restructuration du code). --- __cms__/cms.php | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/__cms__/cms.php b/__cms__/cms.php index a5ea55b..d167a10 100644 --- a/__cms__/cms.php +++ b/__cms__/cms.php @@ -1,25 +1,18 @@ nouvel_enfant($params["titre"]); - } else if ($action == "supprimer") { - $p->supprimer($params["recursif"]); - } else if ($action == "modifier") { - // TODO : houlà... - } else { - $p->affiche(); - } + public static function cms() { + // TODO : appeller Modules::action($chemin, $action, $paramètres); + + $chemin = Chemin::depuis_url($_SERVER["request_uri"]); // TODO : vérifier nom variables etc. + $noms_params = Modules::liste_paramètres(); + $noms_params[] = "action"; + // récupérer $noms_params dans $_GET, $_POST et $_FILE + $action = $paramètres["action"]; + Modules::action($chemin, $action, $paramètres); } } -?> \ No newline at end of file +?>