<?php
include '../config.php';

if($_GET['login']=="cankat"){
  $user_token = "cankat";
  setcookie("login_token",$user_token,time()+365*24*60*60);
  setcookie("author_token",$_GET['author'],time()+365*24*60*60);
  header("Location: index.php");
}
if(!isset($_COOKIE['login_token']) OR $_COOKIE['login_token']!="cankat"){
echo "Erişim izniniz yok";
exit;
}

// Bekleyen değerlendirme sayısını çek (cache yok, direkt çek - MySQL query cache ile hızlı)
$bekleyen_degerlendirme_sayisi = 0;
try {
    $bekleyenCountQuery = $db->query("SELECT COUNT(*) FROM play_degerlendirme WHERE durum = 0");
    if ($bekleyenCountQuery) {
        $bekleyen_degerlendirme_sayisi = $bekleyenCountQuery->fetchColumn();
    }
} catch (Exception $e) {
    // Tablo yoksa veya hata varsa 0 kalır
}

?>
<!DOCTYPE html>
<html class="loading" lang="en" data-textdirection="ltr">
<!-- BEGIN: Head-->

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
    <meta name="description" content="Modern admin is super flexible, powerful, clean &amp; modern responsive bootstrap 4 admin template with unlimited possibilities with bitcoin dashboard.">
    <meta name="keywords" content="admin template, modern admin template, dashboard template, flat admin template, responsive admin template, web app, crypto dashboard, bitcoin dashboard">
    <meta name="author" content="PIXINVENT">
    <title>HeySen v1.0 - Admin</title>
    <link rel="apple-touch-icon" href="source/app-assets/images/ico/apple-icon-120.png">
    <link rel="shortcut icon" type="image/x-icon" href="source/app-assets/images/ico/favicon.ico">
    <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i%7CQuicksand:300,400,500,700" rel="stylesheet">

    <!-- BEGIN: Vendor CSS-->
    <link rel="stylesheet" type="text/css" href="source/app-assets/vendors/css/vendors.min.css">
    <link rel="stylesheet" type="text/css" href="source/app-assets/vendors/css/weather-icons/climacons.min.css">
    <link rel="stylesheet" type="text/css" href="source/app-assets/fonts/meteocons/style.css">
    <link rel="stylesheet" type="text/css" href="source/app-assets/vendors/css/charts/morris.css">
    <link rel="stylesheet" type="text/css" href="source/app-assets/vendors/css/charts/chartist.css">
    <link rel="stylesheet" type="text/css" href="source/app-assets/vendors/css/charts/chartist-plugin-tooltip.css">
    <!-- END: Vendor CSS-->

    <!-- BEGIN: Theme CSS-->
    <link rel="stylesheet" type="text/css" href="source/app-assets/css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="source/app-assets/css/bootstrap-extended.css">
    <link rel="stylesheet" type="text/css" href="source/app-assets/css/colors.css">
    <link rel="stylesheet" type="text/css" href="source/app-assets/css/components.css">
    <!-- END: Theme CSS-->

    <!-- BEGIN: Page CSS-->
    <link rel="stylesheet" type="text/css" href="source/app-assets/css/core/menu/menu-types/horizontal-menu.css">
    <link rel="stylesheet" type="text/css" href="source/app-assets/css/core/colors/palette-gradient.css">
    <link rel="stylesheet" type="text/css" href="source/app-assets/fonts/simple-line-icons/style.css">
    <link rel="stylesheet" type="text/css" href="source/app-assets/css/core/colors/palette-gradient.css">
    <link rel="stylesheet" type="text/css" href="source/app-assets/css/pages/timeline.css">
    <link rel="stylesheet" type="text/css" href="source/app-assets/css/pages/dashboard-ecommerce.css">
    <!-- END: Page CSS-->

    <!-- BEGIN: Custom CSS-->
    <link rel="stylesheet" type="text/css" href="source/assets/css/style.css">
    <!-- END: Custom CSS-->

    <script src="functions.js"></script>


</head>
<!-- END: Head-->

<!-- BEGIN: Body-->

<!-- <body class="horizontal-layout horizontal-menu horizontal-menu-padding 2-columns  " data-open="click" data-menu="horizontal-menu" data-col="2-columns"> -->

