Ejemplo n.º 1
0
function drawHelpAnnotation($content, $help, $label = '?')
{
    $help = drawHelp($help, $label);
    return "<span class='help_annotation'>{$content}{$help}</span>";
}
Ejemplo n.º 2
0
    $url = $_SERVER["SCRIPT_NAME"] . "?" . queryString(queryConstruct(array('view' => $view)));
    $cls = 'menu_non_current';
    if ($_GET["view"] == $view) {
        $cls = 'menu_current';
    }
    return "<a class='menu {$cls}' href='{$url}'>{$title}</a>";
}
$menu = array();
if (in_array('view', $_SESSION['privs'])) {
    $menu[] = drawSelectView('categories', T_('Referendums'));
}
if (in_array('view', $_SESSION['privs'])) {
    $menu[] = drawSelectView('searchreferendumsglobal', T_('Search'));
}
if (isset($_SESSION['user'])) {
    $menu[] = drawSelectView('user', T_('My settings'));
}
if (in_array('usermanagement', $_SESSION['privs'])) {
    $menu[] = drawSelectView('users', T_('Account management'));
}
if (in_array('register', $_SESSION['privs'])) {
    $menu[] = drawSelectView('register', T_('Register'));
}
if (isset($_SESSION['user'])) {
    $menu[] = drawSelectView('logout', T_('Log out'));
}
if (!isset($_SESSION['user'])) {
    $menu[] = drawSelectView('login', T_('Log in'));
}
$menu[] = drawHelp('help', T_("Help"));
echo implode(' ', $menu);