<script type="text/javascript">
    
$(document).ready(function() {


var urloc = window.location.pathname;

console.log(urloc)

if(urloc == "/index.php" || urloc == "/"){
$("#index").addClass("active");
}else if(urloc == "/finder.php"){
$("#finder").addClass("active");
}else if(urloc == "/mesajlar.php"){
$("#mesajlar").addClass("active");
}else if(urloc == "/hesabim.php"){
$("#hesabim").addClass("active");
}


});

function yolland(){

Android.yapDene("deneme");

}

function menuGizle(){
    $("#sidebarPanel").modal('hide')
}


function iletisimGonder(){
     var aciklamasi = $('#iletisimAciklama').val();

    var url = "assets/api.php";
    var bilgi = {
      type: 'iletisimGonder',
      icerik: aciklamasi
    }
    $.post(url,bilgi,function(response) {
      var json = JSON.parse(response);

      if(json.result==1){



toastbox('toast-gonderildi', 5000)
     $("#sidebarPanel").modal('hide');
     $("#aramaDialog").modal("hide");
     var aciklamasi = $('#iletisimAciklama').val("");
}else{
   toastbox('toast-hata', 5000)
     $("#sidebarPanel").modal('hide');
     $("#aramaDialog").modal("hide"); 
}

   })

}


function bildirimAyar(){

    var url = "assets/api.php";
    var bilgi = {
      type: 'bildirimAyar',
      type2: $('#bildirimCheck').val()
    }
    $.post(url,bilgi,function(response) {
      var json = JSON.parse(response);

      if(json.result==0){

$('#bildirimCheck').prop('checked', false);
$('#ackapa').html("Kapalı");
$('#bildirimCheck').val(0);


      }else if(json.result==1){

$('#bildirimCheck').prop('checked', true);
$('#ackapa').html("Açık");
$('#bildirimCheck').val(1);

      }

})
}


function aramaizin(){

    var url = "assets/api.php";
    var bilgi = {
      type: 'aramaizin',
      type2: $('#aramaCheck').val()
    }
    $.post(url,bilgi,function(response) {
      var json = JSON.parse(response);

      if(json.result==0){

$('#aramaCheck').prop('checked', false);
$('#ackapa2').html("<font color='red'><b>Arayamasın</b></font>");
$('#aramaCheck').val(0);


      }else if(json.result==1){

$('#aramaCheck').prop('checked', true);
$('#ackapa2').html("<font color='green'><b>Arayabilsin</b></font>");
$('#aramaCheck').val(1);

      }

})
}


</script>

<?php 
$check = $db->query("SELECT COUNT(*) FROM mesajlar WHERE alan_id = '".$myUser['user_id']."' AND okundu = 0")->fetchColumn();
/*
if($check>=100){
    $check = "99+";
}*/

$check2 = $db->query("SELECT COUNT(*) FROM aramalar WHERE u_to = '".$myUser['user_id']."'")->fetchColumn();
?>

    <!-- App Bottom Menu -->
