<?

  if ( $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest' ) {
    define( 'ROOT_DIR', $_SERVER['DOCUMENT_ROOT'] );
    session_start();
    header( 'Content-type: text/html; charset=windows-1251' );
    include_once ROOT_DIR . '/engine/config.php';
  } else {
    if ( !defined( 'MISOFT' ) ) { exit(); }
  }

 if ( isset( $_SESSION['iduser'] ) ) { 
   #Подключаем меню аккаунта для мобильных устройств
   include_once ROOT_DIR . '/modules/profiles/mobile_menu.php'; 
 
 } else { ?>
    <div class="collapse navbar-toggleable-xs" style="height: 5px;"></div>
	<div class="pos-f-t" style="margin-bottom: 100px;">
	  <nav class="navbar navbar-light navbar-static-top bg-faded" >
		<div class="container" >
		  <div class="collapse navbar-toggleable-xs" id="exCollapsingNavbar1">
			<div style="margin-left: 60px;">
			  <a class="navbar-brand" href="#" style="margin-top: 2px;"><?=$config_site['sitename']?></a>
			  <ul class="nav navbar-nav" style="font-size: 18px;">
				<li class="nav-item /*active*/">
				  <a class="nav-link" href="/home">Главная </a>
				</li>
				<li class="nav-item /*active*/">
				  <a class="nav-link" href="/news">Новости </a>
				</li>
				<li class="nav-item">
				  <a class="nav-link" href="/serfing">Заработок</a>
				</li>
				<li class="nav-item">
				  <a class="nav-link" href="/adddyn">Реклама</a>
				</li>
				<li class="nav-item">
				  <a class="nav-link" href="/forum">Форум</a>
				</li>
				<li class="nav-item">
				  <a class="nav-link" href="/payments">Выплаты</a>
				</li>
			  </ul>
			</div>
		  </div>
	      <div style="margin-top: -35px; float: left;">
			<div style="background: #fff; width: 43px; " class="">
			  <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#exCollapsingNavbar" aria-controls="exCollapsingNavbar" aria-expanded="false" aria-label="Toggle navigation">
				&#9776;
			  </button>
			</div>
			<div class="collapse" id="exCollapsingNavbar">
			  <div class="/*bg-inverse p-a-1*/" style="margin-top: 8px; width: 670px;">
				<span class="text-muted" >
				  <div style="margin-bottom: 8px;"><a href="/registration" ><button type="button" class="btn btn-primary btn-lg btn-block"><span style="font-size: 18px;" class="glyphicon glyphicon-plus"></span> Регистрация</button></a></div>
				  <div style="margin-bottom: 8px;"><a href="/login" ><button type="button" class="btn btn-secondary btn-lg btn-block"><span style="font-size: 17px;" class="glyphicon glyphicon-user"></span> Авторизация</button></a></div>
				</span>
			  </div>
			</div>
		  </div>
		</div>
	  </nav>
    </div>
  <? 
  } 
?>	