function install_debut_html($titre = 'AUTO', $onLoad = '') { global $spip_lang_right,$spip_lang_left; utiliser_langue_visiteur(); http_no_cache(); if ($titre=='AUTO') $titre=_T('info_installation_systeme_publication'); # le charset est en utf-8, pour recuperer le nom comme il faut # lors de l'installation if (!headers_sent()) header('Content-Type: text/html; charset=utf-8'); // au cas ou minipres() est appele avant spip_initialisation_suite() if (!defined('_DOCTYPE_ECRIRE')) define('_DOCTYPE_ECRIRE', ''); return _DOCTYPE_ECRIRE. html_lang_attributes(). "<head>\n". "<title>". textebrut($titre). "</title> <link rel='stylesheet' href='".direction_css(find_in_path('minipres.css')). "' type='text/css' media='all' />\n" . // cet appel permet d'assurer un copier-coller du nom du repertoire a creer dans tmp (esj) http_script('', "spip_barre.js") . "</head> <body".$onLoad." class='minipres'> <div id='minipres'> <h1>". $titre . "</h1> <div>\n"; }
function init_entete($titre='', $id_rubrique=0, $minipres=false) { include_spip('inc/gadgets'); if (!$nom_site_spip = textebrut(typo($GLOBALS['meta']["nom_site"]))) $nom_site_spip= _T('info_mon_site_spip'); // Pour corriger la position des sous-menus principaux // (quand intitules sur 2 lignes) $js = repercuter_gadgets($id_rubrique); $head = "<title>[" . $nom_site_spip . "] " . textebrut(typo($titre)) . "</title>\n" . "<meta http-equiv='Content-Type' content='text/html" . (($c = $GLOBALS['meta']['charset']) ? "; charset=$c" : '') . "' />\n" . envoi_link($nom_site_spip,$minipres, $js); return _DOCTYPE_ECRIRE . html_lang_attributes() . "<head>\n" . pipeline('header_prive', $head) . "</head>\n"; }
function redirige_par_entete($url, $equiv='', $status = 302) { if (!in_array($status,array(301,302))) $status = 302; $url = trim(strtr($url, "\n\r", " ")); # en theorie on devrait faire ca tout le temps, mais quand la chaine # commence par ? c'est imperatif, sinon l'url finale n'est pas la bonne if ($url[0]=='?') $url = url_de_base().(_DIR_RESTREINT?'':_DIR_RESTREINT_ABS).$url; if ($url[0]=='#') $url = self('&').$url; if ($x = _request('transformer_xml')) $url = parametre_url($url, 'transformer_xml', $x, '&'); if (defined('_AJAX') AND _AJAX) $url = parametre_url($url, 'var_ajax_redir', 1, '&'); // ne pas laisser passer n'importe quoi dans l'url $url = str_replace(array('<','"'),array('<','"'),$url); // interdire les url inline avec des pseudo-protocoles : if ( (preg_match(",data:,i",$url) AND preg_match("/base64\s*,/i",$url)) OR preg_match(",(javascript|mailto):,i",$url) ) $url ="./"; // Il n'y a que sous Apache que setcookie puis redirection fonctionne if (!$equiv OR (strncmp("Apache", $_SERVER['SERVER_SOFTWARE'],6)==0) OR defined('_SERVER_APACHE')) { @header("Location: " . $url); $equiv=""; } else { @header("Refresh: 0; url=" . $url); $equiv = "<meta http-equiv='Refresh' content='0; url=$url'>"; } include_spip('inc/lang'); if ($status!=302) http_status($status); echo '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">',"\n", html_lang_attributes(),' <head>', $equiv,' <title>HTTP '.$status.'</title> </head> <body> <h1>HTTP '.$status.'</h1> <a href="', quote_amp($url), '">', _T('navigateur_pas_redirige'), '</a></body></html>'; spip_log("redirige $status: $url"); exit; }
/** * Envoi du DOCTYPE et du `<head><title> </head>` * * @uses _DOCTYPE_ECRIRE * @uses textebrut() * @uses typo() * @uses html_lang_attributes() * @uses init_head() * * @param string $titre * Titre de la page * @param integer $dummy * Valeur non utilisée… * @param bool $minipres * @return string * Entête du fichier HTML avec le DOCTYPE */ function init_entete($titre = '', $dummy = 0, $minipres = false) { include_spip('inc/texte'); if (!($nom_site_spip = textebrut(typo($GLOBALS['meta']["nom_site"])))) { $nom_site_spip = _T('info_mon_site_spip'); } $titre = "[" . $nom_site_spip . "]" . ($titre ? " " . textebrut(typo($titre)) : ""); return _DOCTYPE_ECRIRE . html_lang_attributes() . "<head>\n" . init_head($titre, $dummy, $minipres) . "</head>\n"; }
function redirige_par_entete($url, $equiv = '', $status = 302) { if (!in_array($status, array(301, 302))) { $status = 302; } $url = trim(strtr($url, "\n\r", " ")); # en theorie on devrait faire ca tout le temps, mais quand la chaine # commence par ? c'est imperatif, sinon l'url finale n'est pas la bonne if ($url[0] == '?') { $url = url_de_base() . $url; } if ($url[0] == '#') { $url = self('&') . $url; } # si profondeur non nulle et url relative, il faut la passer en absolue if ($GLOBALS['profondeur_url'] > (_DIR_RESTREINT ? 1 : 2) and !preg_match(",^(\\w+:)?//,", $url)) { include_spip("inc/filtres_mini"); $url = url_absolue($url); } if ($x = _request('transformer_xml')) { $url = parametre_url($url, 'transformer_xml', $x, '&'); } if (defined('_AJAX') and _AJAX) { $url = parametre_url($url, 'var_ajax_redir', 1, '&'); } // ne pas laisser passer n'importe quoi dans l'url $url = str_replace(array('<', '"'), array('<', '"'), $url); // interdire les url inline avec des pseudo-protocoles : if (preg_match(",data:,i", $url) and preg_match("/base64\\s*,/i", $url) or preg_match(",(javascript|mailto):,i", $url)) { $url = "./"; } // Il n'y a que sous Apache que setcookie puis redirection fonctionne include_spip('inc/cookie'); if (!$equiv and !spip_cookie_envoye() or (strncmp("Apache", $_SERVER['SERVER_SOFTWARE'], 6) == 0 or defined('_SERVER_APACHE'))) { @header("Location: " . $url); $equiv = ""; } else { @header("Refresh: 0; url=" . $url); $equiv = "<meta http-equiv='Refresh' content='0; url={$url}'>"; } include_spip('inc/lang'); if ($status != 302) { http_status($status); } echo '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">', "\n", html_lang_attributes(), ' <head>', $equiv, ' <title>HTTP ' . $status . '</title> </head> <body> <h1>HTTP ' . $status . '</h1> <a href="', quote_amp($url), '">', _T('navigateur_pas_redirige'), '</a></body></html>'; spip_log("redirige {$status}: {$url}"); exit; }
/** * Envoyer le navigateur sur une nouvelle adresse * * Le tout en évitant les attaques par la redirection (souvent indique par un `$_GET`) * * @example * ``` * $redirect = parametre_url(urldecode(_request('redirect')),'id_article=' . $id_article); * include_spip('inc/headers'); * redirige_par_entete($redirect); * ``` * * @param string $url URL de redirection * @param string $equiv ? * @param int $status Code de redirection (301 ou 302) **/ function redirige_par_entete($url, $equiv = '', $status = 302) { if (!in_array($status, array(301, 302))) { $status = 302; } $url = trim(strtr($url, "\n\r", " ")); # si l'url de redirection est relative, on la passe en absolue if (!preg_match(",^(\\w+:)?//,", $url)) { include_spip("inc/filtres_mini"); $url = url_absolue($url); } if ($x = _request('transformer_xml')) { $url = parametre_url($url, 'transformer_xml', $x, '&'); } if (defined('_AJAX') and _AJAX) { $url = parametre_url($url, 'var_ajax_redir', 1, '&'); } // ne pas laisser passer n'importe quoi dans l'url $url = str_replace(array('<', '"'), array('<', '"'), $url); // interdire les url inline avec des pseudo-protocoles : if (preg_match(",data:,i", $url) and preg_match("/base64\\s*,/i", $url) or preg_match(",(javascript|mailto):,i", $url)) { $url = "./"; } // Il n'y a que sous Apache que setcookie puis redirection fonctionne include_spip('inc/cookie'); if (!$equiv and !spip_cookie_envoye() or (strncmp("Apache", $_SERVER['SERVER_SOFTWARE'], 6) == 0 or defined('_SERVER_APACHE'))) { @header("Location: " . $url); $equiv = ""; } else { @header("Refresh: 0; url=" . $url); if (isset($GLOBALS['meta']['charset'])) { @header("Content-Type: text/html; charset=" . $GLOBALS['meta']['charset']); } $equiv = "<meta http-equiv='Refresh' content='0; url={$url}'>"; } include_spip('inc/lang'); if ($status != 302) { http_status($status); } echo '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">', "\n", html_lang_attributes(), ' <head>', $equiv, ' <title>HTTP ' . $status . '</title> ' . (isset($GLOBALS['meta']['charset']) ? '<meta http-equiv="Content-Type" content="text/html;charset=' . $GLOBALS['meta']['charset'] . '">' : '') . ' </head> <body> <h1>HTTP ' . $status . '</h1> <a href="', quote_amp($url), '">', _T('navigateur_pas_redirige'), '</a></body></html>'; spip_log("redirige {$status}: {$url}"); exit; }
/** * http://doc.spip.org/@install_debut_html * * @param string $titre * @param string $onLoad * @param bool $all_inline * inliner les css et js dans la page (limiter le nombre de hits) * @return string */ function install_debut_html($titre = 'AUTO', $onLoad = '', $all_inline = false) { global $spip_lang_right, $spip_lang_left; utiliser_langue_visiteur(); http_no_cache(); if ($titre == 'AUTO') { $titre = _T('info_installation_systeme_publication'); } # le charset est en utf-8, pour recuperer le nom comme il faut # lors de l'installation if (!headers_sent()) { header('Content-Type: text/html; charset=utf-8'); } $css = ""; $files = array('reset.css', 'clear.css', 'minipres.css'); if ($all_inline) { // inliner les CSS (optimisation de la page minipres qui passe en un seul hit a la demande) foreach ($files as $name) { $file = direction_css(find_in_theme($name)); if (function_exists("compacte")) { $file = compacte($file); } else { $file = url_absolue_css($file); } // precaution lire_fichier($file, $c); $css .= $c; } $css = "<style type='text/css'>" . $css . "</style>"; } else { foreach ($files as $name) { $file = direction_css(find_in_theme($name)); $css .= "<link rel='stylesheet' href='{$file}' type='text/css' />\n"; } } // au cas ou minipres() est appele avant spip_initialisation_suite() if (!defined('_DOCTYPE_ECRIRE')) { define('_DOCTYPE_ECRIRE', ''); } return _DOCTYPE_ECRIRE . html_lang_attributes() . "<head>\n" . "<title>" . textebrut($titre) . "</title>\n" . "<meta name='viewport' content='width=device-width' />\n" . $css . "</head>\n<body" . $onLoad . " class='minipres'>\n\t<div id='minipres'>\n\t<h1>" . $titre . "</h1>\n\t<div>\n"; }
function init_entete($titre='', $id_rubrique=0) { include_spip('inc/gadgets'); if (!$nom_site_spip = textebrut(typo($GLOBALS['meta']["nom_site"]))) $nom_site_spip= _T('info_mon_site_spip'); $head = "<title>[" . $nom_site_spip . "] " . textebrut(typo($titre)) . "</title>\n" . "<meta http-equiv='Content-Type' content='text/html" . (($c = $GLOBALS['meta']['charset']) ? "; charset=$c" : '') . "' />\n" . envoi_link($nom_site_spip); // anciennement verifForm $head .= ' <script type="text/javascript"><!-- $(document).ready(function(){ verifForm(); $("#page") .mouseover(function(){ changestyle("garder-recherche"); }); ' . repercuter_gadgets($id_rubrique) .' }); // --></script> '; return _DOCTYPE_ECRIRE . html_lang_attributes() . "<head>\n" . pipeline('header_prive', $head) . "</head>\n"; }
function debusquer_entete($titre, $corps) { global $debug_objets; include_spip('balise/formulaire_admin'); include_spip('public/assembler'); // pour inclure_balise_dynamique include_spip('inc/texte'); // pour corriger_typo return _DOCTYPE_ECRIRE . html_lang_attributes() . "<head>\n<title>" . ('SPIP ' . $GLOBALS['spip_version_affichee'] . ' ' . _T('admin_debug') . ' ' . $titre . ' (' . supprimer_tags(corriger_typo($GLOBALS['meta']['nom_site']))) . ")</title>\n" . "<meta http-equiv='Content-Type' content='text/html" . (($c = $GLOBALS['meta']['charset']) ? "; charset={$c}" : '') . "' />\n" . http_script('', 'jquery.js') . "<link rel='stylesheet' href='" . url_absolue(find_in_path('spip_admin.css')) . "' type='text/css' />" . "</head>\n" . "<body style='margin:0 10px;'>\n" . "<div id='spip-debug-header'>" . $corps . inclure_balise_dynamique(balise_FORMULAIRE_ADMIN_dyn('spip-admin-float', $debug_objets), false) . '</div></body></html>'; }
function exec_brouteur_frame_dist() { global $connect_id_auteur, $spip_ecran, $spip_lang_left; $id_rubrique = is_numeric(_request('rubrique')) ? intval(_request('rubrique')) : ""; $frame = _request('frame'); $effacer_suivant = _request('effacer_suivant'); $special = _request('special'); $peutpub = autoriser('publierdans','rubrique'); include_spip('inc/headers'); http_no_cache(); $profile = _request('var_profile') ? "&var_profile=1" : ''; echo _DOCTYPE_ECRIRE . html_lang_attributes() . pipeline('header_prive', "<head>\n" . "<title>brouteur_frame</title>\n" . "<meta http-equiv='Content-Type' content='text/html" . (($c = $GLOBALS['meta']['charset']) ? "; charset=$c" : '') . "' />\n" . envoi_link(_T('info_mon_site_spip')) . http_script('jQuery(function(){ jQuery("a.iframe").click(function(){ window.open(this.href,"iframe"+this.rel); return false; }); });') . "</head>\n") ."<body>"; if ($spip_ecran == "large") { $nb_col = 4; } else { $nb_col = 3; } if ($effacer_suivant == "oui" && $frame < $nb_col) { $res = ''; for ($i = $frame+1; $i < $nb_col; $i++) { $res .= "\nparent.iframe$i.location.href='" . generer_url_ecrire('brouteur_frame',"frame=$i$profile") . "'"; } echo http_script($res); } echo "\n<div class='arial2'>"; if ($special == "redac") { $result=sql_select("articles.id_article, articles.id_rubrique, articles.titre, articles.statut", "spip_articles AS articles LEFT JOIN spip_auteurs_articles AS lien ON articles.id_article=lien.id_article", "articles.statut = 'prepa' AND lien.id_auteur = $connect_id_auteur ", " id_article ", " articles.date DESC"); $res = ''; while($row=sql_fetch($result)){ $id_article=$row['id_article']; if (autoriser('voir','article',$id_article)){ $titre = typo($row['titre']); $statut = $row['statut']; $h = generer_url_ecrire('articles',"id_article=$id_article"); $res .= "<a class='$statut'\nhref='javascript:window.parent.location=\"$h\"'>$titre</a>"; } } if ($res) { echo "\n<div style='padding-top: 6px; padding-bottom: 3px;'><b class='verdana2'>"._T("info_cours_edition")."</b></div>"; echo "\n<div class='plan-articles'>", $res, "</div>"; } } else if ($special == "valider") { $result=sql_select("id_article, id_rubrique, titre, statut", "spip_articles", "statut = 'prop'", "", "date DESC"); $res = ''; while($row=sql_fetch($result)){ $id_article=$row['id_article']; if (autoriser('voir','article',$id_article)){ $titre = typo($row['titre']); $statut = $row['statut']; $h = generer_url_ecrire('articles',"id_article=$id_article"); $res .= "<a class='$statut' href='javascript:window.parent.location=\"$h\"'>$titre</a>"; } } if ($res) { echo "\n<div style='padding-top: 6px; padding-bottom: 3px;'><b class='verdana2'>"._T("info_articles_proposes")."</b></div>"; echo "\n<div class='plan-articles'>", $res, "</div>"; } $result=sql_select("*", "spip_breves", "statut = 'prop'", "", "date_heure DESC", "20"); $res = ''; while($row=sql_fetch($result)){ $id_breve=$row['id_breve']; if (autoriser('voir','breve',$id_breve)){ $titre = typo($row['titre']); $statut = $row['statut']; $h = generer_url_ecrire('breves_voir',"id_breve=$id_breve"); $res .= "<a class='$statut' href='javascript:window.parent.location=\"$h\"'>$titre</a>"; } } if ($res) { echo "\n<div style='padding-top: 6px;'><b class='verdana2'>"._T("info_breves_valider")."</b></div>"; echo "\n<div class='plan-articles'>", $res, "</div>"; } } else { if ($id_rubrique !== "" AND autoriser('voir','rubrique',$id_rubrique)) { $row = sql_fetsel("id_rubrique, titre, id_parent", "spip_rubriques", "id_rubrique=$id_rubrique",'', '0+titre,titre'); if ($row){ $titre = typo($row['titre']); $id_parent=$row['id_parent']; if ($id_parent == 0) $icone = "secteur-24.gif"; else $icone = "rubrique-24.gif"; echo "\n<div style='background-color: #cccccc; border: 1px solid #444444;'>"; echo icone_horizontale($titre, "javascript:window.parent.location=\"" . generer_url_ecrire('naviguer',"id_rubrique=$id_rubrique") .'"', $icone, "", false); echo "</div>"; } else if ($frame == 0) { echo "\n<div style='background-color: #cccccc; border: 1px solid #444444;'>"; echo icone_horizontale(_T('info_racine_site'), "javascript:window.parent.location=\"" . generer_url_ecrire('naviguer') . '"', "racine-site-24.gif","", false); echo "</div>"; } $result = sql_select("id_rubrique, titre, id_parent", "spip_rubriques", "id_parent=$id_rubrique",'', '0+titre,titre'); while($row=sql_fetch($result)){ $ze_rubrique=$row['id_rubrique']; if (autoriser('voir','rubrique',$ze_rubrique)){ $titre = typo($row['titre']); $id_parent=$row['id_parent']; echo "\n<div class='brouteur_rubrique' onmouseover=\"changeclass(this, 'brouteur_rubrique_on');\" onmouseout=\"changeclass(this, 'brouteur_rubrique');\">"; if ($id_parent == '0') { echo "\n<div style='", frame_background_image("secteur-24.gif"), ";'><a href='", generer_url_ecrire('brouteur_frame', "rubrique=$ze_rubrique&frame=".($frame+1)."&effacer_suivant=oui$profile"), "' class='iframe' rel='", ($frame+1), "'>", $titre, "</a></div>"; } else { if ($frame+1 < $nb_col) echo "\n<div style='", frame_background_image("rubrique-24.gif"), ";'><a href='", generer_url_ecrire('brouteur_frame', "rubrique=$ze_rubrique&frame=".($frame+1)."&effacer_suivant=oui$profile"), "' class='iframe' rel='", ($frame+1), "'>$titre</a></div>"; else echo "\n<div style='", frame_background_image("rubrique-24.gif"), ";'><a href='javascript:window.parent.location=\"" . generer_url_ecrire('brouteur',"id_rubrique=$ze_rubrique$profile")."\"'>",$titre,"</a></div>"; } echo "</div>\n"; } } if ($id_rubrique > 0) { if ($peutpub) $result = sql_select("id_article, id_rubrique, titre, statut", "spip_articles", "id_rubrique=$id_rubrique", "", "date DESC"); else $result = sql_select("articles.id_article, articles.id_rubrique, articles.titre, articles.statut", "spip_articles AS articles, spip_auteurs_articles AS lien", "articles.id_rubrique=$id_rubrique AND (articles.statut = 'publie' OR articles.statut = 'prop' OR (articles.statut = 'prepa' AND articles.id_article = lien.id_article AND lien.id_auteur = $connect_id_auteur)) ", " id_article ", " articles.date DESC"); $res = ''; while($row=sql_fetch($result)){ $id_article=$row['id_article']; if (autoriser('voir','article',$id_article)){ $titre = typo($row['titre']); $statut = $row['statut']; $h = generer_url_ecrire('articles',"id_article=$id_article"); $res .= "<a class='$statut' href='javascript:window.parent.location=\"$h\"'>$titre</a>"; } } if ($res) { echo "\n<div style='padding-top: 6px; padding-bottom: 3px;'><b class='verdana2'>"._T('info_articles')."</b></div>"; echo "\n<div class='plan-articles'>", $res, "</div>"; } $result=sql_select("*", "spip_breves", "id_rubrique=$id_rubrique", "", "date_heure DESC", "20"); $res = ''; while($row=sql_fetch($result)){ $id_breve=$row['id_breve']; if (autoriser('voir','breve',$id_breve)){ $titre = typo($row['titre']); $statut = $row['statut']; $h = generer_url_ecrire('breves_voir',"id_breve=$id_breve"); $res .= "<a class='$statut' href='javascript:window.parent.location=\"$h\"'>$titre</a>"; } } if ($res) { echo "\n<div style='padding-top: 6px;'><b class='verdana2'>"._T('info_breves_02')."</b></div>"; echo "\n<div class='plan-articles'>", $res, "</div>"; } $result=sql_select("*", "spip_syndic", "id_rubrique=$id_rubrique AND statut!='refuse'", "", "nom_site"); $res = ''; while($row=sql_fetch($result)){ $id_syndic=$row['id_syndic']; if (autoriser('voir','site',$id_syndic)){ $titre = typo($row['nom_site']); $statut = $row['statut']; $h = generer_url_ecrire('sites',"id_syndic=$id_syndic"); $res .= "\n<div class='brouteur_icone_site'><b><a href='javascript:window.parent.location=\"$h\"'>$titre</a></b></div>"; } } if ($res) echo "\n<div style='padding-top: 6px;'><b class='verdana2'>"._T('icone_sites_references')."</b></div>", $res; } // en derniere colonne, afficher articles et breves if ($frame == 0 AND $id_rubrique==0) { $cpt = sql_fetsel('A.id_article', "spip_auteurs_articles AS A LEFT JOIN spip_articles AS L ON A.id_article = L.id_article", "L.statut = 'prepa' AND A.id_auteur=$connect_id_auteur", "A.id_article"); if ($cpt) { echo "\n<div class='brouteur_icone_article'><b class='verdana2'><a href='", generer_url_ecrire('brouteur_frame', "special=redac&frame=".($frame+1)."&effacer_suivant=oui$profile"), "' class='iframe' rel='",($frame+1),"'>", _T("info_cours_edition"),"</a></b></div>"; } $cpt = sql_countsel("spip_articles AS articles", "articles.statut = 'prop'"); if (!$cpt) $cpt = sql_countsel("spip_breves", "statut = 'prop'"); if ($cpt) echo "\n<div class='brouteur_icone_article'><b class='verdana2'><a href='", generer_url_ecrire('brouteur_frame', "special=valider&frame=".($frame+1)."&effacer_suivant=oui$profile"), "' class='iframe' rel='", ($frame+1)."'>", _T("info_articles_proposes"), " / "._T("info_breves_valider")."</a></b></div>"; } } } echo "</div>"; echo "</body></html>"; }
function aide_index_frame($var_lang_r, $lang_r, $frame, $aide, $help_server) { global $spip_lang; if ($var_lang_r) changer_langue($lang = $var_lang_r); if ($lang_r) # pour le cas ou on a fait appel au menu de changement de langue # (aide absente dans la langue x) changer_langue($lang = $lang_r); else $lang = $spip_lang; // L'aide correspondant a la langue demandee est dans un cache // reposant sur la date du fichier indiquant la version de SPIP // (approximatif, mais c'est deja qqch) $path = $spip_lang . "-aide.html"; $md5 = md5(serialize($help_server)); $fichier = _DIR_AIDE . substr($md5,0,16) . "-" . $path; $lastm = is_readable($fichier) ? filemtime($fichier) : 0; $lastversion = @filemtime(_DIR_RESTREINT . 'inc_version.php'); if (!($lastm AND ($lastm >= $lastversion))) { $contenu = help_fichier_contenu($spip_lang, $path, $help_server); // mettre en cache (tant pis si echec) sous_repertoire(_DIR_AIDE,'','',true); if ($contenu) ecrire_fichier ($fichier, $contenu); $lastm = time(); } $titre = _T('info_aide_en_ligne'); if (!$frame) { echo _DOCTYPE_AIDE, html_lang_attributes(); echo help_frame_frame($titre, $aide, $lang); echo "\n</html>"; } else { header("Content-Type: text/html; charset=utf-8"); if (!isset($contenu)) { lire_fichier($fichier, $contenu); } if (!$contenu) { include_spip('inc/minipres'); echo minipres(_T('forum_titre_erreur'), "<div><a href='" . $GLOBALS['home_server'] . "'>" . $help_server[0] . "</a> $aide : ". _T('aide_non_disponible'). "</div><br /><div align='right'>". menu_langues('var_lang_ecrire'). "</div>"); // Envoie le not-modified-since si possible, sinon envoie tout } elseif (!help_lastmodified($lastm)) { echo _DOCTYPE_AIDE, html_lang_attributes(); if ($frame === 'menu') { $contenu = help_menu_rubrique($aide, $contenu); echo help_frame_menu($titre, $contenu, $lang); } else { if ($aide) { $contenu = help_section($aide, $contenu); if (!$contenu) spip_log("aide inconnue $aide dans " . substr($contenu, 0, 150)); } echo help_frame_body($titre, $aide, $contenu, $lang); } echo "\n</html>"; } } }