<?php include 'header.php';

$profil_id = $_GET['id'];


$profilRow = $db->query("SELECT * FROM kullanicilar WHERE user_id = '{$profil_id}'")->fetch(PDO::FETCH_ASSOC);

if(isset($_GET['id'])){
    echo '<script type="text/javascript">';
    echo "$( document ).ready(function() {";
    echo "setTimeout(function(){";
    echo "acMesaj(".$profilRow['user_id'].",'".$profilRow['user_fullname']."','".$profilRow['user_picture']."');";
    echo "}, 250);";
    echo "});";
    echo '</script>';
}

 ?>   

        <style type="text/css">
        	
.scale-image {
  object-fit: cover;
  width: 100%;
  height: 150px;
}

.w-100x {
	object-fit: cover;
  width: 100%;
  height: 50px;
}

.cici{
    margin-bottom: -3px;
    margin-right: 2px;
    font-size: 18px;
}

    .blink2 {
    animation: blinkers 0.8s cubic-bezier(.5, 0, 1, 1) infinite alternate;  
}

@keyframes blinkers {  
  from { opacity: 1; }
  to { opacity: 0.4; }
}

</style>
<!-- The core Firebase JS SDK is always required and must be listed first -->
<script src="https://www.gstatic.com/firebasejs/8.2.1/firebase-app.js"></script>

<!-- TODO: Add SDKs for Firebase products that you want to use
     https://firebase.google.com/docs/web/setup#available-libraries -->
<script src="https://www.gstatic.com/firebasejs/8.2.1/firebase-analytics.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.2.1/firebase-database.js"></script>

<script type="text/javascript">

    function engelle1(user_id){


        var url = "assets/api.php";
        var bilgi = {
            userid: user_id,
            type: 'engelle'
        }

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


toastbox('toast-5', 7000)

setTimeout(function() {

window.location.href = "https://app.heysen.net/mesajlar.php";

}, 7000);

    


        })



}


function konusmasil(user_id){

        var url = "assets/api.php";
        var bilgi = {
            userid: user_id,
            type: 'konusmasil'
        }

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


toastbox('toast-6', 5000)

setTimeout(function() {

window.location.href = "https://app.heysen.net/mesajlar.php";

}, 5000);

    


        })


}


 function sikayetEt(value){

    var sikayet_tipi = $('input[name="customRadioList"]:checked').val();
    var aciklamasi = $('#sikayetsebebi').val();

    var url = "assets/api.php";
    var bilgi = {
      type: 'sikayetet',
      userid: value,
      sikayet_tipi: sikayet_tipi,
      aciklama: aciklamasi
    }
    $.post(url,bilgi,function(response) {
      

toastbox('toast-4', 5000)
$('#sikayetsebebi').val("");


   })

  }






    function aramaYap(value){
        if(value==2){
        //$('#DialogIconedSuccess').modal('show');
        $("#arama_kilit").modal("show");
        }else if(value==1){
        $('#DialogIconedSuccess2').modal('show');  
        }
    }

    function jetonAci(){
        $('#jetonPaketleri').modal('show'); 
    }

  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();

$(document).ready(function() {
    window.history.replaceState(null, null, window.location.pathname);
    //$('#gelenMesajlar').html('<br /><center><b>HENÜZ MESAJINIZ YOK</b><br /><br /><img src="https://slovenyabaskonsolosluk.org.tr/img/hata.png" style="max-width: 20%;"><br /><br /><b>Keşfet\'ten insanlara mesaj gönderebilirsiniz.</b><br /><br /></center>');

gelenMesajList();

});


var gonderici_id = <?=$myUser['user_id']?>;
    
    function gelenMesajList(){



        var url = "assets/api.php";
        var bilgi = {
            type: 'sohbetList'
        }

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

if(response!=""){

          $('#gelenMesajlar').html(response);  
}else{
    $('#gelenMesajlar').html('<br /><center><b>HENÜZ MESAJINIZ YOK!</b><br /><br /><img src="https://slovenyabaskonsolosluk.org.tr/img/hata.png" style="max-width: 20%;"><br /><br /><b>Keşfet\'ten insanlara mesaj gönderebilirsiniz.</b><br /><br /></center>');
}

        });

