@if (getUser())
    <a href="/users/{{ getUser('login') }}"><span class="icon"><img src="/themes/ndiz/img/man.png" alt=""></span>
    <span class="text">{{ getUser('login') }}</span> </a>

    @if (isAdmin())
        <a href="/admin"><span class="icon"><img src="/themes/ndiz/img/settings.png" alt="setting"></span><span class="text">Панель</span></a>
        @if (statsSpam() > 0)
            <a href="/admin/spam"><span class="icon"><img src="/themes/ndiz/img/abuse.png" alt="abuse"></span>
            <span class="text">Жалобы</span></a>
        @endif

        @if (getUser('newchat') < statsNewChat())
            <a href="/admin/chats"><span class="icon"><img src="/themes/ndiz/img/admchat.png" alt="admchat"></span><span class="text">Чат</span></a>
        @endif
    @endif
        <a href="/menu"><span class="icon"><img src="/themes/ndiz/img/main.png" alt="main"></span><span class="text">Меню</span></a>
        <a href="/logout" onclick="return logout(this)"><span class="icon"><img src="/themes/ndiz/img/exit.png" alt="exit"></span><span class="text">Выход</span></a>
@else
    <a class="reg" href="/login<?= returnUrl() ?>" rel="nofollow">Авторизация</a>
    <a class="reg" href="/register" rel="nofollow">Регистрация</a>
@endif
