<!DOCTYPE html>
<html lang="pt-br">
   <head>
   <?php global $parametros_get_page; ?>
      <meta charset="utf-8">
	  <meta http-equiv="X-UA-Compatible" content="IE=edge">
      <title><?php echo $parametros_get_page['pag_title']; ?></title>
      <meta name="viewport" content="width=device-width,initial-scale=1">
      <meta name="description" content="<?php echo $parametros_get_page['pag_description']; ?>">
      <meta name="author" content="<?php echo $parametros_get_page['pag_author']; ?>">

<meta name="msapplication-tap-highlight" content="no">
<link href="<?php echo base; ?>theme/main.d810cf0ae7f39f28f336.css" rel="stylesheet">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, shrink-to-fit=no" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.1/moment.min.js"></script>
<style>


  .col-md-6, .col-lg-6 {
    float: left !important;
  }
  
  .selectparticipante{
  background: #3a63d1;
  color: #fff;
  padding: 10px;
  border-radius: 22px;
  margin: 10px;
  cursor: pointer;
  float: left;
  }
  
.bg-asteroid {
  background-image: linear-gradient(to right,#ff0133,#681818,#ff0334) !important;
}

.page-item.active .page-link, .pagination .active.page-number .page-link {
  z-index: 1;
  color: #fff;
  background-color: #e81e43;
  border-color: #681818;
}

.bt_ajax{
    color: #5e0513;
  background: #eee;
  padding: 10px;
  float: left;
  clear: both;
  border-radius: 4px;
  margin: 2px;
}

</style>

</head>
   
 <body>
     
    
<div class="modal fade bd-example-modal-lg2" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLongTitle">Modal title</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<div class="form-row">
 
<style>
/* Estilo do box */
.box {
    position: absolute;
    top: 100%; /* Posiciona o box logo abaixo do input */
    left: 0;
    width: 100%; /* Faz o box ter a mesma largura do input */
    padding: 20px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    z-index: 1000; /* Garante que o box fique acima de outros elementos */
    max-height: 350px;
    overflow-y:auto;
}
</style>


<div class="col-md-12" style="margin: 10px;padding: 0 19%;">
    <!-- Contêiner para posicionar o input e o box -->
    <div class="input-container" style="position: relative;">
        <!-- Campo de busca -->
        <input id="data_export" placeholder="..." type="text" class="form-control" disabled>
      
    </div>
</div>

<div class="col-md-12" style="margin: 10px;padding: 0 19%;">
    <!-- Contêiner para posicionar o input e o box -->
    <div class="input-container" style="position: relative;">
        <!-- Campo de busca -->
        <input id="search-event2" placeholder="Buscar Origem..." type="text" class="form-control">
        
        <!-- Box inicialmente escondido, com position absolute -->
        <div id="search-box2" class="box" style="display: none;">
            <p>Resultados aparecerão aqui quando você digitar.</p>
        </div>
    </div>
</div>


<div class="col-md-12" style="margin: 10px;padding: 0 19%;">
    <!-- Contêiner para posicionar o input e o box -->
    <div class="input-container" style="position: relative;">
        <!-- Campo de busca -->
        <input id="search-event" placeholder="Buscar evento..." type="text" class="form-control">
        
        <!-- Box inicialmente escondido, com position absolute -->
        <div id="search-box" class="box" style="display: none;">
            <p>Resultados aparecerão aqui quando você digitar.</p>
        </div>
    </div>
</div>



<script>
window.setTimeout(function(){
    
    // Evento de digitação no campo de busca
    jQuery('#search-event').on('input', function() {
        // Pega o valor digitado
        let searchTerm = jQuery(this).val();

        // Verifica se há texto digitado
        if (searchTerm.length > 0) {
            // Mostra o box com animação
            jQuery('#search-box').fadeIn();
            
        query = 'geteventname=' + searchTerm + '&geteventnamedata=' + jQuery('#data_export').val();
   
        $.ajax({
            type: 'GET',
            url: '<?php echo dominio; ?>admin-dashboard', // Ajuste BASE_URL conforme necessário
            data: query,
            success: function(data) {
                $('#search-box').html(data);
            }
        });
            
        } else {
            // Esconde o box se o campo estiver vazio
           jQuery('#search-box').fadeOut();
        }
    });
    
        // Evento de digitação no campo de busca
    jQuery('#search-event2').on('input', function() {
        // Pega o valor digitado
        let searchOrigem = jQuery(this).val();

        // Verifica se há texto digitado
        if (searchOrigem.length > 0) {
            // Mostra o box com animação
            jQuery('#search-box2').fadeIn();
            
        query = 'getorigem=' + searchOrigem;
   
        $.ajax({
            type: 'GET',
            url: '<?php echo dominio; ?>admin-dashboard', // Ajuste BASE_URL conforme necessário
            data: query,
            success: function(data) {
                $('#search-box2').html(data);
            }
        });
            
        } else {
            // Esconde o box se o campo estiver vazio
           jQuery('#search-box2').fadeOut();
        }
    });
    
    
}, 1500);


function validar_event_export(){
    origem = jQuery('#search-event2').val();
    evento = jQuery('#search-event').val();
    data   = jQuery('#data_export').val();
    window.location = 'admin-dashboard?exportev=' + data + '&origem=' + origem + '&evento=' + evento;
}

</script>

</div>
</div>

<div class="modal-footer">
<button type="button" class="btn btn-primary" onclick="validar_event_export()">Exportar</button>
</div>

</div>
</div>
</div>

 
 <div class="modal fade bd-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLongTitle">TUTORIAL DE CONFIGURAÇÃO</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<pre>&lt;script src="<?php echo dominio; ?>?jstrack=<span id="copiacode"></span>"&gt;&lt;/script&gt;</pre>

<p>Caso queira usar mais de um ID no mesmo site basta separa por virgula, Ex:<br>
<?php echo dominio; ?>?jstrack=iden1,idn2</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
     
	<div class="modal fade bd-track-list-lg" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true" style="display:none">
	<div class="modal-dialog modal-lg">
	<div class="modal-content">
	<div class="modal-header">
	<h5 class="modal-title" style="font-size:14px">TRACK PAGES</h5>
	<strong id="aposta_list_data"></strong>
	<button type="button" class="close" data-dismiss="modal" aria-label="Close">
	<span aria-hidden="true">&times;</span> 
	</button>
	</div>

<div class="modal-body">
 <div class="input-group" style="font-weight: bold;">
     <strong id="header-email"></strong>

</div>
<br>
<div class="row">
<div class="col-md-12 col-lg-12" style="max-height:600px; overflow-y:auto">

<table style="width: 100%;"  class="table table-hover table-striped table-bordered">
<thead>
<tr>
<th>Pagina</th>
<th>Data</th>
<th>Tempo</th>
</tr>
</thead>

<tbody id="track_list_content">


</tbody>


</table>




</div>
</div>

</div>



<div class="modal-footer">


</div>
</div>
</div>
</div>


<div id="ajax_vars_include">


 <script >
	 
	 
 var formatter = new Intl.NumberFormat('pt-br', {
  style: 'currency',
  currency: 'BRL',
  minimumFractionDigits: 2,
});

	 
 var BASE_URL = '<?php echo dominio; ?>';

<?php

if(isset($_SESSION['fideliza_logado-admin'])){
   $jsonAdmin   = json_decode($_SESSION['fideliza_logado-admin']);
   $level       = $jsonAdmin->ad_level; 
   $admin_name  = $jsonAdmin->ad_name;

}else{
   $level = 0;

}

if(isset($_SESSION['fideliza_cliente_logado'])){
	
    ?>
    var LOOGED  = true;
	<?php	
	
}else{
	
    ?>
   var LOOGED  = false;
   <?php
	
}

if(isset($_GET['cliente-logout'])){

?>
   var LOOGED  = false;
   
<?php	
	
}
  
?>

 var LEVEL = '<?php echo $level; ?>';

</script>

</div>
 
<?php



if(isset($_SESSION['fideliza_logado-admin'])){

include_once('includes/siderbar_admin.php');

}else{

if($parametros_get_page['pag_name'] != 'Pagina Adminastrador'){

include_once('includes/siderbar_site.php');

}

}
  
?>