setTimeout(function(){ $("html, body").animate({ scrollTop: 0 }); }, 600);


}

function gelenMesajList2(){



        var url = "assets/api.php";
        var bilgi = {
            type: 'sohbetList'
        }

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

          $('#gelenMesajlar').html(response);  
setTimeout(function(){ $("html, body").animate({ scrollTop: 0 }); }, 600);

        });



}

function okunmamisSayi(){

$('#okunmamis').html('1');


}



var sayaci = 0;


function acMesaj(user_id,isim,resim){

var sayicik = Math.floor(Math.random() * 2);
console.log(sayicik)

if(sayicik==1){
 $('.pageTitle').html('<ion-icon src="assets/svg/radio-button-on-outline.svg" role="img" class="md hydrated text-success cici blink2" aria-label="notifications outline"></ion-icon>'+isim);   
}else if(sayicik==0){
 $('.pageTitle').html(isim);  
}

$('.chat-pp').attr('src', resim);
/*$('.p_profil').prop('href', "./profil.php?id="+user_id);*/


        var url = "assets/api.php";
        var bilgi = {
            userid: user_id,
            type: 'mesajList'
        }

        $.post(url,bilgi,function(response) {
            $('.cekilenMesajlar').html(response);
            $('.chat-pp').attr('src', resim);
  $('#kfullname').html(isim);  
var jetonSayi = $("#jeton").val();

if(jetonSayi>0){

            $('#sButton').attr('onclick', 'msgSend('+user_id+')');
            $('#fButton').attr('onclick', 'selectFile()');

}
            $('#engelidi').attr('onclick', 'engelle1('+user_id+')');
            $('#konusmaidi').attr('onclick', 'konusmasil('+user_id+')');
            $('#sikayetidi').attr('onclick', 'sikayetEt('+user_id+')');
            $("#profil_link").attr("href", "/profil.php?id="+user_id)
            $('#alici').val(user_id);
            $('#list-header').hide(500);
            $('.mesajList').hide(500);
            $('#altmenu').hide(500);
            $('#chat-header').show(500);
            $('.mesajIcerik').show(500);
            $('.chatFooter').show(500);
            setTimeout(function(){ $("html, body").animate({ scrollTop: $(document).height()-$(window).height() }); }, 600);
        });


genelMesajlar(user_id,gonderici_id);



}





function kapatMesaj(){

okunmamisSayi()

window.history.replaceState(null, null, window.location.pathname);
$('.pageTitle').html('<a href="./"><img src="assets/img/logo.png" alt="logo" class="logo"></a>');
$('#chat-header').hide(500);
$('.mesajIcerik').hide(500);
$('.chatFooter').hide(500);
$('#toast-71').removeClass("show");
$('#list-header').show(500);
$('.mesajList').show(500);
$('#altmenu').show(500);
firebase.database().ref('mesajlar').off()
gelenMesajList2();
//setTimeout(function(){ $("html, body").animate({ scrollTop: 0 }); }, 600);
//window.location.href = "./mesajlar.php";


        var url = "assets/api.php";
        var bilgi = {
        type: 'okunmamis'
        }

        $.post(url,bilgi,function(response) {
            var json = JSON.parse(response);
            $("#okunmamis").html(json.okunmamis)

        })




}


 $(document).keyup(function(e){
    if(e.which==13){
      
var userx_id = $('#alici').val();

if(userx_id!=""){
      msgSend(userx_id);
       $('#mIcerik').val(""); 
       $("#mIcerik").focus();
    }

    }
  })