<div class="appBottomMenu" id="altmenu">
                <a href="index.php" class="item" id="index">
                    <div class="col">
                        <ion-icon name="people-circle-outline" role="img" class="md hydrated" aria-label="calendar outline"></ion-icon>
                        <strong>Keşfet</strong>
                    </div>
                </a>
                <a href="finder.php" class="item" id="finder">
                    <div class="col">
                        <ion-icon name="heart-half-outline" role="img" class="md hydrated" aria-label="archive outline"></ion-icon>
                        <strong>Eşleş</strong>
                    </div>
                </a>
                <a href="javascript:void(0)" data-toggle="modal" data-target="#aramaListview" class="item">
                    <div class="col">
                        <ion-icon name="call-outline" role="img" class="md hydrated" aria-label="document text outline"></ion-icon>
                        <strong>Aramalar</strong>
                        <span id="okunmamis2" class="badge badge-danger"><?=$check2?></span>
                    </div>
                </a>
                <a href="mesajlar.php" class="item" id="mesajlar">
                    <div class="col">
                        <ion-icon name="mail-outline" role="img" class="md hydrated" aria-label="document text outline"></ion-icon>
                        <strong>Mesajlar</strong>
                        <span id="okunmamis" class="badge badge-success"><?=$check?></span>
                    </div>
                </a>
                <a href="hesabim.php" class="item" id="hesabim">
                    <div class="col">
                        <ion-icon name="people-outline" role="img" class="md hydrated" aria-label="people outline"></ion-icon>
                        <strong>Hesabım</strong>
                    </div>
                </a>
            </div>
    <!-- * App Bottom Menu -->




        <!-- DialogIconedSuccess -->
        <div class="modal fade dialogbox" id="jetonAl" data-backdrop="static" tabindex="-1" role="dialog">
            <div class="modal-dialog" role="document">
                <div class="modal-content">
                    <div class="modal-icon text-warning">
                        <ion-icon name="diamond-outline"></ion-icon>
                    </div>
                    <div class="modal-header">
                        <h5 class="modal-title">Mesaj Hakkın Bitti</h5>
                    </div>
                    <div class="modal-body">
                        Sohbete kaldığınız yerden devam etmek için hemen Jeton satın alın ve tadını çıkarın!
                    </div>
                    <div class="modal-footer">
                        <div class="btn-inline">
                            <a href="javascript:void(0);" class="btn" data-toggle="modal" data-target="#jetonPaketleri" data-dismiss="modal">Paketleri İncele</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- * DialogIconedSuccess -->

                <!-- DialogIconedSuccess -->
        <div class="modal fade dialogbox" id="bjetonAl" data-backdrop="static" tabindex="-1" role="dialog">
            <div class="modal-dialog" role="document">
                <div class="modal-content">
                    <div class="modal-icon text-warning">
                        <ion-icon name="cash-outline"></ion-icon>
                    </div>
                    <div class="modal-header">
                        <h5 class="modal-title">Günlük Beğeni Hakkın Bitti</h5>
                    </div>
                    <div class="modal-body">
                        Yeni arkadaşlıklar edinmeye devam edebilmek için hemen Jeton satın alın, hangi paketi alırsanız alın günlük beğeni hakkınız 50 adete yükselecektir.
                    </div>
                    <div class="modal-footer">
                        <div class="btn-inline">
                            <a href="javascript:void(0);" class="btn" data-toggle="modal" data-target="#jetonPaketleri" data-dismiss="modal">Paketleri İncele</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- * DialogIconedSuccess -->



<!-- ARAMALARRRRRRRRRRRRRRRRRRRRRRRRRRRRR -->


<!-- DialogIconedSuccess -->
        <div class="modal fade dialogbox" id="DialogIconedSuccess2" data-backdrop="static" tabindex="-1" role="dialog">
            <div class="modal-dialog" role="document">
                <div class="modal-content">
                    <div class="modal-icon text-danger">
                        <ion-icon name="warning-outline"></ion-icon>
                    </div>
                    <div class="modal-header">
                        <h5 class="modal-title">Arama Yapılamıyor</h5>
                    </div>
                    <div class="modal-body">
                    <b><c id="kfullname">Bu kullanıcı</c> sadece izin verdiği kişiler tarafından gelen sesli aramaları kabul ediyor.</b>
                    </div>
                    <div class="modal-footer">
                        <div class="btn-inline">
                            <a href="component-dialog.html#" class="btn" data-dismiss="modal">Tamam</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- * DialogIconedSuccess -->    


    <!-- Modal Listview -->
<div class="modal fade modalbox" id="aramaListview" data-backdrop="static" tabindex="-1" role="dialog">
   <div class="modal-dialog" role="document">
      <div class="modal-content">
         <div class="modal-header">
            <h5 class="modal-title">Arama Geçmişiniz</h5>
            <a href="javascript:;" data-dismiss="modal">Kapat</a>
         </div>

<?php 

$aramaizin = $myUser['user_aramaizin'];

if($aramaizin == 1){
    $val12 = "1";
    $chck2 = "checked";
    $ackapa2 = "<font color='green'><b>Arayabilsin</b></font>";
}else{
    $val12 = "0";
    $chck2 = "";
    $ackapa2 = "<font color='red'><b>Arayamasın</b></font>";
}

?>

            <ul class="listview image-listview flush">
<li>
                            <div class="item">
  <div class="in" onclick="aramaizin();">
 <div>Kullanıcılar Beni <c id="ackapa2"><?=$ackapa2?></c></div>

                                    <div class="custom-control custom-switch">
                                        <input type="checkbox" class="custom-control-input"
                                            id="aramaCheck" value="<?=$val12?>" <?=$chck2?>>
                                        <label class="custom-control-label"></label>
                                    </div>
                                </div>
                            </div>
                        </li>
                    </ul>
             

         <div class="modal-body p-0" <?=$oncl2?>>
            <ul class="listview image-listview flush mb-2 mt-1">



