{% if (global.flags.isLogged) %}
<div class="login-block-hidden">
	<div class="left-block2">
		<div class="ava-cab">
			<div class="ava-cab-hidden">
				<img src="{{ avatar_url }}" alt="{{ global.user.name }}" />
			</div>
		</div>
		<div class="login-cab">{{ global.user.name }}</div>
		<div style="clear: both; height: 15px;"></div>
		<div class="left-block-content">
			<div class="l-link">
				{% if isPerm() %}<a href="{{ admin_url }}" target="_blank" class="admin-link"><img src="{{ tpl_url }}/images/img1.png" alt="img">Админцентр</a>{% endif %}
				{% if pluginIsActive('uprofile') %}<a href="{{ profile_link }}" class="profile-link"><img src="{{ tpl_url }}/images/img2.png" alt="img">Профиль</a>{% endif %}
				{% if pluginIsActive('pm') %}<a href="{{ p.pm.link }}" class="pm-link"><img src="{{ tpl_url }}/images/img3.png" alt="img">Сообщения ({{ p.pm.new }} | {{ p.pm.total }})</a>{% endif %}
				<a href="{{ logout_link }}" class="lu-link"><img src="{{ tpl_url }}/images/exit.png" alt="exit"></a>
				<div style="clear: both;"></div>
			</div>
		</div>
		<div class="left-block-bottom"></div>
	</div>
	<div class="close"></div>
</div>
{% else %}
<script language="javascript">
	var set_login = 0;
	var set_pass  = 0;
</script>
<div class="login-block-hidden">
	<div class="left-block">
		<div class="left-block-content">
			<form name="login" method="post" action="{{ form_action }}" id="login" style="margin: 0; padding: 0;position: relative;">
				<div class="login-line">
					<input name="username" type="text" class="login-input-text" title="Ваше имя на сайте" />
				</div>
				<div class="login-line">
					<input name="password" type="password" class="login-input-text" title="Ваш пароль" />
				</div>
				<div style="clear: both;"></div>
				<input type="image" class="enter" src="{{ tpl_url }}/images/enter.png" value="вход" /><input type="hidden" name="redirect" value="{{ redirect }}" />
				<div class="reg-link">
					<a href="{{ lost_link }}" title="регистрация на сайте">Забыли пароль?</a>
					<a href="{{ reg_link }}" title="регистрация на сайте">Регистрация</a>
				</div>
			</form>
		</div>
		<div class="left-block-bottom"></div>
	</div>
	<div class="close"></div>
</div>
{% endif %}