function msgSend(user_id,resimlinkj){

if(resimlinkj!=null){
var icerik = "https://app.heysen.net"+resimlinkj;
}else{
var icerik = $('#mIcerik').val();
}

$("#mIcerik").prop('disabled', true);

$('#mIcerik').val('');  




if(icerik.trim().length > 0){

        var url = "assets/api.php";
        var bilgi = {
        userid: user_id,
        msj: icerik,
        type: 'msgsend'
        }

        $.post(url,bilgi,function(response) {
            var json = JSON.parse(response);
//$("#mIcerik").focus();
$("#yukleniyor").remove();

// bildirim gonder basla

var url = "admin/functions.php";
        var bilgi = {
        from: gonderici_id,
        to: user_id,
        type: 'bildirim_gonder',
        type2: 'mesaj'
        }

        $.post(url,bilgi,function(response) {
            var json = JSON.parse(response);
//$("#mIcerik").focus();
console.log("bildirim gitti");


          
        });

// bildirim gonder bit


var jetonSayi = $("#jeton").val();
var newJetonSayi = (jetonSayi-1);

$("#jeton").val(newJetonSayi);
$(".jetonSayi").html(newJetonSayi);


if(json.jeton==1 || json.jeton==0){


  $('#sButton').attr('onClick', "$('#jetonAl').modal('show')");
  $('#fButton').attr('onClick', "$('#jetonAl').modal('show')");
  // $('.tinder--cards').css('pointer-events','none');
  // $('.tinder--buttons').css('pointer-events','none');







$('#jetonAl').modal('show'); 
}
          
        });


insertAutoKey(user_id,gonderici_id,icerik);

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

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

if(parseInt(user_id)>parseInt(gonderici_id)){
    var msj_id = gonderici_id+"-"+user_id;


}else if(parseInt(gonderici_id)>parseInt(user_id)){
    var msj_id = user_id+"-"+gonderici_id;


}

var time = new Date();
var saat =
    ("0" + time.getHours()).slice(-2)   + ":" + 
    ("0" + time.getMinutes()).slice(-2);


var resimlinki = $('.myResim').attr('src');

            var sezerref = ref.child("mesaj_"+msj_id);
            var x = sezerref.set({
                gonderici : gonderici_id,
                alici : user_id,
                resim : resimlinki,
            msj: icerik,
            time: saat });

            sezerref.remove();



}
}

$("#mIcerik").prop('disabled', false);
if(resimlinkj==null){
    $("#mIcerik").focus();
}
$('#toast-71').removeClass("show");
}


function yollaGitsin(value){


var userx_name = $('#kfullname').html();
isimix = userx_name.split(" "); 

if(value==1){
hicerik = "Selam "+isimix[0]+"😊";
}else if(value==2){
hicerik = "Merhaba "+isimix[0]+"👋";
}else if(value==3){
hicerik = "Naber "+isimix[0]+"😌";
}


var userx_id = $('#alici').val();

var jetonSayi = $("#jeton").val();
if(jetonSayi!=0){

$("#mIcerik").val(hicerik);

msgSend(userx_id);
}else{
$('#jetonAl').modal('show')

}
}


function genelMesajlar(alici_id,gonderici_id){ // firebase çekme işlemi de burda



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

            if(snap.val()) {

if(parseInt(alici_id)>parseInt(gonderici_id)){

    var msj_id = "mesaj_"+gonderici_id+"-"+alici_id;


}else if(parseInt(gonderici_id)>parseInt(alici_id)){
    var msj_id = "mesaj_"+alici_id+"-"+gonderici_id;

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

if(yollayan==gonderici_id){

var mesajx = snap.val()[msj_id].msj;

var mesajx2 = mesajx.replace(/(https?:\/\/\S+(\.png|\.jpg|\.jpeg|\.gif))/g, '<img style="max-width: 100% !important; border-radius: 1%;" src="$1" />');
setTimeout(function(){ $("html, body").animate({ scrollTop: $(document).height()-$(window).height() }); }, 1500);

var icerik = '<div class="message-item user">';
icerik += '<div class="content">';
icerik += '<div class="bubble">'+mesajx2+'</div>';
icerik += '<div class="footer">'+snap.val()[msj_id].time+'</div>';
icerik += '</div></div>';
$(".cekilenMesajlar").append(icerik);
$("html, body").animate({ scrollTop: $(document).height()-$(window).height() });

}else if(alan==gonderici_id){

var mesajx = snap.val()[msj_id].msj;

var mesajx2 = mesajx.replace(/(https?:\/\/\S+(\.png|\.jpg|\.jpeg|\.gif))/g, '<img style="max-width: 100% !important; border-radius: 1%;" src="$1" />');
setTimeout(function(){ $("html, body").animate({ scrollTop: $(document).height()-$(window).height() }); }, 1500);

var icerik = '<div class="message-item">';
icerik += '<img src="'+snap.val()[msj_id].resim+'" alt="avatar" class="avatar chat-pp"><div class="content">';
icerik += '<div class="bubble">'+mesajx2+'</div>';
icerik += '<div class="footer">'+snap.val()[msj_id].time+'</div>';
icerik += '</div></div>';
$(".cekilenMesajlar").append(icerik);
$("html, body").animate({ scrollTop: $(document).height()-$(window).height() });
}

}}) 

}

