<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>Sisplan Web | Customização</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="plugins/fontawesome-free/css/all.min.css?versao=3.2412.10.1">

  <link rel="stylesheet" href="dist/css/adminlte.min.css?versao=3.2412.10.1">
  <link rel="stylesheet" href="dist/css/custom.css?versao=3.2412.10.1">
  <link rel="stylesheet" href="dist/css/sisplan.css?versao=3.2412.10.1">
  <link rel="stylesheet" href="dist/css/PesquisaVariosSelect2.css?versao=3.2412.10.1">
  <link rel="stylesheet" type="text/css" href="plugins/datatables-keytable/css/keyTable.bootstrap4.min.css?versao=3.2412.10.1">
  <link rel="stylesheet" href="plugins/toastr/toastr.min.css?versao=3.2412.10.1">
  <link rel="stylesheet" href="plugins/icheck-bootstrap/icheck-bootstrap.min.css?versao=3.2412.10.1">
  <link rel="stylesheet" href="plugins/fontawesome-free/css/all.min.css?versao=3.2412.10.1">
  <link rel="shortcut icon" href="favicon.ico">
  <link rel="stylesheet" type="text/css" href="dist/css/driver.min.css?versao=3.2412.10.1" />
  <link rel="stylesheet" href="dist/css/jquery-ui.css?versao=3.2412.10.1">
  <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">
  <link rel="stylesheet" href="plugins/select2/css/select2.min.css?versao=3.2412.10.1">
  <link rel="stylesheet" href="plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css?versao=3.2412.10.1">
  <link rel="stylesheet" href="plugins/datatables-colreorder/css/colReorder.bootstrap4.min.css?versao=3.2412.10.1">

  <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">

  <style>
    #nav-tab a:hover,
    #nav-tab a {
      color: var(--font-color);
    }

    .border-Field .textoBorda {
      font-size: 1.1em !important;
      text-align: left !important;
      width: auto;
      padding: 0 10px;
      border-bottom: none;
    }

    .border-Field {
      border: 1px solid var(--font-color) !important;
      padding: 0 1.0em .5em 1.0em !important;
      margin: 0 0 1.0em 0 !important;
      -webkit-box-shadow: 0px 0px 0px 0px #000;
      box-shadow: 0px 0px 0px 0px #000;
    }

    .col-md-1,
    .col-md-10,
    .col-md-11,
    .col-md-12,
    .col-md-2,
    .col-md-3,
    .col-md-4,
    .col-md-5,
    .col-md-6,
    .col-md-7,
    .col-md-8,
    .col-md-9 {
      padding-right: 7.5px;
      padding-left: 7.5px;
    }

    /* ----------------------- */

   
  </style>


</head>

