<?php 
// heysen - Clean Modern Design v2.0
include 'header.php';

$profil_id = $_GET['id'];

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

$profilBegeni = $db->query("SELECT COUNT(*) FROM begeniler where begenilen_id = '{$profil_id}'")->fetchColumn();

$seniBegenmisMi = $db->query("SELECT COUNT(*) FROM begeniler WHERE begenilen_id = '{$myUser['user_id']}' AND begenen_id = '{$profilRow['user_id']}'")->fetchColumn();

function username($string) {
$pattern = " ";
$turkish = array("ı", "ğ", "ü", "ş", "ö", "ç", "İ", "Ğ", "Ü", "Ş", "Ö", "Ç");
$english   = array("i", "g", "u", "s", "o", "c", "i", "g", "u", "s", "o", "c");
$firstPart = strstr(strtolower($string), $pattern, true);
$secondPart = strstr(strtolower($string), $pattern, false);
$firstPart = str_replace($turkish, $english, $firstPart);
$secondPart = str_replace($turkish, $english, $secondPart);
$nrRand = rand(0, 100);
$username = trim($firstPart).trim($secondPart).trim($nrRand);
return $username;
}

$isimsoyisimCek = explode(" ", $profilRow['user_fullname']);

if($profilRow['user_picture']=="assets/img/no-avatar.png"){
    if($profilRow['user_cinsiyet']=="kadin"){
        $profilRow['user_picture'] = "assets/img/k.png";
    }else if($profilRow['user_cinsiyet']=="erkek"){
        $profilRow['user_picture'] = "assets/img/e.png";
    }else{
        $profilRow['user_picture'] = $profilRow['user_picture'];
    }
}
?>   

<link rel='stylesheet' href='https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css'>

<style type="text/css">
/* 🎯 CLEAN & COMPACT MODERN DESIGN */

#appCapsule {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 70px 15px 100px 15px !important;
    min-height: 100vh;
}

/* Main Card */
.profile-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 25px 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    margin-bottom: 15px;
}