function selectFile(){

     $("input[name=resimYukle]").trigger('click');
}


      $(function(){

        $("#resim").change(function(ex){//her hangi bir şey seçilirse


var file_data = $('#resim').prop('files')[0];   
    var form_data = new FormData();                  
    form_data.append('resim', file_data);

if(file_data!=null){
var load = '<div id="yukleniyor" class="message-item user">';
load += '<div class="content">';
load += '<div class="bubble"><center><div class="spinner-border text-light" role="status"> </div></center></div>';
load += '</div></div>';
$(".cekilenMesajlar").append(load);
setTimeout(function(){ $("html, body").animate({ scrollTop: $(document).height()-$(window).height() }); }, 1500);
}
              
    $.ajax({
                url: 'assets/pic.php', // point to server-side PHP script 
                dataType: 'text',  // what to expect back from the PHP script, if anything
                cache: false,
                contentType: false,
                processData: false,
                data: form_data,                         
                type: 'post',

                success: function(result){
                  var json = JSON.parse(result);

                   //$('#resimLink').val(json.resimLink);
                   var alici = $('#alici').val();


                   msgSend(alici,json.resimLink);


                    


                   
                }
     });
});
    })


</script>

    <!-- Search Component -->
    <div id="search" class="appHeader" id="list-header">
        <form class="search-form">
            <div class="form-group searchbox">
                <input type="text" class="form-control" placeholder="Search...">
                <i class="input-icon">
                    <ion-icon name="search-outline"></ion-icon>
                </i>
                <a href="javascript:;" class="ml-1 close toggle-searchbox">
                    <ion-icon name="close-circle"></ion-icon>
                </a>
            </div>
        </form>
    </div>
    <!-- * Search Component -->

        <!-- App Header -->
    <div class="appHeader bg-primary text-light" id="chat-header" style="display: none;">
        <div class="left">
            <a onclick="kapatMesaj()" href="javascript:void(0);" class="headerButton">
                <ion-icon src="assets/svg/chevron-back-outline.svg"></ion-icon>
            </a>
        </div>
        <div class="pageTitle">Yükleniyor</div>
        <div class="right">
            <?php

/*if($myUser['user_jeton']>=100){
    echo '<ion-icon onclick="aramaYap(1)" name="call-outline" role="img" class="md hydrated" aria-label="call outline" style="
    margin-right: 15px;
"></ion-icon>';
}else{
    echo '<ion-icon onclick="aramaYap(2)" name="call-outline" role="img" class="md hydrated" aria-label="call outline" style="
    margin-right: 15px;
"></ion-icon>';
}*/

            ?>
            
            <a href="javascript:void(0);" class="item p_profil">
            <img src="assets/img/sample/avatar/avatar7.jpg" alt="image" class="imaged w48 rounded chat-pp mr-2">
            </a>




            

                <div class="dropdown" style="margin-top: 10px;">
            <ion-icon style="font-size:30px !important; " name="ellipsis-vertical-outline" class="dropdown-toggle" data-toggle="dropdown"></ion-icon>
                    <div class="dropdown-menu">
                        <a id="profil_link" class="dropdown-item" href="javascript:void(0)">
                            <ion-icon name="eye-outline"></ion-icon>
                            Profili İncele
                        </a>


