Mercurial > hg > fapweb
diff index.php @ 887:e6a1410ce71d
Move function to index.php
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 26 Nov 2014 18:05:52 +0200 |
parents | 9a948144dcc9 |
children | ffacd904fd1f |
line wrap: on
line diff
--- a/index.php Wed Nov 26 17:48:28 2014 +0200 +++ b/index.php Wed Nov 26 18:05:52 2014 +0200 @@ -8,6 +8,17 @@ require_once "msite.inc.php"; require_once "msession.inc.php"; + +function stGetMainPageLink($id, $name, $show = TRUE) +{ + global $pageName; + if ($show) + return " <a class=\"".($id == $pageName ? "active" : "inactive")."\" href=\"".$id."\">".$name."</a>\n"; + else + return ""; +} + + // Get the name of the page if (!isset($pagePath)) $pagePath = "pages/"; if (!isset($pageExt)) $pageExt = ".inc.php";