diff --git a/.gitattributes b/.gitattributes index b7d206f4298a2a5de03f05bf10bc9762bcf6a202..4a60cd55bada0e9c9b441cb40323c0d4eaad63b2 100644 --- a/.gitattributes +++ b/.gitattributes @@ -358,6 +358,7 @@ ecrire/lang/public_ru.php3 -text ecrire/lang/spip_br.php3 -text ecrire/lang/spip_cs.php3 -text ecrire/lang/spip_ru.php3 -text +ecrire/page.php -text ecrire/polices/dustismo-license.txt -text svneol=unset#application/octet-stream ecrire/polices/dustismo.ttf -text ecrire/polices/dustismo_bold.ttf -text diff --git a/ecrire/page.php b/ecrire/page.php new file mode 100644 index 0000000000000000000000000000000000000000..5fbedf939f6f930658e801a1798952f1d9fd7251 --- /dev/null +++ b/ecrire/page.php @@ -0,0 +1,30 @@ +<?php + +// Appel spip +if (!function_exists('find_in_path')) { + if (@file_exists('ecrire/inc_version.php')) { + include 'ecrire/inc_version.php'; + } else exit; +} + +// Reglage du $fond +if (isset($contexte_inclus['fond'])) + $fond = $contexte_inclus['fond']; +else if (isset($_GET['page'])) + $fond = $_GET['page']; +else + $fond = 'sommaire'; + +// Securite +if (strstr($fond, '/')) + die (_L("Faut pas se gener")); + +if (!find_in_path($fond.'.html')) { + spip_log("page: find_in_path ne trouve pas le squelette $fond"); + echo _T('info_erreur_squelette2', + array('fichier' => htmlspecialchars($fond))); + $fond = '404'; +} +include (_DIR_INCLUDE . 'public.php'); + +?>