2 require_once('library/markdown.php');
4 if (!function_exists('load_doc_file')) {
6 function load_doc_file($s) {
12 if (file_exists("$d/$lang/$b"))
13 return file_get_contents("$d/$lang/$b");
15 return file_get_contents($s);
21 function help_content(&$a) {
23 nav_set_selected('help');
30 $text = load_doc_file('doc/' . $a->argv[1] . '.md');
31 $a->page['title'] = t('Help:') . ' ' . str_replace('-', ' ', notags($a->argv[1]));
33 $home = load_doc_file('doc/Home.md');
36 $a->page['title'] = t('Help');
38 $a->page['aside'] = Markdown($home);
42 header($_SERVER["SERVER_PROTOCOL"] . ' 404 ' . t('Not Found'));
43 $tpl = get_markup_template("404.tpl");
44 return replace_macros($tpl, array(
45 '$message' => t('Page not found.')
49 $html = Markdown($text);
50 $html = "<style>.md_warning { padding: 1em; border: #ff0000 solid 2px; background-color: #f9a3a3; color: #ffffff;</style>".$html;