<?php



if(isset($user_id)){

$query = $db->query("SELECT * FROM aramalar WHERE u_to = {$user_id} ORDER BY id DESC LIMIT 30", PDO::FETCH_ASSOC);
if ($query->rowCount()>0){


foreach ($query as $veri) {
    // code...
$kBilgisi = $db->query("SELECT * FROM kullanicilar WHERE user_id = '{$veri['u_from']}'")->fetch(PDO::FETCH_ASSOC);
$zamanim = date('Y-m-d H:i:s', $veri['zaman']);


echo '<li class="'.$blurla2.'">
                <div class="item">
                    <img src="/'.$kBilgisi['user_picture'].'" alt="image" class="image">
                    <div class="in">
                        <div>'.$kBilgisi['user_fullname'].'<footer>Gelen Arama: '.time_ago($zamanim).'</footer></div>
                        <span class="text-danger">Cevapsız</span>
                    </div>
                    <div onclick="yogunUyari();" class="icon-box ml-1 bg-whatsapp" style="margin-right: 0px !important;">
                        <ion-icon name="call-outline" role="img" class="md hydrated" aria-label="logo whatsapp"></ion-icon>
                    </div>
                </div>
            </li>';


}

}else{

echo '<li>
<div class="error-page">
            <div class="mb-2">
                <img src="assets/img/check.png" alt="alt" class="imaged square w200">
            </div>
            <h1 class="title">Arama Geçmişiniz Boş!</h1>
            <div class="text mb-3">
                Henüz bir aramanız yok.
            </div>

      
        </div>
               </li>';

}

}

?>

            </ul>
         </div>
      </div>
   </div>
</div>
    <!-- Modal Listview -->

<!-- ARAMALARRRRRRRRRRRRRRRRRRRRRRRRRRRRR -->











        <!-- SİKAYET MODAL -->

        <div class="modal fade dialogbox" id="DialogForm2" data-backdrop="static" tabindex="-1" role="dialog">
            <div class="modal-dialog" role="document">
                <div class="modal-content">
                    <div class="modal-header">
                        <h5 class="modal-title btn-text-danger">Bizimle İletişime Geçin</h5>
                    </div>
                    <div class="modal-body">
                        
<div class="form-group boxed">
                        <div class="input-wrapper">
                            <label class="label" for="address5">Mesajınızı Girin:</label>
                            <textarea id="iletisimAciklama" rows="2" class="form-control"></textarea>
                            <i class="clear-input">
                                <ion-icon name="close-circle" role="img" class="md hydrated" aria-label="close circle"></ion-icon>
                            </i>
                        </div>

                    </div>
                   <!--  <br />
                        <center>Mail Adresimiz: <strong>hupto@yandex.com</strong></center> -->
                    </div>
                    <div class="modal-footer">
                        <div class="btn-inline">
                            <a href="component-dialog.html#" class="btn btn-text-secondary" data-dismiss="modal">Vazgeç</a>
                            <a onclick="iletisimGonder(<?=$user_id?>)" href="component-dialog.html#" class="btn btn-text-primary" data-dismiss="modal">Gönder</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
<!-- SİKAYET MODAL -->


<div id="toast-gonderildi" class="toast-box toast-center">
            <div class="in">
               <ion-icon name="checkmark-circle" class="text-success"></ion-icon>
                <div class="text">
                  Mesajınız bize ulaştı. <br><br> En kısa sürede "<b><?=$myUser['user_email']?></b>" mail adresinize dönüş yapılacaktır.
                </div>
            </div>
        </div>


        <div id="toast-hata" class="toast-box toast-center">
            <div class="in">
               <ion-icon name="close-outline" class="text-danger"></ion-icon>
                <div class="text">
                  Mesajınız çok kısa. <br><br> Lütfen daha detaylı bir mesaj yazınız.
                </div>
            </div>
        </div>



    <!-- App Sidebar -->
    <div class="modal fade panelbox panelbox-left" id="sidebarPanel" tabindex="-1" role="dialog">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-body p-0">

                    <!-- profile box -->
                    <div class="profileBox">
                        <div class="image-wrapper">
                            <img src="<?=$myUser['user_picture']?>" alt="image" class="imaged rounded myResim">
                        </div>
                        <div class="in">
                            <strong><?=$myUser['user_fullname']?></strong>
                            <div class="text-muted">
                                <ion-icon name="location"></ion-icon>
                               <?=$myUser['user_sehir']?>
                            </div>
                        </div>
                        <a href="javascript:;" class="close-sidebar-button" data-dismiss="modal">
                            <ion-icon name="close"></ion-icon>
                        </a>
                    </div>
                    <!-- * profile box -->

                    <ul class="listview flush transparent no-line image-listview mt-2">
                        <li>
                <div class="item">
                    <div class="icon-box bg-warning">
                        <ion-icon name="aperture-outline" role="img" class="md hydrated" aria-label="image outline"></ion-icon>
                    </div>
                    <div class="in">
                        <div>Jeton Sayısı</div>
                        <span class="badge badge-warning jetonSayi"><?=$myUser['user_jeton']?></span>
                    </div>
                </div>
                        </li>

                        <li>
                <div class="item">
                    <div class="icon-box bg-danger">
                        <ion-icon name="heart-outline" role="img" class="md hydrated" aria-label="image outline"></ion-icon>
                    </div>
                    <div class="in">
                        <?php 
                            $today = strtotime('today');
    $tomorrow = strtotime('+1 day', $today);
    $bugunBegeni = $db->query("SELECT COUNT(*) FROM begeniler where begenen_id = '{$user_id}' AND zaman >= $today AND zaman <= $tomorrow")->fetchColumn();

    $jetonSayi = $myUser['user_jeton'];

