3 /***************************************************************************\
4 * SPIP, Systeme de publication pour l'internet *
6 * Copyright (c) 2001-2019 *
7 * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
9 * Ce programme est un logiciel libre distribue sous licence GNU/GPL. *
10 * Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. *
11 \***************************************************************************/
14 * Gestion d'affichage des pages privées en squelette (méthode dépreciée)
16 * Chargé depuis ecrire/index.php lorsqu'une page demandée est présente
17 * en tant que squelettes dans `prive/exec`.
20 * Il faut créer les squelettes de l'espace privé dans `prive/squelettes`
22 * @package SPIP\Core\Exec
25 if (!defined('_ECRIRE_INC_VERSION')) {
30 * Un exec générique qui utilise le fond homonyme de l'exec demandé
33 * Ancien système transitoire basé sur un squelette unique avec un
34 * pseudo balisage par commentaires HTML
36 * @deprecated Ne plus utiliser. Migrer vers `prive/squelettes/`
38 * @pipeline_appel affiche_hierarchie
39 * @pipeline_appel affiche_gauche
40 * @pipeline_appel affiche_droite
41 * @pipeline_appel affiche_milieu
44 function exec_fond_monobloc_dist() {
47 // c'est au fond de les gerer avec #AUTORISER, et de renvoyer un fond vide le cas echeant
48 // qui declenchera un minipres acces interdit
49 $exec = _request('exec');
50 $fond = trim(recuperer_fond("prive/exec/$exec", $_REQUEST));
52 include_spip('inc/minipres');
56 $titre = "exec_$exec";
61 // recuperer le titre dans le premier hn de la page
62 if (preg_match(",<h[1-6][^>]*>(.+)</h[1-6]>,Uims", $fond, $match)) {
66 // recuperer la hierarchie (au-dessus du contenu)
67 if (preg_match(",<!--#hierarchie-->.+<!--/#hierarchie-->,Uims", $fond, $match)) {
68 $hierarchie = $match[0];
69 $fond = str_replace($hierarchie, "", $fond);
72 // recuperer la navigation (colonne de gauche)
73 if (preg_match(",<!--#navigation-->.+<!--/#navigation-->,Uims", $fond, $match)) {
74 $navigation = $match[0];
75 $fond = str_replace($navigation, "", $fond);
78 // recuperer les extras (colonne de droite)
79 if (preg_match(",<!--#extra-->.+<!--/#extra-->,Uims", $fond, $match)) {
81 $fond = str_replace($extra, "", $fond);
84 include_spip('inc/presentation'); // alleger les inclusions avec un inc/presentation_mini
85 $commencer_page = charger_fonction('commencer_page', 'inc');
86 echo $commencer_page($titre);
89 echo debut_grand_cadre(true);
99 echo fin_grand_cadre(true);
102 echo debut_gauche("exec_$exec", true);
104 $contexte = array('exec' => $exec);
105 if ($objet_exec = trouver_objet_exec($exec)) {
106 $id = $objet_exec['id_table_objet'];
108 $contexte[$id] = _request($id);
113 echo pipeline('affiche_gauche', array('args' => $contexte, 'data' => ''));
115 echo creer_colonne_droite("exec_$exec", true);
117 echo pipeline('affiche_droite', array('args' => $contexte, 'data' => ''));
119 echo debut_droite("exec_$exec", true);
121 echo pipeline('affiche_milieu', array('args' => $contexte, 'data' => ''));
123 echo fin_gauche(), fin_page();