Пример #1
0
    /**
     * Returns the html that builds the user menu, and sets the active element,
     * based on the parameters. Contains a "log out" option.
     *
     * @global type $CONFIG  global configuration variable
     * @param string $active  string that defines the active element of the menu
     * @return type  html
     */
    public static function user_base_menu($active)
    {
        global $CONFIG;
        $activity = $report = $profile = null;
        ${$active} = 'class="active"';
        return '<ul class="nav">
			    <li ' . $activity . '><a href="' . $CONFIG->wwwroot . '/user/activity">' . Lang::get('activity') . '</a></li>
				<li ' . $report . '><a href="' . $CONFIG->wwwroot . '/user/report">' . Lang::get('report') . '</a></li>
	            <li ' . $profile . '><a href="' . $CONFIG->wwwroot . '/user/profile">' . Lang::get('profile') . '</a></li>
        	</ul>' . MenuHelper::get_logout_option();
    }