<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<set currPort = "{{((empty(@PORT)) || (@PORT == 80) || (@PORT == 443)) ? '' : ':'.@PORT}}" />
	<base href="{{@SCHEME.'://'.@HOST.@currPort.@BASE.'/'}}"/>
	<title>{{ @title }} | mySimpleAds</title>

	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">

	<link href="{{ IncludeAsset('assets/img/favicon.ico') }}" rel="icon" type="image/x-icon" />

	<link rel="stylesheet" href="{{ IncludeAsset('assets/lib/bootstrap/css/bootstrap.min.css') }}">
	<link rel="stylesheet" href="{{ IncludeAsset('assets/lib/Font-Awesome/css/font-awesome.min.css') }}">

	<link rel="stylesheet" href="{{ IncludeAsset('assets/css/main.min.css') }}">
	<link rel="stylesheet" href="{{ IncludeAsset('assets/css/theme.css') }}">
	<link rel="stylesheet" href="{{ IncludeAsset('assets/css/theme-'.@THEME.'.css') }}">

	<script src="{{ IncludeAsset('assets/lib/jquery.min.js') }}"></script>

	<!--[if lt IE 9]>
	<script src="{{ IncludeAsset('assets/lib/html5shiv/html5shiv.js') }}"></script>
	<script src="{{ IncludeAsset('assets/lib/respond/respond.min.js') }}"></script>
	<![endif]-->

	<!--Modernizr-->
	<script src="{{ IncludeAsset('assets/lib/modernizr.custom.70287.js') }}"></script>
</head>
<body>
<div id="wrap">
	<div id="top">

		<!-- .navbar -->
		<nav class="navbar navbar-inverse navbar-fixed-top">

			<!-- Brand and toggle get grouped for better mobile display -->
			<header class="navbar-header">
				<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
					<span class="sr-only">Toggle navigation</span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
				</button>
				<a href="index.php" class="navbar-brand">
					<img src="{{ @LOGO_URL }}" alt="mySimpleAds">
				</a>
			</header>
			<div class="topnav">

				<div class="btn-toolbar">

					<div class="btn-group">
						<a class="btn btn-primary btn-sm" href="index.php?profile" title="{{ @lang_user_profile }}"><i class="fa fa-user"></i>
						</a>
					</div>
					<div class="btn-group">
						<check if ="{{ @USER->role > 8 }}">
							<a class="btn btn-primary btn-sm" href="index.php?config" title="{{ @lang_configuration }}">
								<i class="fa fa-cogs"></i>
							</a>
						</check>
						<a class="btn btn-primary btn-sm" href="http://www.clippersoft.net/docs/" title="{{ @lang_help }}" target="_blank">
							<i class="fa fa-question"></i>
						</a>
						<a href="index.php?logout" class="btn btn-primary btn-sm" title="{{ @lang_logout }}">
							<i class="fa fa-power-off"></i>
						</a>
					</div>

				</div>
			</div><!-- /.topnav -->
			<div class="collapse navbar-collapse navbar-ex1-collapse">

				<!-- .nav -->
				<ul class="nav navbar-nav">
					<check if ="{{ @USER->role > 7 }}">
						<li class='<check if="{{ @active=='dashboard' }}">active</check>'>
					<a href="index.php">{{ @lang_dashboard }}</a>
					</li>
					</check>
					<li class='<check if="{{ @active=='ads' }}">active</check> dropdown '>
					<a href="#" class="dropdown-toggle" data-toggle="dropdown">
						{{ @lang_ads }}
						<b class="caret"></b>
					</a>
					<ul class="dropdown-menu">
						<li> <a href="index.php?ads&list">{{ @lang_list }}</a> </li>
						<check if ="{{ @USER->role > 7 }}"><li> <a href="index.php?ads&create">{{ @lang_create }}</a> </li></check>
					</ul>
					</li>

					<check if ="{{ @USER->role > 7 }}">
						<li class='<check if="{{ @active=='groups' }}">active</check> dropdown '>
					<a href="#" class="dropdown-toggle" data-toggle="dropdown">
						{{ @lang_ad_groups }}
						<b class="caret"></b>
					</a>
					<ul class="dropdown-menu">
						<li> <a href="index.php?groups&list">{{ @lang_list }}</a> </li>
						<li> <a href="index.php?groups&create">{{ @lang_create }}</a> </li>
					</ul>
					</li>
					<li class='<check if="{{ @active=='sales' }}">active</check> dropdown '>
					<a href="#" class="dropdown-toggle" data-toggle="dropdown">
						{{ @lang_sales_spots }}
						<b class="caret"></b>
					</a>
					<ul class="dropdown-menu">
						<li> <a href="index.php?sales&list">{{ @lang_list }}</a> </li>
						<li> <a href="index.php?sales&create">{{ @lang_create }}</a> </li>
					</ul>
					</li>
					</check>
					<check if ="{{ @USER->role > 8 }}">
						<li class='<check if="{{ @active=='users' }}">active</check> dropdown '>
					<a href="#" class="dropdown-toggle" data-toggle="dropdown">
						{{ @lang_users }}
						<b class="caret"></b>
					</a>
					<ul class="dropdown-menu">
						<li> <a href="index.php?users&list">{{ @lang_list }}</a> </li>
						<li> <a href="index.php?users&create">{{ @lang_create }}</a> </li>
					</ul>
					</li>
					</check>

					<li class='<check if="{{ @active=='stats' }}">active</check>'>
					<a href="index.php?stats">{{ @lang_stats }}</a>
					</li>

				</ul><!-- /.nav -->
			</div>
		</nav><!-- /.navbar -->

		<!-- header.head -->
		<header class="head">
			<div class="search-bar">
			</div>

			<!-- ."main-bar -->
			<div class="main-bar">
			</div><!-- /.main-bar -->
		</header>

		<!-- end header.head -->
	</div><!-- /#top -->

	<div id="content">
		<div class="outer">
			<div class="inner">

				<repeat group="{{ \FlashMessage::instance()->getMessages() }}" value="{{ @msg }}">
					<div class="login-alert alert alert-{{ @msg.status }} alert-dismissable">
						<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
						{{ @msg.text }}
					</div>
				</repeat>

				<include href="{{ @inc }}"></include>

			</div>

			<!-- end .inner -->
		</div>

		<!-- end .outer -->
	</div>
	<!-- end #content -->
</div><!-- /#wrap -->

<div id="footer">
	<p>&copy; <a href="http://www.clippersoft.net/?utm_source=mysimpleads_admin&utm_medium=mysimpleads&utm_campaign=mysimpleads">mySimpleAds Ad Server</a> v{{ @VERSION }} <check if="{{ @DEMO==1 }}">DEMO MODE</check> </p>
</div>

<script src="{{ IncludeAsset('assets/lib/bootstrap/js/bootstrap.min.js') }}"></script>
<script src="{{ IncludeAsset('assets/lib/jquery-validation/dist/jquery.validate.min.js') }}"></script>
<script src="{{ IncludeAsset('assets/lib/jquery-validation/dist/additional-methods.min.js') }}"></script>

<check if="{{ @inc_bottom }}">
	<include href="{{ @inc_bottom }}" ></include>
</check>
</body>
</html>
