X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/f74276ad4a38479c8a5f7ccf065ab576cf2d192d..328e964708c7e9dc479a25f9358b2d03e9d7f66c:/nieuws.inc.php diff --git a/nieuws.inc.php b/nieuws.inc.php index ca16b4a..7e723e4 100644 --- a/nieuws.inc.php +++ b/nieuws.inc.php @@ -32,7 +32,8 @@ function shownewsarticle($url, $link = TRUE, $title = NULL) function shownews($root, $limit = 5) { - foreach (array_reverse(glob("$root/*/*.html")) as $url) { + if (strpos($root, '/') === FALSE) $root .= '/*'; + foreach (array_reverse(glob("$root/*.html")) as $url) { print "
"; ob_start(); include $url; @@ -42,3 +43,16 @@ function shownews($root, $limit = 5) if (--$limit <= 0) break; } } + +function printtoc($root) +{ + print '\n"; +}