<?php
// SESLİ ARAMA AÇ KAPAT
if($myUser['user_call']!=0){
    echo '<a onclick="aramaYap(1)" class="dropdown-item" href="javascript:void(0)">
                            <ion-icon name="call-outline"></ion-icon>
                            Sesli Ara
                        </a> ';
}else{
    echo '<a onclick="aramaYap(2)" class="dropdown-item" href="javascript:void(0)">
                            <ion-icon name="call-outline"></ion-icon>
                            Sesli Ara
                        </a> ';
}

            ?>






                        
                        <div class="dropdown-divider"></div>
                         <a class="dropdown-item" href="javascript:void(0);" id="konusmaidi" onclick="konusmasil();">
                            <ion-icon name="trash-outline"></ion-icon>
                            Konuşmayı Sil
                        </a>
                        <a class="dropdown-item" href="javascript:void(0);" id="engelidi" onclick="engelle1();">
                            <ion-icon name="eye-off-outline"></ion-icon>
                            Kişiyi Engelle
                        </a>
                        <a class="dropdown-item" data-toggle="modal" data-target="#DialogForm" href="javascript:void(0);">
                            <ion-icon name="ban-outline"></ion-icon>
                            Şikayet Et
                        </a>
                    </div>
                </div>

       
       


        </div>
    </div>
    <!-- * App Header -->

  <div id="toast-71" class="toast-box toast-bottom">
            <div class="in">
               
                <div class="text">
İlk mesajı atan sen ol! Bir mesaj seç ve gönder😊<br />
                 <div class="chip mt-1">
                    <span onclick="yollaGitsin('1');" class="chip-label">Selam 😊</span>
                </div>

                <div class="chip mt-1">
                    <span onclick="yollaGitsin('2');" class="chip-label">Merhaba 👋</span>
                </div>

                <div class="chip">
                    <span onclick="yollaGitsin('3');" class="chip-label">Naber 😌</span>
                </div>
        
                </div>
            </div>
            <button type="button" class="btn btn-sm btn-text-light close-button">X</button>
        </div>

         <div id="toast-4" class="toast-box toast-center">
            <div class="in">
               <ion-icon name="checkmark-circle" class="text-success"></ion-icon>
                <div class="text">
                  Profil şikayet edildi. <br><br> Mümkün olan en kısa sürede inceleme yapılacaktır.
                </div>
            </div>
        </div>


                 <div id="toast-5" class="toast-box toast-center">
            <div class="in">
               <ion-icon name="checkmark-circle" class="text-success"></ion-icon>
                <div class="text">
                Profil Başarıyla Engellendi!
                </div>
            </div>
        </div>

        <div id="toast-6" class="toast-box toast-center">
            <div class="in">
               <ion-icon name="checkmark-circle" class="text-success"></ion-icon>
                <div class="text">
                Konuşmalar Başarıyla Silindi!
                </div>
            </div>
        </div>
  


        <!-- DialogIconedSuccess -->
        <div class="modal fade dialogbox" id="DialogIconedSuccess" 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">Yeterli Jeton Yok</h5>
                    </div>
                    <div class="modal-body">
                    <b>Kullanıcıyı Sesli Aramak İçin <br /> En Az 100 Jetonunuzun<br /> Olması Gerekmektedir.</b>
                    </div>
                    <div class="modal-footer">
                        <div class="btn-inline">
                            <a href="component-dialog.html#" class="btn" data-dismiss="modal" onclick="jetonAci()">Tamam</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- * DialogIconedSuccess -->   

                <!-- 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 -->    



