Esempio n. 1
0
function drawNavButton($name, $text = "")
{
    if ($text == "") {
        $text = format_page_name($name);
    }
    if ($name == activeButton()) {
        echo "<a href=\"index.php?p={$name}\" class=\"active\">{$text}</a>";
    } else {
        echo "<a href=\"index.php?p={$name}\">{$text}</a>";
    }
}
Esempio n. 2
0
function drawNavButton($name, $text = "", $url = "", $class = "")
{
    global $CurrentPageName;
    if ($text == "") {
        $text = format_page_name($name);
    }
    if ($url == "") {
        $url = "index.php?p={$name}";
    }
    if ($name == activeButton()) {
        $class = "active";
    }
    if (isSiteOffline()) {
        echo "<a>{$text}</a>";
    } elseif ($class != "") {
        echo "<a href=\"{$url}\" class=\"{$class}\">{$text}</a>";
    } else {
        echo "<a href=\"{$url}\">{$text}</a>";
    }
}