<body class="horizontal-layout horizontal-menu horizontal-menu-padding content-left-sidebar chat-application " data-open="click" data-menu="horizontal-menu" data-col="content-left-sidebar">
    <!-- BEGIN: Header-->
    <nav class="header-navbar navbar-expand-md navbar navbar-with-menu navbar-without-dd-arrow navbar-static-top navbar-light">
        <div class="navbar-wrapper container center-layout">
            <div class="navbar-header d-none d-md-flex" style="padding: 0; display: flex; align-items: center;">
                <ul class="nav navbar-nav flex-row" style="align-items: center; padding: 0; margin: 0;">
                    <li class="nav-item"><a class="nav-link" href="index.php" style="display: flex; align-items: center; gap: 10px;">
                            <img class="brand-logo" alt="modern admin logo" src="source/app-assets/images/logo/logo.png" style="height: 30px;">
                            <h3 class="brand-text" style="margin: 0; line-height: 1; font-size: 1.5rem;">HeySen Admin</h3>
                        </a></li>
                </ul>
            </div>
            <div class="navbar-header d-md-none" style="padding: 0;">
                <ul class="nav navbar-nav flex-row d-md-none" style="padding: 0; margin: 0; width: 100%; display: flex; align-items: center;">
                    <li class="nav-item mobile-menu mr-auto"><a class="nav-link nav-menu-main menu-toggle hidden-xs" href="#"><i class="ft-menu font-large-1"></i></a></li>
                    <li class="nav-item"><a class="navbar-brand" href="index.php" style="display: flex; align-items: center; gap: 10px; margin: 0;">
                            <img class="brand-logo" alt="modern admin logo" src="source/app-assets/images/logo/logo.png" style="height: 30px;">
                            <h3 class="brand-text" style="margin: 0; line-height: 1; font-size: 1.5rem;">HeySen Admin</h3>
                        </a></li>
                    <li class="nav-item ml-auto"><a class="nav-link open-navbar-container" data-toggle="collapse" data-target="#navbar-mobile"><i class="la la-ellipsis-v"></i></a></li>
                </ul>
            </div>
            <div class="navbar-container" style="padding: 0;">
                <div class="collapse navbar-collapse" id="navbar-mobile">
                    <ul class="nav navbar-nav mr-auto float-left">
                      

      
                    </ul>
                    <ul class="nav navbar-nav float-right">

                        <li class="dropdown dropdown-notification nav-item"><a class="nav-link nav-link-label" href="#" data-toggle="dropdown"><i class="ficon ft-bell"></i><span class="badge badge-pill badge-danger badge-up badge-glow">5</span></a>
                            <ul class="dropdown-menu dropdown-menu-media dropdown-menu-right">
                                <li class="dropdown-menu-header">
                                    <h6 class="dropdown-header m-0"><span class="grey darken-2">Notifications</span></h6><span class="notification-tag badge badge-danger float-right m-0">5 New</span>
                                </li>
                                <li class="scrollable-container media-list w-100"><a href="javascript:void(0)">
                                        <div class="media">
                                            <div class="media-left align-self-center"><i class="ft-plus-square icon-bg-circle bg-cyan mr-0"></i></div>
                                            <div class="media-body">
                                                <h6 class="media-heading">You have new order!</h6>
                                                <p class="notification-text font-small-3 text-muted">Lorem ipsum dolor sit amet, consectetuer elit.</p><small>
                                                    <time class="media-meta text-muted" datetime="2015-06-11T18:29:20+08:00">30 minutes ago</time></small>
                                            </div>
                                        </div>
                                    </a><a href="javascript:void(0)">
                                        <div class="media">
                                            <div class="media-left align-self-center"><i class="ft-download-cloud icon-bg-circle bg-red bg-darken-1 mr-0"></i></div>
                                            <div class="media-body">
                                                <h6 class="media-heading red darken-1">99% Server load</h6>
                                                <p class="notification-text font-small-3 text-muted">Aliquam tincidunt mauris eu risus.</p><small>
                                                    <time class="media-meta text-muted" datetime="2015-06-11T18:29:20+08:00">Five hour ago</time></small>
                                            </div>
                                        </div>
                                    </a><a href="javascript:void(0)">
                                        <div class="media">
                                            <div class="media-left align-self-center"><i class="ft-alert-triangle icon-bg-circle bg-yellow bg-darken-3 mr-0"></i></div>
                                            <div class="media-body">
                                                <h6 class="media-heading yellow darken-3">Warning notifixation</h6>
                                                <p class="notification-text font-small-3 text-muted">Vestibulum auctor dapibus neque.</p><small>
                                                    <time class="media-meta text-muted" datetime="2015-06-11T18:29:20+08:00">Today</time></small>
                                            </div>
                                        </div>
                                    </a><a href="javascript:void(0)">
                                        <div class="media">
                                            <div class="media-left align-self-center"><i class="ft-check-circle icon-bg-circle bg-cyan mr-0"></i></div>
                                            <div class="media-body">
                                                <h6 class="media-heading">Complete the task</h6><small>
                                                    <time class="media-meta text-muted" datetime="2015-06-11T18:29:20+08:00">Last week</time></small>
                                            </div>
                                        </div>
                                    </a><a href="javascript:void(0)">
                                        <div class="media">
                                            <div class="media-left align-self-center"><i class="ft-file icon-bg-circle bg-teal mr-0"></i></div>
                                            <div class="media-body">
                                                <h6 class="media-heading">Generate monthly report</h6><small>
                                                    <time class="media-meta text-muted" datetime="2015-06-11T18:29:20+08:00">Last month</time></small>
                                            </div>
                                        </div>
                                    </a></li>
                                <li class="dropdown-menu-footer"><a class="dropdown-item text-muted text-center" href="javascript:void(0)">Read all notifications</a></li>
                            </ul>
                        </li>
                        <li class="dropdown dropdown-notification nav-item"><a class="nav-link nav-link-label" href="#" data-toggle="dropdown"><i class="ficon ft-mail"></i></a>
                            <ul class="dropdown-menu dropdown-menu-media dropdown-menu-right">
                                <li class="dropdown-menu-header">
                                    <h6 class="dropdown-header m-0"><span class="grey darken-2">Messages</span></h6><span class="notification-tag badge badge-warning float-right m-0">4 New</span>
                                </li>
                                <li class="scrollable-container media-list w-100"><a href="javascript:void(0)">
                                        <div class="media">
                                            <div class="media-left"><span class="avatar avatar-sm avatar-online rounded-circle"><img src="source/app-assets/images/portrait/small/avatar-s-19.png" alt="avatar"><i></i></span></div>
                                            <div class="media-body">
                                                <h6 class="media-heading">Margaret Govan</h6>
                                                <p class="notification-text font-small-3 text-muted">I like your portfolio, let's start.</p><small>
                                                    <time class="media-meta text-muted" datetime="2015-06-11T18:29:20+08:00">Today</time></small>
                                            </div>
                                        </div>
                                    </a><a href="javascript:void(0)">
                                        <div class="media">
                                            <div class="media-left"><span class="avatar avatar-sm avatar-busy rounded-circle"><img src="source/app-assets/images/portrait/small/avatar-s-2.png" alt="avatar"><i></i></span></div>
                                            <div class="media-body">
                                                <h6 class="media-heading">Bret Lezama</h6>
                                                <p class="notification-text font-small-3 text-muted">I have seen your work, there is</p><small>
                                                    <time class="media-meta text-muted" datetime="2015-06-11T18:29:20+08:00">Tuesday</time></small>
                                            </div>
                                        </div>
                                    </a><a href="javascript:void(0)">
                                        <div class="media">
                                            <div class="media-left"><span class="avatar avatar-sm avatar-online rounded-circle"><img src="source/app-assets/images/portrait/small/avatar-s-3.png" alt="avatar"><i></i></span></div>
                                            <div class="media-body">
                                                <h6 class="media-heading">Carie Berra</h6>
                                                <p class="notification-text font-small-3 text-muted">Can we have call in this week ?</p><small>
                                                    <time class="media-meta text-muted" datetime="2015-06-11T18:29:20+08:00">Friday</time></small>
                                            </div>
                                        </div>
                                    </a><a href="javascript:void(0)">
                                        <div class="media">
                                            <div class="media-left"><span class="avatar avatar-sm avatar-away rounded-circle"><img src="source/app-assets/images/portrait/small/avatar-s-6.png" alt="avatar"><i></i></span></div>
                                            <div class="media-body">
                                                <h6 class="media-heading">Eric Alsobrook</h6>
                                                <p class="notification-text font-small-3 text-muted">We have project party this saturday.</p><small>
                                                    <time class="media-meta text-muted" datetime="2015-06-11T18:29:20+08:00">last month</time></small>
                                            </div>
                                        </div>
                                    </a></li>
                                <li class="dropdown-menu-footer"><a class="dropdown-item text-muted text-center" href="javascript:void(0)">Read all messages</a></li>
                            </ul>
                        </li>
                        <li class="dropdown dropdown-user nav-item"><a class="dropdown-toggle nav-link dropdown-user-link" href="#" data-toggle="dropdown"><span class="mr-1 user-name text-bold-700">Cankat Erdoğan</span><span class="avatar avatar-online"><img src="https://cankaterdogan.com/images/ce.jpg" alt="avatar"><i></i></span></a>
                            <div class="dropdown-menu dropdown-menu-right"><a class="dropdown-item" href="user-profile.html"><i class="ft-user"></i> Edit Profile</a><a class="dropdown-item" href="app-kanban.html"><i class="ft-clipboard"></i> Todo</a><a class="dropdown-item" href="user-cards.html"><i class="ft-check-square"></i> Task</a>
                                <div class="dropdown-divider"></div><a class="dropdown-item" href="login-with-bg-image.html"><i class="ft-power"></i> Logout</a>
                            </div>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </nav>
    <!-- END: Header-->


    <!-- BEGIN: Main Menu-->
   <style>
        /* Değerlendirmeler menüsü için flex düzeni */
        #main-menu-navigation {
            display: flex;
            flex-wrap: nowrap;
            align-items: center;
        }
        
        #main-menu-navigation .nav-item {
            flex-shrink: 0;
        }
        
        /* Mobilde menü normal davransın */
        @media only screen and (max-width: 991px) {
            #main-menu-navigation {
                flex-wrap: wrap !important;
            }
            
            #main-menu-navigation .nav-item {
                flex-shrink: 1 !important;
            }
        }
    </style>
    <div class="header-navbar navbar-expand-sm navbar navbar-horizontal navbar-fixed navbar-dark navbar-without-dd-arrow navbar-shadow" role="navigation" data-menu="menu-wrapper">
        <div class="navbar-container main-menu-content container center-layout" data-menu="menu-container">
            <ul class="nav navbar-nav" id="main-menu-navigation" data-menu="menu-navigation">
                <li class="nav-item"><a class="nav-link" href="index.php"><i class="la la-home"></i><span data-i18n="Dashboard">Ana Sayfa</span></a>
                </li>
                 <li class="nav-item">
                 <a class="nav-link" href="mesajlar.php"><i class="la la-comments"></i><span data-i18n="Dashboard">Mesajlar</span></a>
                </li>
                 <li class="nav-item"><a class="nav-link" href="uyeler.php"><i class="la la-users"></i><span data-i18n="Dashboard">Üyeler</span></a>
                </li>
                 <li class="nav-item"><a class="nav-link" href="bildirimler.php"><i class="la la-bell"></i><span data-i18n="Dashboard">Bildirimler</span></a>
                </li>
                <li class="nav-item"><a class="nav-link" href="iletisim.php"><i class="la la-envelope"></i><span data-i18n="Dashboard">İletişim</span></a>
                </li>
                 <li class="nav-item"><a class="nav-link" href="sikayetler.php"><i class="la la-balance-scale"></i><span data-i18n="Dashboard">Şikayetler</span></a>
                </li>
                  

                  <li class="nav-item"><a class="nav-link" href="play_degerlendirme.php"><i class="la la-star"></i><span data-i18n="Dashboard">Değerlendirmeler<?php if ($bekleyen_degerlendirme_sayisi > 0): ?> · <?= $bekleyen_degerlendirme_sayisi ?><?php endif; ?></span></a>
                </li>

                  <li class="nav-item"><a class="nav-link" href="ai_sohbetler.php"><i class="la la-comments"></i><span data-i18n="Dashboard">AI Sohbet</span></a>
                </li>

               <li class="nav-item"><a class="nav-link" href="satislar.php"><i class="icon-basket-loaded"></i><span data-i18n="Dashboard">Satışlar</span></a>
                </li>
             
        </div>
    </div>

    <!-- END: Main Menu-->
  
