Exemple #1
0
function aide_menu($aide)
{
    $contenu = aide_contenu();
    preg_match_all(_SECTIONS_AIDE, $contenu, $sections, PREG_SET_ORDER);
    return $sections;
    global $spip_lang;
    $afficher = false;
    $ligne = $numrub = 0;
    $texte = $res = '';
    foreach ($sections as $section) {
        list(, $prof, $sujet, $bloc) = $section;
        if ($prof == '1') {
            if ($afficher && $texte) {
                $res .= block_parfois_visible("block{$numrub}", "<div class='rubrique'>{$titre}</div>", "\n{$texte}", '', $ouvrir);
            }
            $afficher = $bloc ? $bloc == 'redac' : true;
            $texte = '';
            if ($afficher) {
                $numrub++;
                $ouvrir = 0;
                $titre = $sujet;
            }
        } else {
            ++$ligne;
            $id = "ligne{$ligne}";
            if ($aide == $sujet) {
                $ouvrir = 1;
                $class = "article-actif";
                $texte .= http_script("curr_article = '{$id}';");
            } else {
                $class = "article-inactif";
            }
            $h = generer_url_aide("aide={$sujet}&frame=body&var_lang={$spip_lang}");
            $texte .= "<a class='{$class}' target='droite' id='{$id}' href='{$h}' onclick=\"activer_article('{$id}');return true;\">" . $bloc . "</a><br style='clear:both;' />\n";
        }
    }
    if ($afficher && $texte) {
        $res .= block_parfois_visible("block{$numrub}", "<div class='rubrique'>{$titre}</div>", "\n{$texte}", '', $ouvrir);
    }
    return $res;
}
Exemple #2
0
function help_frame_frame($titre, $aide, $lang)
{
	global $spip_lang_rtl;
	$menu = "<frame src='" . generer_url_aide("aide=$aide&var_lang=$lang&frame=menu") . "' name=\"gauche\" id=\"gauche\" scrolling=\"auto\" />\n";
	$body = "<frame src='" . generer_url_aide("aide=$aide&var_lang=$lang&frame=body") . "' name=\"droite\" id=\"droite\" scrolling=\"auto\" />\n";

	$seq = $spip_lang_rtl ? "$body$menu" : "$menu$body";
	$dim = $spip_lang_rtl ? '*,160' : '160,*';
	return "<head>\n<title>$titre</title>\n</head>\n<frameset cols='$dim' border='0' frameborder='0' framespacing='0'>$seq</frameset>";
}