diff --git a/ecrire/inc_presentation.php3 b/ecrire/inc_presentation.php3 index 22c527bbad315b41930f061f073f0b778f15b2f2..fd327becfb6a46fbeb8e235a978245cd7f4a29bf 100644 --- a/ecrire/inc_presentation.php3 +++ b/ecrire/inc_presentation.php3 @@ -3521,4 +3521,24 @@ function http_style_background($img, $att='') return " style='background: url(\"" . _DIR_IMG_PACK . $img . '")' . ($att ? (' ' . $att) : '') . ";'"; } + +// Afficher le bouton "preview" dans l'espace public +function afficher_bouton_preview() { + $x = majuscules(_T('previsualisation')); + return '<div style=" + display: block; + color: #eeeeee; + background-color: #111111; + padding-right: 5px; + padding-top: 2px; + padding-bottom: 5px; + font-size: 20px; + top: 0px; + left: 0px; + position: absolute; + ">' + . http_img_pack('naviguer-site.png', $x, '') + ." $x</div>"; +} + ?> diff --git a/inc-public-global.php3 b/inc-public-global.php3 index 43859b9afee3aa77f7174e633a76ee62bfe07e1e..4af36f488e0d3f9f5732807477ab9cb603c3b651 100644 --- a/inc-public-global.php3 +++ b/inc-public-global.php3 @@ -16,7 +16,7 @@ if (defined("_INC_PUBLIC_GLOBAL")) return; define("_INC_PUBLIC_GLOBAL", "1"); // fonction principale declenchant tout le service -function calcule_header_et_page ($fond, &$delais) { +function calcule_header_et_page ($fond, $delais) { global $auteur_session, $flag_dynamique, $flag_ob, $flag_preserver, $forcer_lang, $ignore_auth_http, $lastmodified, $recherche, $use_cache, $var_confirm, $var_mode, @@ -258,43 +258,14 @@ function afficher_page_globale ($fond, $delais, &$use_cache) { if ($chemin_cache) $page['cache'] = $chemin_cache; if ($var_preview AND !$flag_preserver) { - include_ecrire('inc_lang.php3'); - include_ecrire('inc_filtres.php3'); - lang_select($GLOBALS['auteur_session']['lang']); - $x = majuscules(_T('previsualisation')); - $page['texte'] .= '<div style=" - display: block; - color: #eeeeee; - background-color: #111111; - padding-right: 5px; - padding-top: 2px; - padding-bottom: 5px; - font-size: 20px; - top: 0px; - left: 0px; - position: absolute; - ">' - . http_img_pack('naviguer-site.png', $x, '') - ." $x</div>"; + include_ecrire('inc_presentation.php3'); + $page['texte'] .= afficher_bouton_preview(); } return $page; } -function terminer_public_global() { - - // Gestion des statistiques du site public - if (lire_meta("activer_statistiques") != "non") { - include_local ("inc-stats.php3"); - ecrire_stats(); - } - - // Effectuer une tache de fond ? - cron(); -} - - function inclure_page($fond, $delais_inclus, $contexte_inclus, $cache_incluant='') { $contexte_inclus['fond'] = $fond; diff --git a/inc-public.php3 b/inc-public.php3 index 647164ea975e8bcdbdcc20ad6b0554de6783fda6..c23efc6e241ba4875ab8ffc89374454da1e392d6 100644 --- a/inc-public.php3 +++ b/inc-public.php3 @@ -110,8 +110,15 @@ if (defined("_INC_PUBLIC")) { // Affichage final s'il en reste echo $page; - // Taches de fond ? - terminer_public_global(); + // Gestion des statistiques du site public + if (lire_meta("activer_statistiques") != "non") { + include_local ("inc-stats.php3"); + ecrire_stats(); + } + + // Effectuer une tache de fond ? + cron(); + } ?>