echo wiki_format($menu_sub); ?> <!-- S**t på import --> <?php } ?> <!-- Menyn importerad från: <?php echo $menu_url; ?> --> <h2><?php echo $lang == "sv" ? 'Meny' : 'Menu'; ?> </h2> <?php echo wiki_format($menu); ?> <!-- S**t på import --> </div> <div id="footer"> <p class="signed"> <a href="/webmaster">Webmasters</a> @ <a href="/">Stacken</a> </p> <p class="dated"><?php echo $last_mod; ?> </p> </div> </div> </body>
function wiki_dump($out_dir) { if ($handle = opendir($GLOBALS['dir']['pages'])) { while (false !== ($file = readdir($handle))) { if ($file != '.' && $file != '..') { $content = file_get_contents($GLOBALS['dir']['pages'] . $file); wiki_format($content); $content = preg_replace('/\\?page=([^"]*)/', '$1' . $GLOBALS['html_ext'], $content); $file = substr($file, 0, strlen($file) - strlen($GLOBALS['page_ext'])); file_put_contents($out_dir . '/' . $file . '.html', $content); } } closedir($handle); } }