if($jetonSayi>5){
    $begeni_limit = 50;
}else{
    $begeni_limit = 10;
}

    ?>
                        <div>Günlük Beğeni Hakkı</div>
                        <span class="badge badge-danger jetonSayi"><?=$begeni_limit-$bugunBegeni?></span>
                    </div>
                </div>
                        </li>

                                                <li>
                            <a href="javascript:void(0);" data-toggle="modal" data-target="#jetonPaketleri" data-dismiss="modal" class="item">
                                <div class="icon-box bg-success">
                                    <ion-icon name="storefront-outline"></ion-icon>
                                </div>
                                <div class="in">
                                    Jeton Marketi
                                </div>
                            </a>
                        </li>
<!--                         <li>
                            <a href="app-components.html" class="item">
                                <div class="icon-box bg-info">
                                    <ion-icon name="color-filter-outline"></ion-icon>
                                </div>
                                <div class="in">
                                    Eşleşme Filtresi
                                </div>
                            </a>
                        </li> -->
                        
                        


<li>
                            <a href="javascript:void(0);" data-toggle="modal" data-target="#ModalBasic" data-dismiss="modal" class="item">
                                <div class="icon-box bg-info">
                                    <ion-icon name="eye-outline"></ion-icon>
                                </div>
                                <div class="in">
                                    <div>Ziyaretçileriniz</div>
                                </div>
                            </a>
                        </li>

                        <li>
                            <a href="javascript:void(0);" data-toggle="modal" data-target="#ModalListviewx" data-dismiss="modal" class="item">
                                <div class="icon-box bg-danger">
                                    <ion-icon name="earth-outline"></ion-icon>
                                </div>
                                <div class="in">
                                    <div>Sizi Beğenenler</div>
                                </div>
                            </a>
                        </li>
                        <li>
                            <div class="item">
                                <div class="icon-box bg-success">
                                    <ion-icon name="notifications-outline"></ion-icon>
                                </div>
                                <div class="in" onclick="bildirimAyar();">
                                   
<?php 

$bildirimim = strpos($myUser['user_onesignal'], "#");

if($bildirimim === false){
    $val1 = "1";
    $chck = "checked";
    $ackapa = "Açık";
}else{
    $val1 = "0";
    $chck = "";
    $ackapa = "Kapalı";
}

?>
 <div>Bildirimler <c id="ackapa"><?=$ackapa?></c></div>

                                    <div class="custom-control custom-switch">
                                        <input type="checkbox" class="custom-control-input"
                                            id="bildirimCheck" value="<?=$val1?>" <?=$chck?>>
                                        <label class="custom-control-label"></label>
                                    </div>
                                </div>
                            </div>
                        </li>
                        <li>
                            <div class="item">
                                <div class="icon-box bg-dark">
                                    <ion-icon name="moon-outline"></ion-icon>
                                </div>
                                <div class="in">
                                    <div>Karanlık Mod</div>
                                    <div class="custom-control custom-switch">
                                        <input type="checkbox" class="custom-control-input dark-mode-switch"
                                            id="darkmodesidebar">
                                        <label class="custom-control-label" for="darkmodesidebar"></label>
                                    </div>
                                </div>
                            </div>
                        </li>


                        <li>
                            <a href="javascript:void(0)" onclick="menuGizle();" data-toggle="modal" data-target="#DialogForm2" class="item">
                                <div class="icon-box bg-primary">
                                    <ion-icon name="mail-outline"></ion-icon>
                                </div>
                                <div class="in">
                                    <div>Bizimle İletişim'e Geç</div>
                                  <!--   <span class="badge badge-danger"></span> -->
                                </div>
                            </a>
                        </li>