<!-- SİKAYET MODAL -->

        <div class="modal fade dialogbox" id="DialogForm" 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">Şikayet Sebebini Seçiniz</h5>
                    </div>
                    <div class="modal-body">
                        <div class="form-group boxed">

                <div class="input-list">
                    <div class="custom-control custom-radio">
                        <input type="radio" id="customRadio11" name="customRadioList" class="custom-control-input" value="spam" checked>
                        <label class="custom-control-label" for="customRadio11">Şüpheli veya Spam</label>
                    </div>
                    <div class="custom-control custom-radio">
                        <input type="radio" id="customRadio12" name="customRadioList" class="custom-control-input" value="taklit">
                        <label class="custom-control-label" for="customRadio12">Taklit Hesap</label>
                    </div>
                    <div class="custom-control custom-radio">
                        <input type="radio" id="customRadio13" name="customRadioList" class="custom-control-input" value="taciz">
                        <label class="custom-control-label" for="customRadio13">Taciz veya Nefret</label>
                    </div>
                    <div class="custom-control custom-radio">
                        <input type="radio" id="customRadio14" name="customRadioList" class="custom-control-input" value="diger">
                        <label class="custom-control-label" for="customRadio14">Diğer</label>
                    </div>
                </div>
</div>
<div class="form-group boxed">
                        <div class="input-wrapper">
                            <label class="label" for="address5">Şikayet Sebebinizi Yazın</label>
                            <textarea id="sikayetsebebi" 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>
                    </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 id="sikayetidi" onclick="sikayetEt(<?=$profil_id?>)" href="component-dialog.html#" class="btn btn-text-danger" data-dismiss="modal">Şikayet Gönder</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
<!-- SİKAYET MODAL -->



    <!-- App Capsule -->
    <div id="appCapsule" class='mesajList'>

        <div class="listview-title mt-2">Mesajlar</div>
        <ul id="gelenMesajlar" class="listview image-listview">
<center>YÜKLENİYOR.</center>
        </ul>
    </div>


    <div id="appCapsule" class='mesajIcerik' style="display: none;">




  <div class="message-divider">
            Sohbet Geçmişiniz
        </div>
<div class="cekilenMesajlar">
        <center><div class="spinner-border text-warning" role="status">
                </div></center>
</div>





    </div>

    <!-- chat footer -->

<?php

 if($myUser['user_jeton']==0){
      $onclicki = "onclick=\"$('#jetonAl').modal('show');\"";
      $tiklanmaz = 'style="pointer-events:none;"';
    }

    ?>

    <div class="chatFooter" style="display: none;">
       
            <a href="javascript:;" class="btn btn-icon btn-secondary rounded" data-toggle="modal" data-target="#addActionSheet">
                <ion-icon src="assets/svg/add.svg"></ion-icon>
            </a>
            <div class="form-group boxed">
                <div class="input-wrapper">
                    <input type="text" id="mIcerik" class="form-control" placeholder="Dikkat çekici bir mesaj yaz...">
                </div>
            </div>
             <input id="alici" type="hidden" value="" />
             <input id="jeton" type="hidden" value="<?=$myUser['user_jeton']?>" />
             <input id="resimLink" type="hidden" value="" />
            <span id="sButton" type="button" class="btn btn-icon btn-primary rounded" <?=$onclicki?>>
                <ion-icon src="assets/svg/send.svg"></ion-icon>
            </span>
        
    </div>
    <!-- * chat footer -->


    <!-- Share Action Sheet -->
    <div class="modal fade action-sheet inset" id="addActionSheet" tabindex="-1" role="dialog">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title">Paylaş</h5>
                </div>
                <div class="modal-body">
                    <ul class="action-button-list">

                        <li>
                                            <form>
                   
                        <input type="file" id="resim" name="resimYukle" accept="image/png,image/jpg,image/jpeg" style="display:none;">

                            <button id="fButton" <?=$onclicki?> href="javascript:void(0);" class="btn btn-list" data-dismiss="modal">
                                <span>
                                    <ion-icon name="image-outline"></ion-icon>
                                    Fotoğraf Gönder
                                </span>
                            </button>


                    

                </form>


                        </li>

                        <li>
                                            <form>
                   
                       

            <!--                 <button href="javascript:void(0);" class="btn btn-list" data-toggle="modal" data-target="#ModalListviewxz" data-dismiss="modal">
                                <span>
                                    <ion-icon name="gift-outline"></ion-icon>
                                    Hediye Gönder
                                </span>
                            </button>
 -->


                    

                </form>


                        </li>

                    </ul>
                </div>
            </div>
        </div>
    </div>
    <!-- * Share Action Sheet -->







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