<? 
	$pageTitle 	= 'Панель управления';
	//define('ROOT', $_SERVER['DOCUMENT_ROOT']);
	include_once(ROOT . '/templates/header.php'); 
	
if ($auth->isAuth() and $auth->getGroup() == 'admin') {
	include_once(ROOT . '/templates/main-menu.php');
?>
<div class="container<? echo $designView; ?>">
	<div class="row">
		<div class="col-lg-12">
			<h1><? echo $pageTitle; ?></h1>
			<ul class="nav nav-tabs" id="admin-tabs">
				<li class="active"><a data-toggle="tab" href="#info"><i class="fa fa-fw fa-info-circle" aria-hidden="true"></i><span class="hidden-sm"> <?=Dict::_('INFO')?></span></a></li>
				<? if($nCRMsn != '') { ?>
					<li><a data-toggle="tab" href="#actions"><i class="fa fa-fw fa-clock-o" aria-hidden="true"></i><span class="hidden-sm"> <?=Dict::_('SESSIONS')?></span></a></li>
					<li><a data-toggle="tab" href="#backups"><i class="fa fa-fw fa-server" aria-hidden="true"></i><span class="hidden-sm"> <?=Dict::_('DATABASES')?></span></a></li>
				<? } ?>
				<li><a data-toggle="tab" href="#settings"><i class="fa fa-fw fa-sliders" aria-hidden="true"></i><span class="hidden-sm"> <?=Dict::_('SETTINGS')?></span></a></li>
				<li style="float:right;"><a data-toggle="tab" href="#update"><i class="fa fa-fw fa-arrow-circle-up" aria-hidden="true"></i><span class="hidden-sm"> <?=Dict::_('UPDATE')?></span></a></li>
				<li style="float:right;"><a data-toggle="tab" href="#support"><i class="fa fa-fw fa-comments" aria-hidden="true"></i><span class="hidden-sm"> <?=Dict::_('SUPPORT')?></span></a></li>
			</ul>

			<div class="tab-content">
				<div id="info" class="tab-pane fade in active">
					<? include_once(ROOT . '/admin/block_information.php'); ?>
				</div>
				<div id="actions" class="tab-pane fade">
					<h3><?=Dict::_('TTLSESSIONLIST')?></h3>
					<? include_once(ROOT . '/admin/block_actions.php'); ?>
				</div>
				<div id="backups" class="tab-pane fade">
					<h3><?=Dict::_('TTLCONTROLBASE')?></h3>
					<? include_once(ROOT . '/admin/block_backups.php'); ?>
				</div>
				<div id="settings" class="tab-pane fade">
					<? include_once(ROOT . '/admin/block_settings.php'); ?>
				</div>
				<div id="registration" class="tab-pane fade">
					<? include_once(ROOT . '/admin/block_registration.php'); ?>
				</div>
				<div id="update" class="tab-pane fade">
					<? include_once(ROOT . '/admin/block_update.php'); ?>
				</div>
				<div id="support" class="tab-pane fade">
					<? include_once(ROOT . '/admin/block_support.php'); ?>
				</div>
			</div>

		</div>
	</div>
</div>
<?
	include_once(ROOT . '/templates/modal-wind.php');
	include_once(ROOT . '/templates/footer.php');
} else {
	include_once(ROOT . 'modules/access-denied.php');
} 
?>
	</body>
</html>