<? global $user, $settings;?>
<!DOCTYPE html>
<html>
  <head>
    <title>shopPro</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="author" content="www.project-pro.pl - internetowe rozwiązania dla biznesu">
    <link rel='stylesheet' type="text/css" href='https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700'>
    <link rel="stylesheet" type="text/css" href="/libraries/framework/skin/default_skin/css/theme.css">
    <link rel="stylesheet" type="text/css" href="/libraries/framework/vendor/plugins/magnific/magnific-popup.css">
    <link rel="stylesheet" type="text/css" href="/libraries/framework/vendor/plugins/datepicker/css/bootstrap-datetimepicker.css">
    <link rel="stylesheet" type="text/css" href="/libraries/framework/vendor/jquery/jquery_ui/jquery-ui.structure.min.css">
    <link rel="stylesheet" type="text/css" href="/libraries/framework/vendor/jquery/jquery_ui/jquery-ui.theme.min.css">
    <link rel="stylesheet" type="text/css" href="/libraries/framework/vendor/plugins/daterange/daterangepicker.css">
    <link rel="stylesheet" type="text/css" href="/libraries/jquery-confirm/jquery-confirm.min.css">
    <link rel="stylesheet" type="text/css" href="/libraries/easy-tabs/css/easy-responsive-tabs.css">
    <link rel="stylesheet" type="text/css" href="/libraries/bootstrap-4.5.2-dist/css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="/libraries/font-awesome-4.7.0/css/font-awesome.css">
    <link rel="stylesheet" type="text/css" href="/libraries/grid/plugins/icheck/skins/square/blue.css">
    <script type="text/javascript" src="/libraries/framework/vendor/jquery/jquery-1.11.1.min.js"></script>
    <script type="text/javascript" src="/libraries/framework/vendor/jquery/jquery_ui/jquery-ui.min.js"></script>
    <script type="text/javascript" src="/libraries/framework/js/utility/utility.js"></script>
    <script type="text/javascript" src="/libraries/framework/vendor/plugins/magnific/jquery.magnific-popup.js"></script>
    <script type="text/javascript" src="/libraries/easy-tabs/js/easyResponsiveTabs.js"></script>
    <script type="text/javascript" src="/libraries/framework/vendor/plugins/moment/moment.js"></script>
    <script type="text/javascript" src="/libraries/framework/vendor/plugins/moment/pl.js"></script>
    <script type="text/javascript" src="/libraries/framework/vendor/plugins/datepicker/js/bootstrap-datetimepicker.js"></script>
    <script type="text/javascript" src="/libraries/framework/vendor/plugins/daterange/daterangepicker.js"></script>
    <script type="text/javascript" src="/libraries/jquery-confirm/jquery-confirm.min.js"></script>
    <script type="text/javascript" src="/libraries/bootstrap-4.5.2-dist/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="/libraries/bootstrap-4.5.2-dist/js/bootstrap.bundle.min.js"></script>
    <script type="text/javascript" src="/libraries/grid/plugins/icheck/icheck.js"></script>
    <script type="text/javascript" src="/libraries/functions.js"></script>
    <script type="text/javascript" src="/admin/js/functions.js"></script>
    <link rel="stylesheet" href="/admin/layout/style-css/style.css" />
  </head>
  <body>
    <div class="admin-page">
      <div class="menu">
        <div class="logo sticky-top">
          shop<b>Pro</b>
          <span>ver. <?= \S::get_version();?></span><br>
          <? if ( $settings[ 'update' ] and \S::get_new_version() > \S::get_version() ):?>
            <a href="/admin/update/main_view/" class="label label-danger">aktualizacja</a>
          <? endif;?>
        </div>
        <div class="menu-content">
          <ul>
            <li><a href="/admin/dashboard/main_view/"><img src="/admin/layout/icon/icon-menu/bxs-dashboard.svg">Pulpit</a></li>
          </ul>
          <div class="title">
            Sklep
          </div>
          <ul>
            <li> <a href="/admin/shop_order/view_list/"><img src="/admin/layout/icon/icon-menu/shopping-cart.svg">Zamówienia</a></li>
            <li> <a href="/admin/shop_clients/view_list/"><img src="/admin/layout/icon/icon-menu/people-fill.svg">Klienci</a></li>
            <li><a href="/admin/shop_category/view_list/"><img src="/admin/layout/icon/icon-menu/bxs-category-alt.svg">Kategorie</a></li>
            <li><a  href="/admin/shop_product/view_list/"><img src="/admin/layout/icon/icon-menu/shopping-basket.svg">Produkty</a></li>
            <li><a href="/admin/shop_product/mass_edit/"><i class="fa fa-bars"></i>Masowa edycja</a></li>
            <li>
              <a href="/admin/shop_producer/list/">
                <i class="fa fa-user"></i>Producenci
              </a>
            </li>
            <li>
              <a  href="/admin/shop_product_sets/view_list/">
                <i class="fa fa-bars"></i>Komplety Produktów
              </a>
            </li>
            <li><a href="/admin/shop_attribute/view_list/"><img src="/admin/layout/icon/icon-menu/star-filled.svg">Cechy produktów</a></li>
            <li><a href="/admin/shop_transport/view_list/"><img src="/admin/layout/icon/icon-menu/bus.svg">Rodzaje transportu</a></li>
            <li><a href="/admin/shop_payment_method/view_list/"><img src="/admin/layout/icon/icon-menu/coins-fill.svg">Metody płatności</a></li>
            <li>
              <a href="/admin/shop_statuses/view_list/"><i class="fa fa-bars"></i>Statusy zamówień</a>
            </li>
            <li><a href="/admin/shop_coupon/view_list/"><img src="/admin/layout/icon/icon-menu/piggy-bank-coins.svg">Kody rabatowe</a></li>
            <li><a href="/admin/shop_promotion/view_list/"><img src="/admin/layout/icon/icon-menu/burst-sale.svg">Promocje</a></li>
          </ul>
          <div class="title">Zawartość</div>
          <ul>
            <li><a href="/admin/pages/view_list/"><img src="/admin/layout/icon/icon-menu/menu(1).svg">Konfiguracja menu</a></li>
            <li><a href="/admin/articles/view_list/"><img src="/admin/layout/icon/icon-menu/note.svg">Artykuły</a></li>
            <li><a href="/admin/articles_archive/view_list/"><img src="/admin/layout/icon/icon-menu/baseline-sticky-note-2.svg">Archiwum artykułów</a></li>
            <li><a href="/admin/scontainers/view_list/"><img src="/admin/layout/icon/icon-menu/view-cols.svg">Zawartość statyczna</a></li>
          </ul>
          <div class="title">
            Newsletter
          </div>
          <ul>
            <li><a href="/admin/newsletter/prepare/"><img src="/admin/layout/icon/icon-menu/package(1).svg">Wysyłka - przygotowanie</a></li>
            <li><a href="/admin/newsletter/emails_list/"><img src="/admin/layout/icon/icon-menu/bx-at.svg">Baza emaili</a></li>
            <li><a href="/admin/newsletter/email_templates_user/"><img src="/admin/layout/icon/icon-menu/template(1).svg">Szablony użytkownika</a></li>
            <li><a href="/admin/newsletter/email_templates_admin/"><img src="/admin/layout/icon/icon-menu/template.svg">Szablony administracyjne</a></li>
            <li><a href="/admin/newsletter/settings/"><img src="/admin/layout/icon/icon-menu/baseline-settings.svg">Ustawienia</a></li>
          </ul>
          <div class="title">
            Pozostałe
          </div>
          <ul>
            <li><a href="/admin/filemanager/draw/"><img src="/admin/layout/icon/icon-menu/file-image-outlined.svg">Manadżer plików</a></li>
            <li><a  href="/admin/banners/view_list/"><img src="/admin/layout/icon/icon-menu/photo-video.svg">Banery</a></li>
          </ul>
          <div class="title">
            Konfiguracja
          </div>
          <ul>
            <li><a href="/admin/users/view_list/"><img src="/admin/layout/icon/icon-menu/people-fill.svg">Użytkownicy</a></li>
            <li><a href="/admin/languages/view_list/"><img src="/admin/layout/icon/icon-menu/letter-aa.svg">Jęzki</a></li>
            <li><a href="/admin/languages/translation_list/"><img src="/admin/layout/icon/icon-menu/language.svg">Tłumaczenia</a></li>
            <li><a href="/admin/settings/view/"><img src="/admin/layout/icon/icon-menu/baseline-settings.svg">Ustawienia</a></li>
            <li><a href="/admin/layouts/view_list/"><img src="/admin/layout/icon/icon-menu/calendar-settings.svg">Szablony</a></li>
          </ul>
          <div class="title">
            Słowniki
          </div>
          <ul>
            <li>
              <a href="/admin/dictionaries/view_list/">
                <i class="fa fa-puzzle-piece" aria-hidden="true"></i>Jednostki miary
              </a>
            </li>
          </ul>
          <div class="title">
            Archiwum
          </div>
          <ul>
            <li>
              <a href="/admin/archive/products_list/">
                <i class="fa fa-trash" aria-hidden="true"></i>Produkty
              </a>
            </li>
          </ul>
          <div class="title">
            Integracje
          </div>
          <ul>
            <li>
              <a href="/admin/integrations/sellasist_settings/">
                <i class="fa fa-cogs" aria-hidden="true"></i>sellasist.pl
              </a>
            </li>
            <li>
              <a href="/admin/integrations/apilo_settings/">
                <i class="fa fa-cogs" aria-hidden="true"></i>apilo.com
              </a>
            </li>
            <li>
              <a href="/admin/integrations/baselinker_settings/">
                <i class="fa fa-cogs" aria-hidden="true"></i>baselinker.com
              </a>
            </li>
            <li>
              <a href="/admin/integrations/shoppro_settings/">
                <i class="fa fa-cogs" aria-hidden="true"></i>shopPRO
              </a>
            </li>
          </ul>
        </div>
        <div class="preview">
          <a href="/" target="_blank"><img src="/admin/layout/icon/icon-menu/chevrons-right.svg">Podgląd</a>
        </div>
      </div>
      <div class="mobile-menu-btn" id="mobile-menu-btn">
        <i class="fa fa-bars"></i>
      </div>
      <div class="site-content">
        <div class="container-fluid">
          <div class="row">
            <div class="col-12 col-md-3 col-lg-2">
              <a href="/admin/settings/clear_cache/" class="btn btn-danger mt-3">Wyczyść cache</a>
            </div>
            <div class="col-12 col-md-9 col-lg-10 top-user">
              <div class="dropdown">
                <?
                if ( $user[ 'name' ] or $user[ 'surname' ] )
                  echo $user[ 'surname' ] . ' ' . $user[ 'name' ];
                else
                  echo $user[ 'login' ];
                ?>
                <img src="/admin/layout/icon/user-avatar-filled.svg" alt="avatar"  >
                <div class="dropdown-content">
                  <a href="/admin/?s-action=user-logout"><span class="fa fa-power-off"></span>Wyloguj się</a>
                </div>
              </div>
            </div>
          </div>
          <?
          if ( $alert = \S::get_session( 'alert' ) ):
            \S::alert( false );
            ?>
            <div class="row">
              <div class=" col-12">
                <div class="alert alert-danger alert-dismissable">
                  <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
                  <i class="fa fa-info pr10"></i>
                  <?= $alert;?>
                </div>
              </div>
            </div>
          <? endif;?>
          <div class="row">
            <div class="col-12 dashboard-page">
              <?= $this -> content;?>
            </div>
          </div>
        </div>
      </div>
    </div>
    <script class="footer" type="text/javascript">
      $(document).ready(function () {
        var user_agent 	= navigator.userAgent.toLowerCase();
        var click_event = user_agent.match(/(iphone|ipod|ipad)/)  ? "touchend" : "click";
        $('body').on(click_event, '#mobile-menu-btn', function ()
        {
          if ($(this).hasClass('active'))
          {
            $(this).removeClass('active');
            $( '.menu' ).removeClass( 'visible' );
              $( '#mobile-menu-btn i' ).addClass( 'fa-bars' ).removeClass( 'fa-times' );
            $( '.site-content' ).removeClass( 'with-menu' );
          }
          else
          {
            $(this).addClass('active');
            $( '.menu' ).addClass( 'visible' );
            $( '.site-content' ).addClass( 'with-menu' );
              $( '#mobile-menu-btn i' ).addClass( 'fa-times' ).removeClass( 'fa-bars' );
          }
        });
      });
    </script>
  </body>
</html>