<!--                         <li>
                            <a href="https://hupto.cntapi.com/profil.php?id=942197" class="item">
                                <div class="icon-box bg-danger">
                                    <ion-icon name="happy-outline"></ion-icon>
                                </div>
                                <div class="in">
                                    <div>Yönetici Profili</div>
                                </div>
                            </a>
                        </li> -->

                        <li>
                            <a href="https://app.heysen.net/privacy_policy_heysen.html" class="item">
                                <div class="icon-box bg-primary">
                                    <ion-icon name="finger-print-outline"></ion-icon>
                                </div>
                                <div class="in">
                                    <div>Gizlilik Sözleşmesi</div>
                                  <!--   <span class="badge badge-danger"></span> -->
                                </div>
                            </a>
                        </li>


                    </ul>



                </div>

                <!-- sidebar buttons -->
                <!-- <div class="sidebar-buttons">
                    <a href="javascript:;" class="button">
                        <ion-icon name="person-outline"></ion-icon>
                    </a>
                    <a href="javascript:;" class="button">
                        <ion-icon name="archive-outline"></ion-icon>
                    </a>
                    <a href="javascript:;" class="button">
                        <ion-icon name="settings-outline"></ion-icon>
                    </a>
                    <a href="javascript:;" class="button">
                        <ion-icon name="log-out-outline"></ion-icon>
                    </a>
                </div> -->
                <!-- * sidebar buttons -->
            </div>
        </div>
    </div>
    <!-- * App Sidebar -->
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-110488191-5"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-110488191-5');
</script>








    <!-- ///////////// Js Files ////////////////////  -->
    <!-- Jquery -->
    <script src="assets/js/lib/jquery-3.4.1.min.js"></script>
 <!-- Ionicons -->
<!-- <script type="module" src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.js"></script> -->

<script type="module" src="https://cdnjs.cloudflare.com/ajax/libs/ionicons/5.5.2/ionicons/ionicons.esm.js"></script>
<script nomodule src="https://cdnjs.cloudflare.com/ajax/libs/ionicons/5.5.2/ionicons/ionicons.js"></script>

<!-- <script src="https://kit.fontawesome.com/6d748ebdb5.js" crossorigin="anonymous"></script> -->

    <!-- Bootstrap-->
    <script src="assets/js/lib/popper.min.js"></script>
    <script src="assets/js/lib/bootstrap.min.js"></script>
    
    <!-- Owl Carousel -->
    <script src="assets/js/plugins/owl-carousel/owl.carousel.min.js"></script>
    <!-- jQuery Circle Progress -->
    <script src="assets/js/plugins/jquery-circle-progress/circle-progress.min.js"></script>
    <!-- Base Js File -->
    <script src="assets/js/base.js"></script>


<script src="https://www.gstatic.com/firebasejs/8.2.1/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.2.1/firebase-analytics.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/firebase/8.2.1/firebase-database.min.js"></script>





<script type="text/javascript">

  var firebaseConfig = {
   apiKey: "AIzaSyAX6glbRFOQ7IS-k9VPx6eeum-fvBtXdrk",
    authDomain: "hupvo-app-b2674.firebaseapp.com",
    projectId: "hupvo-app-b2674",
    storageBucket: "hupvo-app-b2674.appspot.com",
    messagingSenderId: "968466563284",
    appId: "1:968466563284:web:67387d40a67294f736bb41"
  };
  // Initialize Firebase
  firebase.initializeApp(firebaseConfig);
  firebase.analytics();


// firebase'e insert ediyoruz
function aramaGonder(gonderici_id, user_id, icerik) {

    const database = firebase.database();
    const ref = database.ref('aramalar');

    var sezerref = ref.child("arama_" + user_id);
    var x = sezerref.set({
        gonderici: gonderici_id,
        alici: user_id,
        msj: icerik
    });

    var useridx = parseInt(user_id);
    var gondericiidx = parseInt(gonderici_id);

    
    setTimeout(function() {
        sezerref.remove();
    }, 500);

}




