<?php include 'header.php'; ?>


    <script src="https://cdn.jsdelivr.net/npm/js-cookie@2/src/js.cookie.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/sweetalert2@8"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js" integrity="sha512-894YE6QWD5I59HgZOGReFYm4dnWc1Qt5NtvYSaNcOP+u1T9qYdvdihz0PPSiiqn/+/3e7Jo4EaG7TubfWGUrMQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    <script type="text/javascript">


function delay(callback, ms) {
  var timer = 0;
  return function() {
    var context = this, args = arguments;
    clearTimeout(timer);
    timer = setTimeout(function () {
      callback.apply(context, args);
    }, ms || 0);
  };
}    	

  $( document ).ready(function() {

$('#detay').keyup(delay(function (e) {
$('#sonuclar').html('<br /><br /><br /><center><img style="max-height:10%; max-width:10%;" src="../assets/img/loading4.gif"></center><br /><br /><br /><br /><br /><br />');
 if (this.value.length==0) { 
    
    $('#sonuclar').html('');

    return;
  }
  if (window.XMLHttpRequest) {
    // code for IE7+, Firefox, Chrome, Opera, Safari
    xmlhttp=new XMLHttpRequest();
  } else {  // code for IE6, IE5
    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
  xmlhttp.onreadystatechange=function() {
    if (this.readyState==4 && this.status==200) {

     // $('#userVeri').html(this.responseText);
      document.getElementById("sonuclar").innerHTML=this.responseText;
    }
  }
  xmlhttp.open("GET","api.php?type=userSearch&q="+this.value,true);
  xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  xmlhttp.send();

  }, 1000));

});



function kodBulten(){

    var url = "./assets/ajax/bulten.php";
    var bilgi = {
        kod: $('#macKodu').val()
    }

    $.post(url, bilgi, function(response) {

          $("#tahminVeriler").html(response);
        
    });

}


    </script>

     <div class="app-content container center-layout mt-2">
        <div class="content-overlay"></div>
        <div class="content-wrapper">
            <div class="content-header row">
            </div>
            <div class="content-body">
<div class="row">
                    <div id="recent-transactions" class="col-12">
                        <div class="card">
                            <div class="card-header">
                                <h4 class="card-title">Botlar Arasında Arama Yap</h4>
                                <a class="heading-elements-toggle"><i class="la la-ellipsis-v font-medium-3"></i></a>
                                <div class="heading-elements">
                                    <ul class="list-inline mb-0">
                                        <li><fieldset>
                                        <div class="input-group pull-right">
                                            <input type="text" id="detay" class="form-control" placeholder="Bilgi Girin">
                                            <div class="input-group-append">
                                                <button class="btn btn-primary" type="button">Ara</button>
                                            </div>
                                        </div>
                                    </fieldset></li>
                                    </ul>
                                </div>
                            </div>
                            <div class="card-content">
                                <div class="table-responsive">
                                    <table id="recent-orders" class="table table-hover table-xl mb-0">
                                        <thead>
                                            <tr>
                                                <th class="border-top-0">İsim Soyisim</th>
                                                <th class="border-top-0">E-Mail</th>
                                                <th class="border-top-0">Bilgi</th>
                                                <th class="border-top-0">Son Aktivite</th>
                                                <th class="border-top-0">Jeton Sayısı</th>
                                                <th class="border-top-0">Durum</th>
                                                <th class="border-top-0">İşlem</th>
                                            </tr>
                                        </thead>
                                        <tbody id="sonuclar">




                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                  </div>   </div>   </div>   </div>


<?php include 'footer.php'; ?>