/* Profile Photo - Rounded Square */
.profile-photo {
    width: 200px;
    height: 200px;
    border-radius: 24px;
    margin: 0 auto 15px;
    border: 4px solid #fff;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.profile-photo:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 12px 35px rgba(0,0,0,0.3);
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.profile-photo:hover img {
    transform: scale(1.1);
}

/* Name & Location */
.profile-name {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    text-align: center;
    margin: 10px 0 5px;
}

.profile-location {
    font-size: 14px;
    color: #666;
    text-align: center;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.profile-info-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.profile-info-item i {
    color: #667eea;
}

.verified-icon {
    color: #1da1f2;
    margin-left: 5px;
}

/* Buttons - Modern Horizontal Layout */
.btn-grid {
    display: flex !important;
    flex-direction: row !important;
    gap: 8px;
    margin: 20px 0;
}

.btn-modern {
    flex: 1;
    padding: 14px 12px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    color: #fff;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.2);
    transition: left 0.4s ease;
}

.btn-modern:hover::before {
    left: 100%;
}

.btn-modern:hover {
    transform: translateX(3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.btn-modern:active {
    transform: translateX(1px);
}

.btn-modern i {
    font-size: 18px;
    flex-shrink: 0;
}

.btn-modern span {
    font-size: 13px;
    letter-spacing: 0.3px;
    font-weight: 600;
}

.btn-love {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.btn-message {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.btn-call {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.btn-icon-only {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    padding: 0;
    justify-content: center;
    border-radius: 14px;
}

.btn-icon-only i {
    font-size: 20px;
    margin: 0;
}

.btn-phone-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
}

/* Info Rows - Compact */
.info-row {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.info-row:hover {
    background: #e9ecef;
    transform: translateX(3px);
}

.info-icon-sm {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
    margin-right: 12px;
    flex-shrink: 0;
}

.info-content {
    flex: 1;
    min-width: 0;
}

.info-label {
    font-size: 12px;
    color: #999;
    margin-bottom: 2px;
    white-space: nowrap;
}

.info-text {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Contact Buttons - Professional Design */
.contact-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.contact-btn {
    background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(255,255,255,0.98));
    border-radius: 14px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid rgba(0,0,0,0.06);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
}

.contact-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s ease;
}

.contact-btn:hover::before {
    left: 100%;
}

.contact-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    border-color: rgba(102, 126, 234, 0.3);
}

.contact-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.contact-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.contact-label {
    font-size: 14px;
    color: #333;
    font-weight: 700;
    letter-spacing: 0.3px;
    line-height: 1.5;
    vertical-align: middle;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Bullet styling */
.bullet {
    font-size: 20px;
    vertical-align: middle;
    display: inline-block;
    line-height: 0;
    transform: translateY(-2px);
    letter-spacing: -2px;
}

.profile-name .bullet {
    font-size: 24px;
    vertical-align: middle;
    line-height: 0;
    transform: translateY(-3px);
    letter-spacing: -3px;
}

.contact-sublabel {
    font-size: 11px;
    color: #999;
    font-weight: 500;
}

.contact-badge {
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.3px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.contact-badge i {
    font-size: 14px;
}

.contact-btn:hover .contact-badge {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Section Title */
.section-title {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin: 20px 0 12px;
    padding-left: 5px;
    border-left: 4px solid #667eea;
}

/* Divider */
.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.1), transparent);
    margin: 20px 0 15px;
}

/* Info row centered */
.info-row-centered {
    justify-content: center;
    text-align: center;
}

/* Badge */
.badge-sm {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-success-sm {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.badge-danger-sm {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Action Buttons - Colorful Design */
.action-buttons-row {
    display: flex;
    gap: 8px;
    margin-top: 20px;
}

.btn-action {
    flex: 1;
    padding: 11px 14px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn-action::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.2);
    transition: left 0.4s ease;
}

.btn-action:hover::before {
    left: 100%;
}

.btn-action:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.btn-action:active {
    transform: translateY(-1px);
}

.btn-block {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
}

.btn-block.active {
    background: linear-gradient(135deg, #c92a2a 0%, #a61e2d 100%);
}

.btn-report {
    background: linear-gradient(135deg, #ffa94d 0%, #ff922b 100%);
}

.btn-report.disabled {
    background: linear-gradient(135deg, #868e96 0%, #6c757d 100%);
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-action i {
    font-size: 14px;
}

/* Alert */
.alert-danger-modern {
    background: linear-gradient(135deg, #f5576c 0%, #e43a5a 100%);
    color: #fff;
    padding: 12px 15px;
    border-radius: 12px;
    margin-bottom: 15px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.3);
    cursor: pointer;
}

/* Compact spacing */
.mb-compact { margin-bottom: 10px; }

/* 2-Column Grid for Info */
.info-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
}

.info-grid-full {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 15px 0;
}

.stat-box {
    background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0.1));
    padding: 12px 8px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.3);
}

.stat-num {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    display: block;
}

.stat-label {
    font-size: 11px;
    color: rgba(255,255,255,0.9);
    text-transform: uppercase;
    margin-top: 3px;
}

/* White transparent card */
.card-white {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    margin-bottom: 15px;
}

@media (max-width: 576px) {
    .btn-modern {
        padding: 12px 8px;
        font-size: 12px;
    }
    
    .btn-modern i {
        font-size: 16px;
    }
    
    .btn-modern span {
        font-size: 12px;
    }
    
    .btn-icon-only {
        width: 48px;
        height: 48px;
    }
    
    .btn-icon-only i {
        font-size: 18px;
    }
    
    .action-buttons-row {
        gap: 8px;
    }
    
    .btn-action {
        padding: 10px 12px;
        font-size: 12px;
    }
    
    .btn-action i {
        font-size: 13px;
    }
    
    .contact-btn {
        padding: 14px 15px;
    }
    
    .contact-icon {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
    
    .contact-label {
        font-size: 13px;
    }
    
    .contact-sublabel {
        font-size: 10px;
    }
    
    .contact-badge {
        padding: 7px 14px;
        font-size: 12px;
    }
    
    .contact-badge i {
        font-size: 13px;
    }
    
    .info-grid-2 {
        grid-template-columns: 1fr 1fr;
    }
}
</style>

<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) {
        $("#engelbuton").html('<i class="fa-solid fa-user-slash"></i> Engellendi');
        $("#engelbuton").addClass('active');
        toastbox('toast-5', 5000);
        setTimeout(function() {
            location.reload();
        }, 5000);
    })
}

function engelKaldir(value){
    var url = "assets/api.php";
    var bilgi = {
      type: 'engel_kaldir',
      userid: value
    }
    $.post(url,bilgi,function(response) {
        $("#engelkaldiri").remove();
        toastbox('toast-6', 5000);
        setTimeout(function() {
            location.reload();
        }, 3000);
   })
}

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);
        setTimeout(function() {
            location.reload();
        }, 5000);
   })
}
  
function begeniGonder2(value){
    var url = "assets/api.php";
    var bilgi = {
      type: 'begeni',
      begenilen_id: value
    }
    $.post(url,bilgi,function(response) {
      var json = JSON.parse(response);
      if(json.result==1){
        $("#user_"+value).html('<i class="fa-solid fa-check"></i><span>Beğendin</span>');
        $("#user_"+value).prop("onclick", null);
        console.log('begenildi');
      }else if(json.result==100){
        $('#bjetonAl').modal('show'); 
      }
   })
}

<?php 
if($seniBegenmisMi>0){ ?>
$(document).ready(function() {
    setTimeout(function(){ 
        $('#DialogIconedSuccess').modal('show');
    }, 1500);
});
<?php 
}
?>
</script>

<!-- App Capsule -->
<div id="appCapsule">

<?php 
$engelVarmi = $db->query("SELECT COUNT(*) FROM engellemeler where u_from = '{$myUser['user_id']}' AND u_to = '{$profil_id}'")->fetchColumn();
if($engelVarmi==1){
  echo '<div class="alert-danger-modern" id="engelkaldiri" onclick="engelKaldir('.$profil_id.')">
            <i class="fa-solid fa-user-large-slash mr-2"></i>
            KİŞİNİN ENGELİNİ KALDIRMAK İÇİN DOKUN!
        </div>';
}
?>

    <!-- Main Profile Card -->
    <div class="profile-card">
        
        <!-- Profile Photo -->
        <div class="profile-photo" data-toggle="modal" data-target="#DialogImage">
            <img src="<?=$profilRow['user_picture']?>" alt="avatar">
        </div>

        <!-- Name & Location -->
        <h4 class="profile-name">
            <?php
            $profileName = $profilRow['user_fullname'];
            if(strpos($profileName, '*') !== false) {
                $nameParts = explode('*', $profileName);
                echo $nameParts[0] . '<span class="bullet">' . str_repeat('●', substr_count($profileName, '*')) . '</span>';
            } else {
                echo $profileName;
            }
            ?> 
            <?php if ($profilRow['user_onay'] > 0): ?>
                <i class="fa-solid fa-check-circle verified-icon"></i>
            <?php endif; ?>
        </h4>
        <div class="profile-location">
            <div class="profile-info-item">
                <i class="fa-solid fa-location-dot"></i>
                <span><?=$myUser['user_sehir']?></span>
            </div>
            <div class="profile-info-item">
                <i class="fa-solid fa-cake-candles"></i>
                <span><?=$profilRow['user_yas']?> yaşında</span>
            </div>
        </div>

        <!-- Action Buttons Grid -->
        <div class="btn-grid">
<?php 
$query = $db->query("SELECT * FROM begeniler WHERE begenen_id = '{$user_id}' AND begenilen_id = '{$profilRow['user_id']}'")->fetch(PDO::FETCH_ASSOC);
if($query){
?>
            <button id="user_<?=$profilRow['user_id']?>" type="button" class="btn-modern btn-love">
                <i class="fa-solid fa-check"></i>
                <span>Beğendin</span>
            </button>
<?php }else{ ?>
            <button id="user_<?=$profilRow['user_id']?>" onclick="begeniGonder2(<?=$profilRow['user_id']?>);" type="button" class="btn-modern btn-love">
                <i class="fa-solid fa-heart"></i>
                <span>Beğen</span>
            </button>
<?php } ?>

            <a href="./mesajlar.php?id=<?=$profilRow['user_id']?>" class="btn-modern btn-message">
                <i class="fa-regular fa-envelope"></i>
                <span>Mesaj Gönder</span>
            </a>

<?php
if($user_id != 663793) {
    if($myUser['user_call']==0){
    ?>
            <a onclick="accept1();" href="javascript:void(0);" class="btn-modern btn-call btn-icon-only">
                <i class="fa-solid fa-phone"></i>
            </a>
    <?php 
    }else{ 
    ?>
            <a onclick="$('#DialogIconedSuccess2').modal('show');" href="javascript:void(0);" class="btn-modern btn-call btn-icon-only">
                <i class="fa-solid fa-phone"></i>
            </a>
    <?php 
    }
}
?>
        </div>

<?php
if($myUser['user_id']==707615 && $profilRow['user_id']==842355){
?>
        <a onclick="buyJeton('3paket');" href="javascript:void(0)" class="btn-modern btn-call" style="width: 100%; margin-top: 10px; flex-direction: row;">
            <ion-icon name="aperture-outline"></ion-icon> Hediye Jeton Gönder
        </a>
<?php 
} 
?>

<?php if($user_id != 663793): ?>
        <!-- İletişim Bilgileri -->
        <div class="divider"></div>

        <div class="contact-grid">
            <div class="contact-btn" onclick="uyariVer3();">
                <div class="contact-left">
                    <div class="contact-icon" style="background: linear-gradient(135deg, #28a745 0%, #20c997 100%);">
                        <i class="fa-solid fa-phone"></i>
                    </div>
                    <div class="contact-info">
                        <div class="contact-label">05<span class="bullet">●●● ●●● ●● ●●</span></div>
                        <div class="contact-sublabel">Telefon bilgilerini göster</div>
                    </div>
                </div>
                <?php if ($myUser['user_iletisim'] > 0 || $myUser['user_onay'] > 0): ?>
                    <span class="contact-badge badge-danger-sm">
                        <i class="fa-solid fa-lock"></i>
                        Gizli
                    </span>
                <?php else: ?>
                    <span class="contact-badge badge-success-sm">
                        <i class="fa-solid fa-eye"></i>
                        Göster
                    </span>
                <?php endif; ?>
            </div>

            <div class="contact-btn" onclick="uyariVer3();">
                <div class="contact-left">
                    <div class="contact-icon" style="background: linear-gradient(135deg, #f09433 0%, #bc1888 100%);">
                        <i class="fab fa-instagram"></i>
                    </div>
                    <div class="contact-info">
                        <?php 
                        $isimParcalari = explode(" ", $profilRow['user_fullname']);
                        $isim = $isimParcalari[0];
                        $isimUzunluk = mb_strlen($isim, 'UTF-8');
                        $ilkHarf = mb_substr($isim, 0, 1, 'UTF-8');
                        $yildizSayisi = $isimUzunluk + 3;
                        $bullets = str_repeat('●', $yildizSayisi);
                        ?>
                        <div class="contact-label">@<?=$ilkHarf?><span class="bullet"><?=$bullets?></span></div>
                        <div class="contact-sublabel">Instagram profilini göster</div>
                    </div>
                </div>
                <?php if ($myUser['user_iletisim'] > 0 || $myUser['user_onay'] > 0): ?>
                    <span class="contact-badge badge-danger-sm">
                        <i class="fa-solid fa-lock"></i>
                        Gizli
                    </span>
                <?php else: ?>
                    <span class="contact-badge badge-success-sm">
                        <i class="fa-solid fa-eye"></i>
                        Göster
                    </span>
                <?php endif; ?>
            </div>

            <div class="contact-btn" onclick="uyariVer3();">
                <div class="contact-left">
                    <div class="contact-icon" style="background: linear-gradient(135deg, #4267B2 0%, #5b7fc6 100%);">
                        <i class="fab fa-facebook"></i>
                    </div>
                    <div class="contact-info">
                        <?php
                        $fbName = $profilRow['user_fullname'];
                        if(strpos($fbName, '*') !== false) {
                            $fbNameParts = explode('*', $fbName);
                            $fbNameFormatted = $fbNameParts[0] . '<span class="bullet">' . str_repeat('●', substr_count($fbName, '*')) . '</span>';
                        } else {
                            $fbNameFormatted = $fbName;
                        }
                        ?>
                        <div class="contact-label"><?=$fbNameFormatted?></div>
                        <div class="contact-sublabel">Facebook profilini göster</div>
                    </div>
                </div>
                <?php if ($myUser['user_iletisim'] > 0 || $myUser['user_onay'] > 0): ?>
                    <span class="contact-badge badge-danger-sm">
                        <i class="fa-solid fa-lock"></i>
                        Gizli
                    </span>
                <?php else: ?>
                    <span class="contact-badge badge-success-sm">
                        <i class="fa-solid fa-eye"></i>
                        Göster
                    </span>
                <?php endif; ?>
            </div>
        </div>
<?php endif; ?>

        <!-- Kişisel Bilgiler -->
        <div class="divider"></div>
        
        <div class="info-grid-2">
            <div class="info-row">
                <div class="info-icon-sm" style="background: #667eea;">
                    <i class="fa-solid fa-location-dot"></i>
                </div>
                <div class="info-content">
                    <div class="info-label">Şehir</div>
                    <div class="info-text"><?=$myUser['user_sehir']?></div>
                </div>
            </div>

            <div class="info-row">
                <div class="info-icon-sm" style="background: #f5576c;">
                    <i class="fa-solid fa-calendar-days"></i>
                </div>
                <div class="info-content">
                    <div class="info-label">Yaş</div>
                    <div class="info-text"><?=$profilRow['user_yas']?> Yaşında</div>
                </div>
            </div>
        </div>

<?php if(isset($profilRow['user_boy1']) || isset($profilRow['user_kilo1'])){ ?>
        <div class="info-grid-2">
<?php if(isset($profilRow['user_boy1'])){ ?>
            <div class="info-row">
                <div class="info-icon-sm" style="background: #4facfe;">
                    <i class="fa-solid fa-person-arrow-up-from-line"></i>
                </div>
                <div class="info-content">
                    <div class="info-label">Boy</div>
                    <div class="info-text"><?=$profilRow['user_boy']?> cm</div>
                </div>
            </div>
<?php } ?>

<?php if(isset($profilRow['user_kilo1'])){ ?>
            <div class="info-row">
                <div class="info-icon-sm" style="background: #fa709a;">
                    <i class="fa-solid fa-weight-scale"></i>
                </div>
                <div class="info-content">
                    <div class="info-label">Kilo</div>
                    <div class="info-text"><?=$profilRow['user_kilo']?> Kg</div>
                </div>
            </div>
<?php } ?>
        </div>
<?php } ?>

        <div class="info-row">
            <div class="info-icon-sm" style="background: #fcb69f;">
                <i class="fa-solid fa-heart"></i>
            </div>
            <div class="info-content">
                <div class="info-label">Profil Beğenisi</div>
                <div class="info-text"><?=$profilBegeni?> Kişi Beğendi</div>
            </div>
        </div>

        <!-- Action Buttons - Engelle & Şikayet -->
        <div class="action-buttons-row">
<?php 
$engelVarmi = $db->query("SELECT COUNT(*) FROM engellemeler where u_from = '{$myUser['user_id']}' AND u_to = '{$profil_id}'")->fetchColumn();
if($engelVarmi==0){
  echo '<button onclick="engelle1('.$profil_id.')" type="button" class="btn-action btn-block" id="engelbuton">
            <i class="fa-solid fa-ban"></i>
            <span>Engelle</span>
        </button>';
}else{
    echo '<button onclick="engelKaldir('.$profil_id.')" type="button" class="btn-action btn-block active" id="engelbuton">
            <i class="fa-solid fa-check"></i>
            <span>Engellendi</span>
        </button>'; 
}
?>

<?php 
$sikayetVarmi = $db->query("SELECT COUNT(*) FROM sikayetler where u_from = '{$myUser['user_id']}' AND u_to = '{$profil_id}'")->fetchColumn();
if($sikayetVarmi==0){
?>
            <button data-toggle="modal" data-target="#DialogForm" type="button" class="btn-action btn-report">
                <i class="fa-solid fa-flag"></i>
                <span>Şikayet Et</span>
            </button>
<?php 
}else{ 
    echo '<button type="button" class="btn-action btn-report disabled">
            <i class="fa-solid fa-check"></i>
            <span>Şikayet Edildi</span>
        </button>';
}
?>
        </div>

    </div>

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

<!-- MODALS & TOASTS -->

<!-- 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">
                <i class="fa-solid fa-face-grin-hearts"></i>
            </div>
            <div class="modal-header">
                <h5 class="modal-title"><?=$isimsoyisimCek[0]?> Sizi Beğendi!</h5>
            </div>
            <div class="modal-body">
                <?=$isimsoyisimCek[0]?> sizinle tanışmak istiyor. <br />Hemen ona bir mesaj gönder.
            </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>

<!-- Toast Messages -->
<div id="toast-4" class="toast-box toast-center">
    <div class="in">
        <i class="fa-solid fa-circle-exclamation fa-3x text-danger"></i>
        <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">
        <i class="fa-solid fa-circle-check text-success fa-2x"></i>
        <div class="text">
            Profil Başarıyla Engellendi!
        </div>
    </div>
</div>

<div id="toast-6" class="toast-box toast-center">
    <div class="in">
        <i class="fa-solid fa-circle-check text-success fa-2x"></i>
        <div class="text">
            Engel Başarıyla Kaldırıldı!
        </div>
    </div>
</div>

<!-- 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">
                            <i class="fa-solid fa-circle-xmark"></i>
                        </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 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>

<!-- Dialog Image -->
<div class="modal fade dialogbox" id="DialogImage" data-backdrop="static" tabindex="-1" role="dialog">
    <div class="modal-dialog" role="document">
        <div class="modal-content" style="max-width: 350px !important;">
            <img src="<?=$profilRow['user_picture']?>" alt="image" class="img-fluid">
            <div class="modal-footer">
                <div class="btn-inline">
                    <a href="javascript:void(0)" class="btn btn-text-primary" data-dismiss="modal">
                        <i class="fa-solid fa-circle-xmark fa-lg mr-1"></i>
                        Kapat
                    </a>
                </div>
            </div>
        </div>
    </div>
</div>

<script src="assets/js/hammer.min.js"></script>
<script src="assets/js/finder.js"></script>

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

