'; $out .= $pd->text($md); $out .= ""; } } $out .= getHTMLFooter(); $outfile = !empty($_POST['outfile'])?$_POST['outfile']:DEFAULT_FILE; file_put_contents($outfile, $out); header('Location: '.$outfile); } function showAdminPage() { $out = getHTMLHeader(TITLE) .'
'."\n" .'
'."\n" .' '."\n" .'
'."\n" .' '."\n" .'
'."\n" .'
'."\n" .' '."\n" .' '."\n" .' '."\n" .' '."\n"; foreach(glob(MD_DIR.'/*.md') as $file) { $base = basename($file, '.md'); $out.=' '."\n" .' ' .''."\n" .' '."\n"; } $out.=' '."\n" .'
'.$base.'Add
'."\n" .'
'."\n" .'
'."\n" .'
'."\n" .''."\n" .getHTMLFooter(); echo $out; } function getHTMLHeader($title = TITLE) { $out = ''."\n" .''."\n" .' '."\n" .' '.$title.''."\n" .' '."\n" .' '."\n" .' '."\n" .' '."\n"; return $out; } function getHTMLFooter() { $out = ' '."\n" .''."\n"; return $out; } ?>