<body class="hold-transition sidebar-mini layout-fixed">
  <div class="wrapper" id="semPermissao">
  </div>
  <div class="content-wrapper">
    <div class="content-header">
      <div class="container-fluid">
        <div class="row mb-2">
          <div class="col-sm-6 col-12">
          </div><!-- /.col -->
          <div class="col-sm-6 col-12">
            <!-- <ol class="breadcrumb float-sm-right">
              
              <li class="breadcrumb-item active">Cadastro</li>
            </ol> -->
          </div><!-- /.col -->
        </div><!-- /.row -->
      </div><!-- /.container-fluid -->
    </div>

    <section class="content">
      <div class="card-header text-center flex" style="padding-top: 0px;">
        <h2 class="m-0">Customização</h2>
        <button title="Tutorial" class="btn btn-info btn-sm ml-2" id="tutorial">
          <i class="fas fa-question-circle"></i>
        </button>
      </div>

      <div class="container-fluid card">
        <div class="row card-body d-flex justify-content-end py-4" id="abaGeral">

          <nav class="col-12">
            <div class="nav nav-tabs" id="nav-tab" role="tablist" style="text-decoration: none; ">
              <a class="menu_secao nav-item nav-link active" id="tabSerigrafia" data-toggle="tab" href="#divSerigrafia" role="tab" aria-controls="divSerigrafia" aria-selected="true">Serigrafia</a>
              <a class="menu_secao nav-item nav-link" id="tabBordado" data-toggle="tab" href="#divBordado" role="tab" aria-controls="divBordado" aria-selected="false">Bordado</a>
              <a class="menu_secao nav-item nav-link" id="tabSublimacao" data-toggle="tab" href="#divSublimacao" role="tab" aria-controls="divSublimacao" aria-selected="false">Sublimação</a>
              <a class="menu_secao nav-item nav-link" id="tabTermotape" data-toggle="tab" href="#divTermotape" role="tab" aria-controls="divTermotape" aria-selected="false">Termotape</a>
            </div>
          </nav>
          <div class="col-12" id="nav-tabContent">

            <!--Aba Serigrafia-->
            <div class="tab-pane fade show active card" id="divSerigrafia" role="tabpanel" aria-labelledby="tabSerigrafia">
              <?php
              include_once('./abas/serigrafia.php');
              ?>
            </div>

            <!--Aba Bordado-->
            <div class="tab-pane fade card d-none" id="divBordado" role="tabpanel" aria-labelledby="tabBordado">
              <?php
              include_once('./abas/bordado.php');
              ?>
            </div>

            <!--Aba Sublimacao-->
            <div class="tab-pane fade card d-none" id="divSublimacao" role="tabpanel" aria-labelledby="tabSublimacao">
              <?php
              include_once('./abas/sublimacao.php');
              ?>
            </div>

            <!--Aba Termotape-->
            <div class="tab-pane fade card d-none" id="divTermotape" role="tabpanel" aria-labelledby="tabTermotape">
              <?php
              include_once('./abas/termotape.php');
              ?>
            </div>
          </div>
        </div>

      </div>
  </div>


  <?php
  include_once('../../modais.php');
  ?>

  <!-- Control Sidebar -->
  <aside class="control-sidebar control-sidebar-dark">
    <!-- Control sidebar content goes here -->
  </aside>
  <!-- /.control-sidebar -->
  </div>
  <!-- ./wrapper -->
  <script>
    function formatar(mascara, documento) {
      var i = documento.value.length;
      var saida = mascara.substring(0, 1);
      var texto = mascara.substring(i);

      if (texto.substring(0, 1) != saida) {
        documento.value += texto.substring(0, 1);
      }

    }
  </script>

  <!-- jQuery -->
  <script src="./plugins/jquery/jquery.min.js?versao=3.2412.10.1"></script>
  <!-- jQuery UI 1.11.4 -->
  <script src="./plugins/jquery-ui/jquery-ui.min.js?versao=3.2412.10.1"></script>
  <script type="text/javascript" src="./dist/js/jquery.dataTables.js?versao=3.2412.10.1"></script>
  <script type="text/javascript" src="./dist/js/dataTables.bootstrap4.min.js?versao=3.2412.10.1"></script>
  <!-- SweetAlert2 -->
  <script src="./plugins/sweetalert2/sweetalert2.min.js?versao=3.2412.10.1"></script>
  <script src="./plugins/toastr/toastr.min.js?versao=3.2412.10.1"></script>

  <!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
  <script>
    $.widget.bridge('uibutton', $.ui.button);
  </script>

  <script src="plugins/jquery/jquery.min.js?versao=3.2412.10.1"></script>
  <script src="dist/js/jquery.maskMoney.min.js?versao=3.2412.10.1"></script>
  <script src="plugins/jquery-ui/jquery-ui.min.js?versao=3.2412.10.1"></script>
  <script type="text/javascript" src="dist/js/jquery.dataTables.js?versao=3.2412.10.1"></script>
  <script type="text/javascript" src="dist/js/dataTables.bootstrap4.min.js?versao=3.2412.10.1"></script>
  <script src="plugins/sweetalert2/sweetalert2.min.js?versao=3.2412.10.1"></script>
  <script src="plugins/toastr/toastr.min.js?versao=3.2412.10.1"></script>
  <script>
    $.widget.bridge('uibutton', $.ui.button);
  </script>
  <script src="plugins/bootstrap/js/bootstrap.bundle.min.js?versao=3.2412.10.1"></script>
  <script src="dist/js/adminlte.min.js?versao=3.2412.10.1"></script>
  <script src="dist/js/requisicoes.js?versao=3.2412.10.1"></script>
  <script src="dist/js/loadingoverlay.min.js?versao=3.2412.10.1"></script>
  <script src="dist/js/valida_cpf_cnpj.js?versao=3.2412.10.1"></script>
  <script src="plugins/jquery-validation/jquery.validate.min.js?versao=3.2412.10.1"></script>
  <script src="dist/js/dataTables.keyTable.js?versao=3.2412.10.1"></script>
  <script src="dist/js/sisplan.js?versao=3.2412.10.1"></script>
  <script src="utils/funcoes.js?versao=3.2412.10.1"></script>
  <script src="utils/cookies.js?versao=3.2412.10.1"></script>
  <script src="dist/js/driver.min.js?versao=3.2412.10.1"></script>
  <script src="config.js?versao=3.2412.10.1"></script>
  <script type="text/javascript" src="plugins/jszip/jszip.min.js?versao=3.2412.10.1"></script>
  <script type="text/javascript" src="plugins/pdfmake/pdfmake.min.js?versao=3.2412.10.1"></script>
  <script type="text/javascript" src="plugins/pdfmake/vfs_fonts.js?versao=3.2412.10.1"></script>
  <script type="text/javascript" src="plugins/datatables-buttons/js/dataTables.buttons.min.js?versao=3.2412.10.1"></script>
  <script type="text/javascript" src="plugins/datatables-buttons/js/buttons.html5.min.js?versao=3.2412.10.1"></script>
  <script src="plugins/datatables-colreorder/js/dataTables.colReorder.min.js?versao=3.2412.10.1"></script>
  <script src="plugins/select2/js/select2.full.min.js?versao=3.2412.10.1"></script>
  <script>
    $(document).ready(async function() {
      if (getCookie('usuario') == "") {
        window.location.href = `${BASE_URI}/login`;
        return;
      }

      let usuario = getCookie('usuario');
      let empresa = getCookie('empresa');

      ipInterno = IP_INTERNO;
      ipExterno = IP_EXTERNO;
      basicAuth = BASIC_AUTH;

      const temAcesso = await temAcessoTela("CUSTOMIZACAO");
      if (!temAcesso.resultado) {
        toastrAcesso(temAcesso, BASE_URI);
        return;
      }

      const permissaoUsuarioLogado = await permissaoAcessos("CUSTOMIZACAO");

      if (permissaoUsuarioLogado.INCLUI == 'N') {
        await criaMensagemErro("Sem permissão para utilizar esta tela!", () => {
          // window.location.href = `${BASE_URI}/index`
          $('#semPermissao').addClass('d-none');
        });
        return;
      }

      const queryString = window.location.href;
      const parametros = queryString.split("/");
      const cliente = parametros[parametros.length - 1];

      sArquivo = `${BASE_URI}/pages/customizacao/customizacao.js?versao=3.2412.10.1`;
      insereJavaScriptPagina(sArquivo);

      const nomeTela = ('<?php echo basename(__FILE__) ?>').replace('.php', '');
      habilitaCamposObrigatoriosTela(nomeTela);

    });
  </script>
</body>

</html>