Déplacement de __cmd__/cms.php dans __cms__/cms/.
This commit is contained in:
parent
8479ee3e8d
commit
97f079c653
|
@ -1,7 +1,2 @@
|
|||
Sécurité : les noms de propriétés passés à stockage ne doivent pas
|
||||
contenir de '/' (doivent valider "nettoyer_segment()".
|
||||
Actions pouvant être effectuées par get (pas d'effets de bord) et ne
|
||||
pouvant pas être effectuées par get (seulement POST, effets de
|
||||
bord).
|
||||
|
||||
déplacer cms.php dans __cms__/cms/
|
|
@ -1,27 +1,5 @@
|
|||
<?php
|
||||
|
||||
error_reporting(E_ALL | E_STRICT);
|
||||
|
||||
require_once(dirname(__FILE__) . "/config.php");
|
||||
if (Config::get('courriel_admin') === null) {
|
||||
echo "Vous devez indiquer le courriel de l'administrateur dans le fichier config.php.";
|
||||
exit;
|
||||
}
|
||||
|
||||
require_once(dirname(__FILE__) . "/include.php");
|
||||
|
||||
class CMS {
|
||||
public static function page($chemin_str) {
|
||||
// TODO : appeller Modules::action($chemin, $action, $paramètres);
|
||||
|
||||
$chemin = new Chemin($chemin_str);
|
||||
$noms_params = Modules::get_module($chemin);
|
||||
$noms_params["get_post"][] = "action";
|
||||
$paramètres = array("action" => "vue");
|
||||
// récupérer $noms_params dans $_GET, $_POST et $_FILE ==> $paramètres
|
||||
$action = $paramètres["action"];
|
||||
Modules::action($chemin, $action, $paramètres);
|
||||
}
|
||||
}
|
||||
require_once(dirname(__FILE__) . "/cms/cms.php");
|
||||
|
||||
?>
|
28
__cms__/cms/cms.php
Normal file
28
__cms__/cms/cms.php
Normal file
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
error_reporting(E_ALL | E_STRICT);
|
||||
|
||||
require_once(dirname(__FILE__) . "/../config.php");
|
||||
if (Config::get('courriel_admin') === null) {
|
||||
echo "Vous devez indiquer le courriel de l'administrateur dans le fichier config.php.";
|
||||
exit;
|
||||
}
|
||||
|
||||
require_once(dirname(__FILE__) . "/include_tous.php");
|
||||
|
||||
class CMS {
|
||||
public static function page($chemin_str) {
|
||||
// TODO : appeller Modules::action($chemin, $action, $paramètres);
|
||||
|
||||
$chemin = new Chemin($chemin_str);
|
||||
$noms_params = Modules::get_module($chemin);
|
||||
$noms_params["get_post"][] = "action";
|
||||
$paramètres = array("action" => "vue");
|
||||
// récupérer $noms_params dans $_GET, $_POST et $_FILE ==> $paramètres
|
||||
$action = $paramètres["action"];
|
||||
Modules::action($chemin, $action, $paramètres);
|
||||
echo "OK.";
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
11
__cms__/cms/include_tous.php
Normal file
11
__cms__/cms/include_tous.php
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
require_once(dirname(__FILE__) . "/../cms/include.php");
|
||||
require_once(dirname(__FILE__) . "/../chemin/include.php");
|
||||
require_once(dirname(__FILE__) . "/../modules/include.php");
|
||||
require_once(dirname(__FILE__) . "/../securite/include.php");
|
||||
require_once(dirname(__FILE__) . "/../site/include.php");
|
||||
require_once(dirname(__FILE__) . "/../stockage/include.php");
|
||||
require_once(dirname(__FILE__) . "/../texte-enrichi/include.php");
|
||||
|
||||
?>
|
|
@ -1,11 +0,0 @@
|
|||
<?php
|
||||
|
||||
require_once(dirname(__FILE__) . "/cms/include.php");
|
||||
require_once(dirname(__FILE__) . "/chemin/include.php");
|
||||
require_once(dirname(__FILE__) . "/modules/include.php");
|
||||
require_once(dirname(__FILE__) . "/securite/include.php");
|
||||
require_once(dirname(__FILE__) . "/site/include.php");
|
||||
require_once(dirname(__FILE__) . "/stockage/include.php");
|
||||
require_once(dirname(__FILE__) . "/texte-enrichi/include.php");
|
||||
|
||||
?>
|
Loading…
Reference in New Issue
Block a user