<!DOCTYPE html>
<html lang="en">
  <head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <title>IGS Developer - {$title}</title>

    <!-- vendor css -->
    <link href="{base_url()}/assets/lib/font-awesome/css/font-awesome.css" rel="stylesheet">
    <link href="{base_url()}/assets/lib/Ionicons/css/ionicons.css" rel="stylesheet">
    <link href="{base_url()}/assets/lib/datatables/css/jquery.dataTables.css" rel="stylesheet">
    <link href="{base_url()}/assets/lib/select2/css/select2.min.css" rel="stylesheet">

    <!-- Slim CSS -->
    <link rel="stylesheet" href="{base_url()}/assets/css/slim.css">


  </head>
  <body>
    <div class="slim-header">
      <div class="container">

        <div class="slim-header-left">
          <h2 class="slim-logo"><a href="{base_url()}/">IGS<span> Developer</span></a></h2>

        </div><!-- slim-header-left -->
        <div class="slim-header-right">
          <div class="dropdown dropdown-a">
            <a href="" class="header-notification" data-toggle="dropdown">
              <i class="icon ion-ios-bolt-outline"></i>
            </a>
          
          </div><!-- dropdown -->
          {if $smarty.session.isLoggedIn}

          <div class="dropdown dropdown-c">
            <a href="#" class="logged-user" data-toggle="dropdown">
              
              <span>{$smarty.session.name}</span>
              <i class="fa fa-angle-down"></i>
            </a>
            <div class="dropdown-menu dropdown-menu-right">
              <nav class="nav">
                <a href="{base_url()}/user/settings" class="nav-link"><i class="icon ion-ios-gear"></i> Account Settings</a>
                <a href="{base_url()}/user/logout" class="nav-link"><i class="icon ion-forward"></i> Sign Out</a>
              </nav>
            </div><!-- dropdown-menu -->
          </div><!-- dropdown -->
        {/if}
        </div><!-- header-right -->
      </div><!-- container -->
    </div><!-- slim-header -->

    <div class="slim-navbar">
      <div class="container">
        <ul class="nav">
          <li class="nav-item">
            <a class="nav-link" href="{base_url()}/">
              <i class="icon ion-ios-home-outline"></i>
              <span>Home</span>
              <span class="square-8"></span>
            </a>
          </li>
          <li class="nav-item">
            <a class="nav-link" href="{base_url()}/panel/plans">
              <i class="icon ion-ios-bolt-outline"></i>
              <span>Plans</span>
            </a>
          </li>

          <li class="nav-item">
            <a class="nav-link" href="{base_url()}/help">
              <i class="icon ion-help"></i>
              <span>Help</span>
            </a>
          </li>
          {if $smarty.session.isLoggedIn}

          <li class="nav-item">
            <a class="nav-link" href="{base_url()}/user/licenses">
              <i class="icon ion-key"></i>
              <span>Licenses</span>
            </a>
          </li>

          <li class="nav-item">
            <a class="nav-link" href="{base_url()}/user/overview">
              <i class="icon ion-key"></i>
              <span>Overview</span>
            </a>
          </li>

          <!--<li class="nav-item with-sub">
            <a class="nav-link" href="#">
              <i class="icon ion-grid"></i>
              <span>Misc</span>
            </a>
            <div class="sub-item">
              <ul>
                <li><a href="{base_url()}/user/downloads">Server Files</a></li>
              </ul>
            </div>
          </li>-->

        {if $smarty.session.Nivel eq 2}

          <li class="nav-item with-sub">
            <a class="nav-link" href="#">
              <i class="icon ion-grid"></i>
              <span>Admin</span>
            </a>
            <div class="sub-item">
              <ul>
                <li><a href="{base_url()}/admin/users">Users</a></li>
                <li><a href="{base_url()}/admin/licenses">Licences</a></li>
                <li><a href="{base_url()}/admin/addlicense">Create License</a></li>
                <li><a href="{base_url()}/admin/createuser">Create User</a></li>
              </ul>
            </div><!-- sub-item -->
          </li>
          
        {/if}
          {else}

          <li class="nav-item">
            <a class="nav-link" href="{base_url()}/user/signup">
              <i class="icon ion-person-add"></i>
              <span>Registro</span>
            </a>
          </li>

          <li class="nav-item">
            <a class="nav-link" href="{base_url()}/user/signin">
              <i class="icon ion-person"></i>
              <span>Login</span>
            </a>
          </li>
        {/if}

        </ul>
      </div><!-- container -->
    </div><!-- slim-navbar -->
    {block name=main}{/block}
    <div class="slim-footer">
      <div class="container">
        <p>Copyright 2022 &copy; All Rights Reserved. IGS Developer</p>
      </div><!-- container -->
    </div><!-- slim-footer -->

    <script src="{base_url()}/assets/lib/jquery/js/jquery.js"></script>
    <script src="{base_url()}/assets/lib/popper.js/js/popper.js"></script>
    <script src="{base_url()}/assets/lib/bootstrap/js/bootstrap.js"></script>
    <script src="{base_url()}/assets/lib/jquery.cookie/js/jquery.cookie.js"></script>
    <script src="{base_url()}/assets/lib/datatables/js/jquery.dataTables.js"></script>
    <script src="{base_url()}/assets/lib/datatables-responsive/js/dataTables.responsive.js"></script>
    <script src="{base_url()}/assets/lib/select2/js/select2.min.js"></script>


    <script src="{base_url()}/assets/js/slim.js"></script>
      <script>
      $(function(){

        // showing modal with effect
        $('.modal-effect').on('click', function(e){
          e.preventDefault();
          var effect = $(this).attr('data-effect');
          $('#modaldemo8').addClass(effect);
        });

        // hide modal with effect
        $('#modaldemo8').on('hidden.bs.modal', function (e) {
          $(this).removeClass (function (index, className) {
              return (className.match (/(^|\s)effect-\S+/g) || []).join(' ');
          });
        });
      });
    </script>
    <script>
      $(function(){
        'use strict';

        $('#datatable1').DataTable({
          responsive: true,
          language: {
            searchPlaceholder: 'Search...',
            sSearch: '',
            lengthMenu: '_MENU_ items/page',
          }
        });

        $('#datatable2').DataTable({
          bLengthChange: false,
          searching: false,
          responsive: true
        });

        // Select2
        $('.dataTables_length select').select2({ minimumResultsForSearch: Infinity });

      });
    </script>
    <script>
      $(function(){
        'use strict';

        $('.select2').select2({
          minimumResultsForSearch: Infinity
        });

        // Select2 by showing the search
        $('.select2-show-search').select2({
          minimumResultsForSearch: ''
        });

        // Colored Hover
        $('#select2').select2({
          dropdownCssClass: 'hover-success',
          minimumResultsForSearch: Infinity // disabling search
        });

        $('#select3').select2({
          dropdownCssClass: 'hover-danger',
          minimumResultsForSearch: Infinity // disabling search
        });

        // Outline Select
        $('#select4').select2({
          containerCssClass: 'select2-outline-success',
          dropdownCssClass: 'bd-success hover-success',
          minimumResultsForSearch: Infinity // disabling search
        });

        $('#select5').select2({
          containerCssClass: 'select2-outline-info',
          dropdownCssClass: 'bd-info hover-info',
          minimumResultsForSearch: Infinity // disabling search
        });

        // Full Colored Select Box
        $('#select6').select2({
          containerCssClass: 'select2-full-color select2-primary',
          minimumResultsForSearch: Infinity // disabling search
        });

        $('#select7').select2({
          containerCssClass: 'select2-full-color select2-danger',
          dropdownCssClass: 'hover-danger',
          minimumResultsForSearch: Infinity // disabling search
        });

        // Full Colored Dropdown
        $('#select8').select2({
          dropdownCssClass: 'select2-drop-color select2-drop-primary',
          minimumResultsForSearch: Infinity // disabling search
        });

        $('#select9').select2({
          dropdownCssClass: 'select2-drop-color select2-drop-indigo',
          minimumResultsForSearch: Infinity // disabling search
        });

        // Full colored for both box and dropdown
        $('#select10').select2({
          containerCssClass: 'select2-full-color select2-primary',
          dropdownCssClass: 'select2-drop-color select2-drop-primary',
          minimumResultsForSearch: Infinity // disabling search
        });

        $('#select11').select2({
          containerCssClass: 'select2-full-color select2-indigo',
          dropdownCssClass: 'select2-drop-color select2-drop-indigo',
          minimumResultsForSearch: Infinity // disabling search
        });
      });
    </script>
  </body>
</html>