function gelenArama(alici_id) { // firebase çekme işlemi de burda

    const database = firebase.database();
    ref = database.ref('aramalar');
    ref.on("value", function(snap) {

        if (snap.val()) {

            var msj_id = "arama_" + alici_id;

            var yollayan = snap.val()[msj_id].gonderici;
            var alan = snap.val()[msj_id].alici;
            var mesaj = snap.val()[msj_id].msj;

            var cankat = msj_id + " ARAMA = " + yollayan + " BOTUNDAN " + alan + " KULLANICISINA GİDEN " + mesaj;
            aramaPenceresi(yollayan,alan);

//firebase.database().ref('aramalar').off()

        }
    })
}





function aramaPenceresi(u_from, u_to){

  $("#aramaDialog, #garamaDialog").modal("hide");


    var url = "assets/api.php";
    var bilgi = {
      type: 'callapi',
      userid: u_from
    }
    $.post(url,bilgi,function(response) {
      var json = JSON.parse(response);




var aramaEkrani = '<div class="modal fade dialogbox" id="garamaDialog" data-backdrop="static" tabindex="-1" role="dialog" aria-modal="true" style="display: block;"> <div class="modal-dialog" role="document"> <div class="modal-content" style="background: #3e4651; display: contents;"> <div class="Cards"> <div class="Card js-card"> <div class="Card-image"> <div class="Card-imageCallEffect"></div> <div class="Card-imageCallEffect"></div> <div class="Card-imageCallEffect"></div> <div class="Card-imageContent"> <img src="'+json.resim+'"> </div> </div> <div class="Card-content mt-2"> <h3 class="js-callDetail">Gelen Sesli Arama</h3> <h2>'+json.isim+'</h2> <p> <span class="js-callInfo">Yaş: '+json.yas+' = <?=$myUser['user_sehir']?></span> </p> </div> <div class="Card-actions"> <div class="Card-action js-decline"> <div class="Card-actionButton Card-actionButton--decline" onclick="decline1()"> <i class="material-icons">close</i> </div> <p>Reddet</p> </div> <div class="Card-action js-accept"> <div class="Card-actionButton Card-actionButton--accept" onclick="accept1()"> <i class="material-icons">done</i> </div> <p>Kabul Et</p> </div> </div> </div> </div> </div> </div> </div>';


$("#gelenAramalar").html(aramaEkrani);

$("#garamaDialog").modal("show");
      
      setTimeout(function(){ 
decline1();
 }, 30000);


   })


}

$( document ).ready(function() {

<?php 
if($myUser['user_call']==0 AND $myUser['user_aramaizin']==1 AND $myUser['user_cinsiyet']=="erkek"){ ?>
   gelenArama(<?=$myUser['user_id']?>);
  
<?php } ?>

});


  function decline1() {
$("#garamaDialog").modal("hide");
  }

  function accept1() {

$("#garamaDialog").modal("hide");
$("#arama_kilit").modal("show");

  }

function buyJeton2(value){
        Android.javaFuncs(value+"-"+"<?=$myUser['user_id']?>")
      }

</script>

  <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
  <link rel="stylesheet" href="assets/call/style.css">
<!--     <script  src="assets/call/script.js"></script> -->
<div id="gelenAramalar">
</div>

        <!-- Dialog Iconed Inline -->
        <div class="modal fade dialogbox" id="arama_kilit" data-backdrop="static" tabindex="-1"
            role="dialog">
            <div class="modal-dialog" role="document">
                <div class="modal-content">
                     <div class="modal-icon text-danger">
                        <ion-icon name="volume-mute-outline"></ion-icon>
                    </div>
                    <div class="modal-header">
                        <h5 class="modal-title">Aramalar Kilitli!</h5>
                    </div>
                    <div class="modal-body">
                        HeySen içerisinde dilediğiniz gibi arama yapıp sesli görüşebilmek için arama kilidini kaldırın!
                    </div>
                    <div class="modal-footer">
                        <div class="btn-inline">
                            <a onclick="buyJeton2('callunlock');" href="javascript:void(0)" class="btn btn-text-success" data-dismiss="modal">
                                <ion-icon name="lock-open-outline"></ion-icon>
                                Kilidi Aç
                            </a>
                            <a href="component-dialog.html#" class="btn btn-text-secondary" data-dismiss="modal">
                                <ion-icon name="hourglass-outline"></ion-icon>
                                Sonra
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- * Dialog Iconed Inline -->




</body>

</html>