{% if (global.flags.isLogged) %}
	<div class="modal-header">
		<div class="modal_title">Панель пользователя</div>
	</div>
	<div class="modal_body">
		<div class="modal_content">
			<div class="login_pane__info">
				<div class="avatar">
					{% if pluginIsActive('uprofile') %}<a href="{{ profile_link }}">{% endif %}
						<span class="cover" style="background-image: url({{ avatar_url }});"></span>
						<div class="u_name">{{ global.user.name }}</div>
					{% if pluginIsActive('uprofile') %}</a>{% endif %}
				</div> 
			</div>
			<ul class="login_pane__menu">
				{% if (global.flags.isLogged and (global.user['status'] <= 3)) %}<li><a href="{{ admin_url }}" target="_blank">Админпанель</a></li>{% endif %}
				{% if pluginIsActive('nsm') %}
					<li><a href="{{ p.nsm.link }}">{{ lang.add_news }}</a></li>
				{% endif %}
				{% if pluginIsActive('uprofile') %}
					<li><a href="{{ user_link }}"> {{ lang.myprofile }}</a></li>
					<li><a href="{{ profile_link }}"> {{ lang.edit_profile }}</a></li>
				{% endif %}
				{% if pluginIsActive('pm') %}
					<li><a href="{{ p.pm.link }}"> {{ lang.private_messages }} <span class="right grey"><b>{{ p.pm.pm_all }} / {{ p.pm.pm_unread }}</b></span></a></li>
				{% endif %}
				{% if pluginIsActive('bookmarks') %}
					<li><a href="{{ p.bookmarks.link }}"> Закладки <span class="right grey"><b>{{ p.bookmarks.count }}</b></span></a></li>
				{% endif %}
			</ul>
			<div class="login_pane__foot">
				<a class="btn btn_red" href="{{ logout_link }}">{{ lang.log_out }}</a>
			</div>
		</div>
	</div>
{% else %}
	<script language="javascript">
		var set_login = 0;
		var set_pass  = 0;
	</script>
	<div class="modal-header">
		<div class="modal_title">Форма входа</div>
	</div>
	<div class="modal_body">
		<div class="modal_content">
			<form name="login" method="post" action="{{ form_action }}" id="login">
				<div class="soc_links">
					<a href="#" target="_blank"><img src="{{ tpl_url }}/images/social/vk.png" /></a>
					<a href="#" target="_blank"><img src="{{ tpl_url }}/images/social/ok.png" /></a>
					<a href="#" target="_blank"><img src="{{ tpl_url }}/images/social/fb.png" /></a>
					<a href="#" target="_blank"><img src="{{ tpl_url }}/images/social/mail.png" /></a>
					<a href="#" target="_blank"><img src="{{ tpl_url }}/images/social/google.png" /></a>
					<a href="#" target="_blank"><img src="{{ tpl_url }}/images/social/yandex.png" /></a>
				</div>
				<ul class="login_form">
					<li>
						<label>{{ lang.username }}</label>
						<input type="text" name="username" placeholder="{{ lang.username }}">
					</li>
					<li class="login_input-btn">
						<label>{{ lang.password }}</label>
						<input type="password" name="password" placeholder="{{ lang.password }}">
					</li>
				</ul>
				<div class="btn_block">
					<button class="bg_blue" type="submit">{{ lang.login }}</button>
				</div>
				<input type="hidden" name="redirect" value="{{ redirect }}" />
				<div class="login_form__foot">
					<a class="right" href="{{ reg_link }}">{{ lang.registration }}</a>
					<a href="{{ lost_link }}">{{ lang.lostpassword }}</a>
				</div>
			</form>
		</div>
	</div>
{% endif %}