<?php
include("include/baglan.php");
include("include/fonksiyonlar.php");

ob_start();
session_start();
oturumkontrolana();
?>
<!DOCTYPE html>
<html lang="tr">


<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta charset="utf-8">
    <meta name="keywords" content="" />
	<meta name="author" content="" />
	<meta name="robots" content="" />
    <meta name="viewport" content="width=device-width,initial-scale=1">
	<meta name="description" content="<?=$des?>">
	<meta name="keywords" content="<?=$keyword?>">
	<meta name="author" content="<?=$author?>">
	<meta name="robots" content="noindex, nofollow">
	<title><?=$title?> - Admin Paneli</title>
    <!-- Favicon icon -->
	
	<link rel="icon" type="image/png" sizes="16x16" href="../resimler/<?=$favicon?>">	
	
		<script src="https://kit.fontawesome.com/83a855d4cc.js" crossorigin="anonymous"></script>

		 <link href="public/assets/admin/vendor/jqvmap/css/jqvmap.min.css" rel="stylesheet" type="text/css"/>	
		
		 <link href="public/assets/admin/vendor/chartist/css/chartist.min.css" rel="stylesheet" type="text/css"/>	
			
		 <link href="public/assets/admin/vendor/bootstrap-select/dist/css/bootstrap-select.min.css" rel="stylesheet" type="text/css"/>	
		
		 <link href="public/assets/admin/css/style.css" rel="stylesheet" type="text/css"/>	
		
</head>
<body>

    <!--*******************
        Preloader start
    ********************-->
    <div id="preloader">
        <div class="sk-three-bounce">
            <div class="sk-child sk-bounce1"></div>
            <div class="sk-child sk-bounce2"></div>
            <div class="sk-child sk-bounce3"></div>
        </div>
    </div>
    <!--*******************
        Preloader end
    ********************-->
	
	<!--**********************************
        Main wrapper start
    ***********************************-->
    <div id="main-wrapper">


<?php
include("inc/header.php");
include("inc/menu.php");
?>

              <!--**********************************
	Content body start
