<!DOCTYPE html>
<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
<!--[if IE 7 ]><html lang="en" class="no-js ie7"> <![endif]-->
<!--[if IE 8 ]><html lang="en" class="no-js ie8"> <![endif]-->
<!--[if IE 9 ]><html lang="en" class="no-js ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!-->
<html lang="en" class="no-js">
<!--<![endif]-->
<head>
<meta charset="UTF-8">
<title>{$_title|strip_tags|escape}</title>
<meta name="description" content="{$_description|escape}">
<meta name="keywords" content="{$_keywords|escape}"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="favicon.ico">
<link rel="apple-touch-icon" href="apple-touch-icon.png">
<link rel="icon" href="{$base}favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="{$base}favicon.ico" type="image/x-icon" />

{foreach $css as $item}
<link rel="stylesheet" type="text/css" href="{$item.path}" media="{$item.media}" />
{/foreach}
{foreach $feed_rss as $item}
<link href="{$item.path}" rel="alternate" type="application/rss+xml" title="{$item.name|escape}" />
{/foreach}
{foreach $js as $item}
<script type="text/javascript" src="{$item}"></script>
{/foreach}
</head>
<body>
<header id="top"><a id="logo" href="{url  href=getModulePath('admin')}"><span>Lab</span>CMS</a><a id="view-site" href="/">главная сайта</a>
	<div id="login-info"> Здравствуйте,<a href="{url href=getModulePath($core_config.auth_module) action="profile"}">{$_user->login|escape}</a> </div>
</header>
<nav id="topmenu">
	{$_module_menu_level}
	<ul class="user-menu">
		<li class="msg" style="{if !$pm.umess}display:none{/if}"><a href="{url href=$pm.path}"><img alt="" src="/skins/admin/images/new-msg.gif"><span id="pm_count">{$pm.umess}</span></a></li>
		<li><a href="{url href=getModulePath($core_config.auth_module) action="logout" token=1}">Выход</a></li>
	</ul>
</nav>

<script type="text/javascript">
	lc_version='{$core_config.version.current}.{$core_config.version.revision}';
	lc_branch='{$core_config.version.branch}';

	{if $pm.path}pm_status_url='{url href=$pm.path type="json"}';{/if}
	if (typeof(MooTools)=='object')
	{
		window.addEvent('domready', function(){
					if ('undefined'!=typeof(pm_status_url)) checkTimer=setInterval(function(){ updatePmInfo(); },10000);
				});
	}
	function updatePmInfo()
	{
		var myXhr = new Request.JSON({
				url:pm_status_url,
				method: 'post',
				onSuccess:function(result){
					if(!result.error)
						{
							$('pm_count').set('html', result.umess);
							$$('.user-menu .msg').setStyle('display', result.umess?'inline':'none');
						}
					}
				}).send('action=status');
	}

</script>

<section id="content">
	<section id="left">
		{*<aside class="search">
			<form action="{url href=getModulePath("search")}" id="search-form" method="get">
				<fieldset>
				<label for="search">Поиск:</label>
				<input id="search" type="text" name="search" value="">
				<input type="submit" value="Найти">
				<input type="hidden" name="all" value="all">
				</fieldset>
			</form>
		</aside>*}
		{if $system_message}
			<aside>
				<h3 class="info">{t}Информация{/t}</h3>
				{if $system_message.html}
					{$system_message.html}
				{else}
					{$system_message.text|escape}
				{/if}
			</aside>
		{/if}
		
		<aside id="new_version" style="display:none;">
			<h3 class="attention">Внимание!</h3>
			<p></p>
		</aside>
		{$_module_lc_guide}
	</section>
	<article>
		{$_module_breadcrumb}
		{if $errors}
		<section class="warning">
			<h3>{t}Ошибка!{/t}</h3>
				{foreach $errors as $error_msg}
					<p>{$error_msg}</p>
				{/foreach}
		</section>
		{/if}
		{$_component}
	</article>	
</section>
<footer>
<section id="f-left">
{$_module_menu_level}
	{if $_user->group_id==1}<p>{$stat}</p>{/if}
</section>
<section id="f-right">
<a id="logo-bottom" href="http://labcms.ru"><span>Lab</span>CMS</a> v.{$core_config.version.current}.{$core_config.version.revision}
<a id="gpl" href="http://opensource.org/licenses/gpl-license.php">GNU Public License</a></section>
</footer>
</body>
</html>
