コード例 #1
0
ファイル: lcm_help.php プロジェクト: nyimbi/legalcase
    $page_title = _T('title_software');
}
help_page_start($page_title, $code);
if ($code) {
    global $lcm_lang;
    $lang_site = read_meta('default_language');
    // Sometimes the help might not be translated in every
    // language. We will try first the language of the user,
    // then the default site language, then we fallback on English.
    $try_langs = array($lcm_lang, $lang_site, 'en');
    $ok = include_help($code, $try_langs);
    if (!$ok) {
        if ($error_section) {
            echo "<p>" . $code . ": " . _T('help_warning_no_section') . "</p>\n";
        } else {
            $toc = get_help_page_toc();
            if (isset($toc[$code])) {
                // [ML] TODO: Show chapter intro?
                echo "<ul>";
                foreach ($toc[$code] as $st) {
                    echo '<li><a href="lcm_help.php?code=' . $st . '">' . _T('help_title_' . $st) . "</a></li>\n";
                }
                echo "</ul>\n";
            } else {
                echo "<p>" . _T('help_warning_no_files') . "</p>\n";
            }
        }
    }
} else {
    // Show LCM logo
    echo '<div align="center">';
コード例 #2
0
ファイル: inc_presentation.php プロジェクト: nyimbi/legalcase
function help_page_start($page_title, $code = '')
{
    if (!($charset = read_meta('charset'))) {
        $charset = 'utf-8';
    }
    $toc = get_help_page_toc();
    echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>' . _T('help_title_help') . '</title>
<meta http-equiv="Content-Type" content="text/html; charset=' . $charset . '" />
<link rel="stylesheet" href="styles/lcm_help.css" type="text/css" />
<script type="text/javascript" language="JavaScript" src="inc/help_menu.js"></script>
</head>' . "\n";
    echo "<body>\n";
    echo '<h1>' . _T('help_title_help') . "</h1>\n";
    echo '<div id="hlp_big_box">' . "\n";
    echo '<div id="hlp_menu">' . "\n";
    echo '<ul id="nav">' . "\n";
    foreach ($toc as $topic => $subtopics) {
        echo '<li><a href="lcm_help.php?code=' . $topic . '">' . _T('help_title_' . $topic) . '</a>' . "\n";
        echo '<ul class="subnav">';
        foreach ($subtopics as $st) {
            echo '<li><a href="lcm_help.php?code=' . $st . '">' . _T('help_title_' . $st) . '</a></li>' . "\n";
        }
        echo "</ul>\n";
        echo "</li>\n";
    }
    echo "</ul>\n";
    // closes id="nav"
    echo "</div>\n";
    // closes id="hlp_menu"
    echo '<div id="hlp_cont">' . "\n";
    echo '<div class="hlp_data">' . "\n";
    foreach ($toc as $topic => $subtopics) {
        foreach ($subtopics as $key => $val) {
            if ($val == $code) {
                echo '<div id="breadcrumb">' . '<a href="lcm_help.php?code=' . $topic . '">' . _T('help_title_' . $topic) . '</a>' . "</div>\n";
            }
        }
    }
    echo '<h2>' . $page_title . "</h2>\n";
}