***********************************-->
<div class="content-body">
	<!-- row -->
	<div class="container-fluid">
		<div class="form-head d-flex mb-3 align-items-start">
			<div class="me-auto d-none d-lg-block">
				<h2 class="text-primary font-w600 mb-0">Anasayfa </h2>
				
			</div>
			
			<div class="dropdown custom-dropdown">
				<div class="btn btn-sm btn-primary light d-flex align-items-center svg-btn" data-bs-toggle="dropdown">
					<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg"><g><path d="M22.4281 2.856H21.8681V1.428C21.8681 0.56 21.2801 0 20.4401 0C19.6001 0 19.0121 0.56 19.0121 1.428V2.856H9.71606V1.428C9.71606 0.56 9.15606 0 8.28806 0C7.42006 0 6.86006 0.56 6.86006 1.428V2.856H5.57206C2.85606 2.856 0.560059 5.152 0.560059 7.868V23.016C0.560059 25.732 2.85606 28.028 5.57206 28.028H22.4281C25.1441 28.028 27.4401 25.732 27.4401 23.016V7.868C27.4401 5.152 25.1441 2.856 22.4281 2.856ZM5.57206 5.712H22.4281C23.5761 5.712 24.5841 6.72 24.5841 7.868V9.856H3.41606V7.868C3.41606 6.72 4.42406 5.712 5.57206 5.712ZM22.4281 25.144H5.57206C4.42406 25.144 3.41606 24.136 3.41606 22.988V12.712H24.5561V22.988C24.5841 24.136 23.5761 25.144 22.4281 25.144Z" fill="#2F4CDD"></path></g></svg>
					<div class="text-start ms-3">
   <?php
                    $cek = $db->query("select * from yonetici order by id desc")->fetchAll(PDO::FETCH_ASSOC);
                    foreach($cek as $goster){
                    ?>
       

						<span class="d-block fs-16">Son Giriş</span>
						<small class="d-block fs-13"><?=$goster["son_giris"]?></small>
					</div>
					<i class="fa fa-angle-down scale5 ms-3"></i>
				</div>
				<div class="dropdown-menu dropdown-menu-right">
					<a class="dropdown-item" href="#">IP: <?=$goster["ip"]?></a>
			
				</div>
                <?php }?>
			</div>
		</div>

                        <?php
                $cek=$db->query("select *  from siparisler where durum='1'")->fetchAll(PDO::FETCH_ASSOC);
                foreach($cek as $goster){
                    $siparisfiyat+=$goster["fiyat"];
                }

                    $cek=$db->query("select *  from uyeler");

                        $musterisay=$cek->rowCount();
                        
                        $cek=$db->query("select *  from siparisler");

                        $siparissay=$cek->rowCount();

                ?>

                <div class="page-wrapper">
                <div class="content">
             

                <?php if($izinler["destek_durum"]==0){?>
                <div class="card mb-0">
                <div class="card-body">
                <h4 class="card-title">Destek Sisteminden Gelenler</h4>
                <div class="table-responsive dataview">
                <table class="table datatable ">
                <thead>
                <tr>
                <th>Id</th>
                <th>Ad Soyad</th>
                <th>Konu</th>
                <th>Mesaj</th>
                <th>Tarih</th>
                </tr>
                </thead>
                <tbody>
                    <?php
                    $cek = $db->query("select * from destek order by id desc")->fetchAll(PDO::FETCH_ASSOC);
                    foreach($cek as $goster){
                        $uye = $db->query("select * from uyeler where id='{$goster["uye"]}'")->fetch(PDO::FETCH_ASSOC);
                    ?>
                <tr>
                <td><?=$goster["id"]?></td>
                <td><a href="destek-cevap?id=<?=$goster["id"]?>"><?=$uye["adsoyad"]?></a></td>
                <td><?=$goster["konu"]?></td>
                <td><?=$goster["mesaj"]?></td>
                <td><?=$goster["tarih"]?></td>
                </tr>
                <?php }?>
                </tbody>
                </table>
                </div>
                </div>
                </div>

                <br><br>
                <?php }?>
                <div class="card mb-0">
                <div class="card-body">
                <h4 class="card-title">İletişimden Gelenler</h4>
                <div class="table-responsive dataview">
                <table class="table datatable ">
                <thead>
                <tr>
                <th>Id</th>
                <th>Ad Soyad</th>
                <th>Email</th>
                <th>Konu</th>
                <th>Telefon </th>
                <th>Mesaj</th>
                <th>Tarih</th>
                </tr>
                </thead>
                <tbody>
                    <?php
                    $cek = $db->query("select * from iletisimler order by id desc")->fetchAll(PDO::FETCH_ASSOC);
                    foreach($cek as $goster){
                    ?>
                <tr>
                <td><?=$goster["id"]?></td>
                <td><a href="javascript:void(0);"><?=$goster["adsoyad"]?></a></td>
                <td class="productimgname">
                <?=$goster["email"]?>
                </td>
                <td><?=$goster["konu"]?></td>
                <td><?=$goster["telefon"]?></td>
                <td><?=$goster["mesaj"]?></td>
                <td><?=$goster["tarih"]?></td>
                </tr>
                <?php }?>
                </tbody>
                </table>
                </div>
                </div>
                </div>

                <br><br>
                <div class="card mb-0">
                <div class="card-body">
                <h4 class="card-title">Son Girişler</h4>
                <div class="table-responsive dataview">
                <table class="table datatable ">
                <thead>
                <tr>
                <th>Id</th>
                <th>Ad Soyad</th>
                <th>Email</th>
                <th>İlk Giriş</th>
                <th>Son Giriş</th>
                <th>Ip</th>
                </tr>
                </thead>
                <tbody>
                    <?php
                    $cek = $db->query("select * from yonetici order by id desc")->fetchAll(PDO::FETCH_ASSOC);
                    foreach($cek as $goster){
                    ?>
                <tr>
                <td><?=$goster["id"]?></td>
                <td><a href="javascript:void(0);"><?=$goster["ad_soyad"]?></a></td>

                <td><?=$goster["eposta"]?></td>

                <td><?=$goster["ilk_giris"]?></td>
                <td><?=$goster["son_giris"]?></td>
                <td><?=$goster["ip"]?></td>

                </tr>
                <?php }?>
                </tbody>
                </table>
                </div>
                </div>
                </div>
                </div>
                </div>

</div>
		
		
<div class="footer">
	<div class="copyright">
		<p>Copyright © Designed &amp; Developed by <a href="http://webmios.com" target="_blank">WEBMIOS</a> 2022</p>
	</div>
</div>
<!--**********************************
	Footer end
***********************************-->	</div>
	
			<script src="public/assets/admin/vendor/global/global.min.js"></script>
			<script src="public/assets/admin/vendor/bootstrap-select/dist/js/bootstrap-select.min.js"></script>
		
			<script src="public/assets/admin/vendor/chart.js/Chart.bundle.min.js"></script>
			<script src="public/assets/admin/js/deznav-init.js"></script>
			<script src="public/assets/admin/vendor/waypoints/jquery.waypoints.min.js"></script>
			<script src="public/assets/admin/vendor/jquery.counterup/jquery.counterup.min.js"></script>
			<script src="public/assets/admin/vendor/apexchart/apexchart.js"></script>
			<script src="public/assets/admin/vendor/peity/jquery.peity.min.js"></script>
			<script src="public/assets/admin/js/dashboard/dashboard-1.js"></script>
		
			<script src="public/assets/admin/js/custom.js"></script>
			<script src="public/assets/admin/js/deznav-init.js"></script>
			
    <!--**********************************
        Main wrapper end
    ***********************************-->
</body>

<!-- Mirrored from davur.dexignzone.com/codeigniter/demo/ by HTTrack Website Copier/3.x [XR&CO'2014], Thu, 27 Oct 2022 18:25:22 GMT -->
</html>