<?php if(!defined('PARENT')) { exit; } ?>
<!DOCTYPE html>
<html lang="<?php echo $msw_html_lang; ?>" dir="<?php echo $msw_html_dir; ?>">

  <head>

    <meta charset="<?php echo $msw_html_charset; ?>">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="x-header-csrf" content="<?php echo $SSN->get('csrf_token'); ?>">

    <link rel="stylesheet" href="content/css/normalize.css" type="text/css">
    <link rel="stylesheet" href="content/css/animate.css" type="text/css">
    <link rel="stylesheet" href="content/css/bootstrap.css" type="text/css">
    <link rel="stylesheet" href="content/css/font-awesome/font-awesome.css" type="text/css">
    <link rel="stylesheet" href="content/css/theme.css" type="text/css">
    <?php
    if (in_array('jq-ui', $fjs)) {
    ?>
    <link rel="stylesheet" href="content/css/jquery-ui.css" type="text/css">
    <?php
    }
    if (in_array('chartist', $fjs)) {
    ?>
    <link rel="stylesheet" href="content/css/chartist.css" type="text/css">
    <?php
    }
    if (in_array('datepicker', $fjs)) {
    ?>
    <link rel="stylesheet" href="content/css/datepicker.css" type="text/css">
    <?php
    }
    if (in_array('wysiwyg', $fjs)) {
    ?>
    <link rel="stylesheet" href="content/css/trumbowyg.css" type="text/css">
    <?php
    }
    ?>
    <link rel="stylesheet" href="content/css/plugins.css" type="text/css">
    <link rel="stylesheet" href="content/css/mobile.css" type="text/css">
    <title><?php echo ($pagePrefix? mswSH($pagePrefix) . ': ' : '') . $pageTitle; ?> - <?php echo mswSH($SETTINGS->website); ?></title>
    <link rel="icon" href="content/images/favicon.ico">

  </head>

  <body>

    <?php
    // MOBILE HEADER
    // Shows only on extra small screens
    ?>
    <div class="mobiletopbar visible-xs push">
      <div>
       <i class="fa fa-bars fa-fw menu-btn"></i>
      </div>
      <div class="website">
        <a href="index.php"><?php echo $msw_adm_header; ?></a>
      </div>
      <div>
       <div class="btn-group">
          <button type="button" class="btn btn-sm btn-info dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
            <i class="fa fa-chevron-down fa-fw"></i>
          </button>
          <ul class="dropdown-menu dropdown-menu-right">
            <?php
            // Show purchase link?
            if (defined('LICENCE_VER') && LICENCE_VER == 'unlocked' && !defined('LIC_DEV')) {
              unset($mswHeaderLinks['h1']);
            }
            // Show help link?
            if (!ENABLE_HELP_LINK) {
              unset($mswHeaderLinks['h3']);
            }
            if (!empty($mswHeaderLinks)) {
              foreach($mswHeaderLinks AS $k => $v) {
              ?>
              <li><a href="<?php echo str_replace('{cmd}', mswHelp($cmd), $v['link']); ?>"<?php echo (isset($v['onclick']) && $v['onclick'] ? ' onclick="' . $v['onclick'] . '"' : ''); ?>><i class="fa <?php echo $v['icon']; ?> fa-fw"></i> <?php echo $v['text']; ?></a></li>
              <?php
              }
            }
            ?>
          </ul>
        </div>
      </div>
    </div>
    
    <?php
    // STANDARD HEADER
    // Shows on larger screens
    ?>
    <div class="navbar push hidden-xs">
      <div class="navbar-inner">
        <div class="container">
          <div class="pull-right">
            <?php
            if (!empty($mswHeaderLinks)) {
              foreach($mswHeaderLinks AS $k => $v) {
              ?>
              <a href="<?php echo str_replace('{cmd}', mswHelp($cmd), $v['link']); ?>"<?php echo (isset($v['onclick']) && $v['onclick'] ? ' onclick="' . $v['onclick'] . '"' : ''); ?>><i class="fa <?php echo $v['icon']; ?> fa-fw"></i> <?php echo $v['text']; ?></a>
              <?php
              }
            }
            ?>
          </div>
          <i class="fa fa-bars fa-fw menu-btn"></i> <span><a href="index.php"><?php echo $msw_adm_header; ?></a></span>
        </div>
      </div>
    </div>

    <div class="container mainmswarea push" id="container">