<!DOCTYPE html>
<html lang="en">
@php

    $route = Route::current()->getName();
@endphp

<!-- index.html  21 Nov 2019 03:44:50 GMT -->
<head>
    <meta charset="UTF-8">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, shrink-to-fit=no" name="viewport">
    <title>Yönetim Paneli</title>
    <!-- General CSS Files -->
    <meta name="csrf-token" content="{{ csrf_token() }}">
    <link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500&display=swap" rel="stylesheet">

    <link rel="stylesheet" href="{{asset('yonetim/assets/css/app.min.css')}}">
    @yield('chartcss')
    <link rel="stylesheet" href="{{asset('yonetim/assets/bundles/izitoast/css/iziToast.min.css')}}">

    <!-- Template CSS -->
    <link rel="stylesheet" href="{{asset('yonetim/assets/css/style.css')}}">
    <link rel="stylesheet" href="{{asset('yonetim/assets/css/components.css')}}">
    <!-- Custom style CSS -->
    <link rel="stylesheet" href="{{asset('yonetim/assets/css/custom.css')}}">
    <link rel='shortcut icon' type='image/x-icon' href='{{asset($ayarcek->faviconyol)}}' />
    <link rel="stylesheet" href="{{asset('yonetim/assets/bundles/summernote/summernote-bs4.css')}}">





    <style>



        body{
            background-color: {{$renkayar->yon_bodyrenk}};
        }
        .main-footer {
            background-color: {{$renkayar->yon_bodyrenk}};

        }

        .theme-white .navbar {
            background-color: #faf8f5;
            box-shadow: 1px 1px 10px 1px rgba(0, 0, 0, 0.22);
        }

        .main-sidebar{
            background: {{$renkayar->yon_sidebar}};

        }

        body:not(.sidebar-mini) .sidebar-style-2 .sidebar-menu>li.active>a {
            padding-left: 20px;
            position: relative;
            color: {{$renkayar->yon_aktifyazirenk}};
        }
        .light-sidebar .main-sidebar .sidebar-menu li.active a {
            background-color: {{$renkayar->yon_aktifarkaplan}};

        }



        .main-sidebar .sidebar-menu li.menu-header {
            color: {{$renkayar->yon_headerbaslik}};

        }


        .main-sidebar .sidebar-menu li ul.dropdown-menu li a {
            color: {{$renkayar->yon_dropdownyazi}};
        }


        .main-sidebar .sidebar-menu li ul.dropdown-menu {

            background-color: {{$renkayar->yon_dropdownar}};
        }

        .light-sidebar:not(.sidebar-mini) .sidebar-style-2 .sidebar-menu>li.active ul.dropdown-menu li a {
            background-color: {{$renkayar->yon_dropdownar}} !important;
        }

        .main-sidebar .sidebar-menu li ul.dropdown-menu li a:before {
            color: {{$renkayar->yon_dropdownyazi}};
        }


        .main-sidebar .sidebar-menu li a {
            color: {{$renkayar->yon_linkrenk}};

        }

        .main-sidebar .sidebar-menu li a:hover{
            background-color:white;
            border-radius: 1px;
            color: black;
        }


    </style>
    @yield('cssler')



</head>

<body>
<div id="app">
    <div class="main-wrapper main-wrapper-1">
        <div class="navbar-bg"></div>
        <nav class="navbar navbar-expand-lg main-navbar sticky">
            <div class="form-inline mr-auto">
                <ul class="navbar-nav mr-3">
                    <li><a href="#" data-toggle="sidebar" class="nav-link nav-link-lg
									collapse-btn"> <i data-feather="align-justify"></i></a></li>
                    <li><a href="#" class="nav-link nav-link-lg fullscreen-btn">
                            <i data-feather="maximize"></i>
                        </a></li>
                    <li>
                        <form class="form-inline mr-auto">
                            <div class="search-element">
                                <input class="form-control" type="search" placeholder="Search" aria-label="Search" data-width="200">
                                <button class="btn" type="submit">
                                    <i class="fas fa-search"></i>
                                </button>
                            </div>
                        </form>
                    </li>
                </ul>
            </div>
            <ul class="navbar-nav navbar-right">
                <li class="dropdown dropdown-list-toggle">


                    <a href="#" data-toggle="dropdown"
                       class="nav-link nav-link-lg notification-toggle message-toggle"><i data-feather="bell" class="bell"></i>
                        <span id="bildirimsayisi" class="badge headerBadge1">{{$notifications->count()}}</span> </a>
                    <div class="dropdown-menu dropdown-list dropdown-menu-right pullDown">
                        <div class="dropdown-header">
                            Bildirimler
                        </div>
                        <div id="" class="dropdown-list-content dropdown-list-icons">





                            @forelse($notifications as $notification)
                                <a href="{{route('siparis.veriupdate',$notification->notifiable_id)}}" class="dropdown-item dropdown-item-unread">
                                <span class="dropdown-item-icon bg-primary text-white"> <i class="fas fa-shopping-cart"></i>
                                </span>
                                    <span class="dropdown-item-desc"> {{ $notification->data }}! <span class="time">
                                            {{ \Carbon\Carbon::parse($notification->created_at)->format('d.m.Y H:i:s') }}</span>
                                 </span>
                                </a>

                            @empty
                                <p id="icindekinisil" class="text-center">
                                     Bildirim Bulunmamaktadır
                                </p>
                            @endforelse

                            <span id="yenimesaj"></span>
                            <br><br><br>



                        </div>
                        <div class="dropdown-footer text-center">
                            <a href="{{route('bildirim.sil')}}" style="color:green"> Tümünü Okundu Olarak İşaretle</a>
                        </div>
                    </div>
                </li>

                <li class="dropdown"><a href="#" data-toggle="dropdown"
                                        class="nav-link dropdown-toggle nav-link-lg nav-link-user"> <img alt="image" src="{{asset(Auth::guard('web')->user()->profile_image)}}"
                                                                                                         class="user-img-radious-style"> <span class="d-sm-none d-lg-inline-block"></span></a>
                    <div class="dropdown-menu dropdown-menu-right pullDown">
                        <div class="dropdown-title">Merhaba {{Auth::guard('web')->user()->name}}</div>
                        <a href="{{route('edit.profile')}}" class="dropdown-item has-icon"> <i class="far
										fa-user"></i> Profil Ayar
                        </a> <a href="{{route('change.password')}}" class="dropdown-item has-icon"> <i class="fas fa-bolt"></i>
                            Şifre Değiştir
                        </a>

                        </a> <a href="{{route('istatistik.duzelt')}}" class="dropdown-item has-icon"> <i class="fas fa-cog"></i>
                            İstatistik Düzelt
                        </a>

                        <div class="dropdown-divider"></div>
                        <a href="{{route('admin.logout')}}" class="dropdown-item has-icon text-danger"> <i class="fas fa-sign-out-alt"></i>
                            Çıkış Yap
                        </a>
                    </div>
                </li>
            </ul>
        </nav>
        <div class="main-sidebar sidebar-style-2">
            <aside id="sidebar-wrapper">
                <div class="sidebar-brand">
                    <a href="{{route('dashboard')}}"> <img style="width: 180px;height: 60px" alt="image" src="{{asset($ayarcek->resimyol)}}" class="" />
                    </a>
                </div>
                <ul class="sidebar-menu">
                    <li class="menu-header">Ana Ayarlar</li>
                    <li class="dropdown {{ ($route == 'dashboard')? 'active' : '' }}">
                        <a href="{{ route('dashboard') }}" class="nav-link"><i class="fa fa-home"></i><span>Anasayfa</span></a>
                    </li>

                    <li class="dropdown {{ ($route == 'genelayar.siteayar')|| ($route == 'genelayar.siteapiayar')|| ($route=='genelayar.logoayar') ||($route=='sosyalmedya.all')||($route=='sosyalmedya.veriekle')||($route=='sosyalmedya.veriupdate')||($route=='genelayar.cacheayar')||($route=='genelayar.emailayar')||($route=='genelayar.captcheayar')||($route=='genelayar.tasarimayar')||($route=='genelayar.resimbicim')||($route=='genelayar.bakimmodu')||($route=='genelayar.cerezpolitikasi')||($route=='genelayar.lisansbilgi')? 'active' : '' }}">
                        <a href="#" class="menu-toggle nav-link has-dropdown"><i class="fa fa-cogs"></i><span>Genel Ayarlar </span></a>
                        <ul class="dropdown-menu">
                            <li class=""><a class="nav-link" href="{{route('genelayar.siteayar')}}">Site Ayarları</a></li>
                            <li class=""><a class="nav-link" href="{{route('genelayar.siteapiayar')}}">Site Api Ayar</a></li>

                            <li><a class="nav-link" href="{{route('genelayar.logoayar')}}">Logo Ayarı</a></li>
                            <li><a class="nav-link" href="{{route('genelayar.cacheayar')}}">Cache Ayarı</a></li>

                            <li><a class="nav-link" href="{{route('genelayar.tasarimayar')}}">Renk Ayarı</a></li>

                            <li>
                                <a href="{{route('genelayar.emailayar')}}" class="nav-link"><span>Email Ayar</span></a>
                            </li>

                            <li>
                                <a href="{{route('genelayar.captcheayar')}}" class="nav-link"><span>Captche Ayar</span></a>
                            </li>

                            <li>
                                <a href="{{route('genelayar.googleapiayar')}}" class="nav-link"><span>Google Giriş Api</span></a>
                            </li>

                            <li><a class="nav-link" href="{{route('sosyalmedya.all')}}">Sosyal Medya Ayar</a></li>

                            <li><a class="nav-link" href="{{route('genelayar.resimbicim')}}">Resim Formatı Ayar</a></li>


                            <li><a class="nav-link" href="{{route('genelayar.bakimmodu')}}">Bakım Modu</a></li>

                            <li><a class="nav-link" href="{{route('genelayar.cerezpolitikasi')}}">Çerez Uyarısı</a></li>




                        </ul>
                    </li>


                    <li class="dropdown {{ ($route == 'seo.all')||($route=='seo.veriupdate')? 'active' : '' }}">
                        <a href="{{route('seo.all')}}" class="nav-link"><i class="fa fa-globe"></i><span>Seo Yönetimi</span></a>
                    </li>

                    <li class="dropdown {{ ($route == 'aboutayar.aboutedit')||($route=='aboutayar.abouteditson')? 'active' : '' }}">
                        <a href="{{route('aboutayar.aboutedit')}}" class="nav-link"><i class="fa fa-bookmark"></i><span>Hakkımızda Ayar</span></a>
                    </li>



                    <li class="dropdown {{ ($route == 'domain.all')||($route=='domain.veriupdate')? 'active' : '' }}">
                        <a href="{{route('domain.all')}}" class="nav-link"><i class="fa fa-server"></i><span>Domain Yönetimi</span></a>
                    </li>

                    <li class="dropdown {{ ($route == 'admin.all')||($route=='admin.yonekle')||($route=='admin.yonupdate')? 'active' : '' }}">
                        <a href="#" class="menu-toggle nav-link has-dropdown"><i class="fa fa-user-circle"></i><span>Yönetici Ayarları</span></a>
                        <ul class="dropdown-menu">
                            <li><a class="nav-link" href="{{route('admin.all')}}">Yöneticiler</a></li>
                            <li><a class="nav-link" href="{{route('admin.yonekle')}}">Yönetici Ekle</a></li>


                        </ul>
                    </li>


                    <li class="dropdown {{ ($route == 'indexkategoriler.all')||($route=='indexkategoriler.veriupdate')? 'active' : '' }}">
                        <a href="{{route('indexkategoriler.all')}}" class="nav-link"><i class="fas fa-image"></i><span>Özel Kategori Ürünleri</span></a>
                    </li>


                        <li class="dropdown {{ ($route == 'hesap.all')||($route=='hesap.veriekle')||($route=='hesap.veriupdate')||($route=="paytr.veriupdate")||($route=="vallet.veriupdate")||($route=="odemeyontemleri.all")? 'active' : '' }}">
                            <a href="{{route('odemeyontemleri.all')}}" class=""><i class="fa fa-university"></i><span>Ödeme Ayarları</span></a>

                        </li>


                    <li class="dropdown">
                        <a href="{{url('yonetim/manage-menus?id=1')}}" class="nav-link"><i class="fa fa-list"></i><span>Menü Yönetimi</span></a>
                    </li>


                    <li class="dropdown {{ ($route == 'sabitalan.veriupdate')? 'active' : '' }}">
                        <a href="{{route('sabitalan.veriupdate')}}" class="nav-link"><i class="fa fa-square"></i><span>Sabit Alanlar</span></a>
                    </li>











                    <li class="menu-header">Script-Şipariş-Üye Ayar</li>


                    <li class="dropdown  {{ ($route == 'scriptkat.all')||($route=='scriptkat.veriekle')||($route=='scriptkat.veriupdate')||($route == 'script.all')||($route=='script.veriekle')||($route=='script.veriupdate')||($route=='urun.all')||($route=='urun.veriekle')||($route=='urun.veriupdate')||($route=='uruncat.all')||($route=='uruncat.veriekleson')||($route=='uruncat.veriupdate')? 'active' : '' }}">
                        <a href="#" class="menu-toggle nav-link has-dropdown"><i class="fa fa-laptop-code"></i><span>Script-Ürün Yönetimi</span></a>
                        <ul class="dropdown-menu">
                            <li><a class="nav-link" href="{{route('scriptkat.all')}}">Script Kategori</a></li>
                            <li><a class="nav-link" href="{{route('script.all')}}">Script Yönetimi</a></li>

                            <li><a class="nav-link" href="{{route('urun.all')}}">Dijital Ürün Yönetimi</a></li>

                            <li><a class="nav-link" href="{{route('uruncat.all')}}">Dijital Ürün Kategorileri</a></li>


                        </ul>
                    </li>



                    <li class="dropdown {{ ($route == 'uyeler.all')||($route=='uyeler.yonupdate')||($route=='bayi.all')? 'active' : '' }}">
                        <a href="#" class="menu-toggle nav-link has-dropdown"><i class="fa fa-users"></i><span>Üye Yönetimi</span></a>
                        <ul class="dropdown-menu">
                            <li><a class="nav-link" href="{{route('uyeler.all')}}">Üye Yönetimi</a></li>
                            <li><a class="nav-link" href="{{route('bayi.all')}}">Bayi Yönetimi</a></li>


                        </ul>
                    </li>


                    <li class="dropdown {{ ($route == 'talepler.all')||($route=='talepler.veriupdate')? 'active' : '' }}">
                        <a href="{{route('talepler.all')}}" class="nav-link"><i class="fa fa-envelope-open"></i><span>Destek Talepleri</span></a>
                    </li>


                    <li class="dropdown {{ ($route == 'siparis.all')||($route=='siparis.veriupdate')? 'active' : '' }}">
                        <a href="{{route('siparis.all')}}" class="nav-link"><i class="fa fa-shopping-cart"></i><span>Siparişler Yönetimi</span></a>
                    </li>



                    <li class="dropdown {{ ($route == 'kupon.all')||($route=='kupon.veriekle')||($route=='kupon.veriupdate')? 'active' : '' }}">
                        <a href="{{route('kupon.all')}}" class="nav-link"><i class="fa fa-money-bill"></i><span>Kupon-İndirim Kodu</span></a>
                    </li>


                    <li class="menu-header">Paketler Yönetimi</li>



                    <li class="dropdown  {{ ($route == 'bayiicerik.veriupdate')? 'active' : '' }}">
                        <a href="{{route('bayiicerik.veriupdate')}}" class="nav-link"><i class="fa fa-handshake"></i><span>Bayi İçerik Yönetimi</span></a>
                    </li>

                    <li class="dropdown  {{ ($route == 'paket.all')||($route=='paket.veriekle')||($route=='paket.veriupdate')||($route == 'seopicerik.veriupdate')? 'active' : '' }}">
                        <a href="{{route('paket.all')}}" class="nav-link"><i class="fa fa-box"></i><span>Paket Yönetimi</span></a>
                    </li>


                    <li class="dropdown  {{ ($route == 'eklenti.all')||($route=='eklenti.veriekle')||($route=='wklwnti.veriupdate')? 'active' : '' }}">
                        <a href="{{route('eklenti.all')}}" class="nav-link"><i class="fa fa-cubes"></i><span>Ekpaket-Modül Yönetimi</span></a>
                    </li>






                    <li class="menu-header">Modüller Yönetimi</li>



                    <li class="dropdown {{ ($route == 'banner.all')||($route=='galeri.veriupdate')? 'active' : '' }}">
                        <a href="{{route('banner.all')}}" class="nav-link"><i class="fas fa-image"></i><span>Banner Yönetimi</span></a>
                    </li>



                    <li class="dropdown {{ ($route == 'referans.all')||($route=='referans.veriekle')||($route=='referans.veriupdate')? 'active' : '' }}">
                        <a href="{{route('referans.all')}}" class="nav-link"><i class="fa fa-check-square"></i><span>Referanslar Yönetimi</span></a>
                    </li>

                    <li class="dropdown {{ ($route == 'ssller.all')||($route=='ssller.veriekle')||($route=='ssller.veriupdate')? 'active' : '' }}">
                        <a href="{{route('ssller.all')}}" class="nav-link"><i class="fa fa-question"></i><span>SSS Yönetimi</span></a>
                    </li>

                    <li class="dropdown {{ ($route == 'yorumlar.all')||($route=='yorumlar.veriekle')||($route=='yorumlar.veriupdate')? 'active' : '' }}">
                        <a href="{{route('yorumlar.all')}}" class="nav-link"><i class="fa fa-comment"></i><span>Yorum Yönetimi</span></a>
                    </li>

                    <li class="dropdown {{ ($route == 'blog.all')||($route=='blog.veriekle')||($route=='blog.veriupdate')? 'active' : '' }}">
                        <a href="{{route('blog.all')}}" class="nav-link"><i class="fa fa-newspaper"></i><span>Blog Yönetimi</span></a>
                    </li>



                    <li class="dropdown {{ ($route == 'servisayar.all')||($route=='servisayar.veriupdate')? 'active' : '' }}">
                        <a href="{{route('servisayar.all')}}" class="nav-link"><i class="fa fa-cog"></i><span>Hizmet Yönetimi</span></a>
                    </li>




                    <li class="dropdown {{ ($route == 'slider.all')||($route=='slider.veriekle')||($route=='slider.veriupdate')? 'active' : '' }}">
                        <a href="{{route('slider.all')}}" class="nav-link"><i class="fa fa-images"></i><span>Slider Ayar</span></a>
                    </li>



                    <li class="dropdown {{ ($route == 'sayfa.all')||($route=='sayfa.veriekle')||($route=='sayfa.veriupdate')? 'active' : '' }}">
                        <a href="{{route('sayfa.all')}}" class="nav-link"><i class="fa fa-book"></i><span>Bilgi Sayfaları</span></a>
                    </li>


                    <li class="dropdown {{ ($route == 'bildirim.all')||($route=='bildirim.veriekle')||($route=='bildirim.veriupdate')? 'active' : '' }}">
                        <a href="{{route('bildirim.all')}}" class="nav-link"><i class="fa fa-chevron-circle-down"></i><span>Bildirim Yönetimi</span></a>
                    </li>


                    <li class="dropdown {{ ($route == 'sitemap.veriler')? 'active' : '' }}">
                        <a href="{{route('sitemap.veriler')}}" class="nav-link"><i class="fa fa-map"></i><span>Sitemap Oluşturma</span></a>
                    </li>

                    <li class="dropdown {{ ($route == 'contact.all')||($route=='contact.details')? 'active' : '' }}">
                        <a href="{{route('contact.all')}}" class="nav-link"><i class="fa fa-envelope"></i><span>Gelen Mailler Ayar</span></a>
                    </li>






                </ul>

                <br><br><br>
            </aside>


        </div>
        <!-- Main Content -->
        <div class="main-content">
           @yield('main')




        </div>


        <footer class="main-footer">
            <div class="footer-left">
            </div>
            <div class="footer-right">
            </div>


        </footer>
        <input style="visibility: hidden" id="basbaslat" type="button" value="Bas" onclick="tiklacalistir()">
        <audio id="audio" src="{{asset('upload/siparis.mp3')}}"></audio>









    </div>
</div>
<!-- General JS Scripts -->
<script src="{{asset('yonetim/assets/js/app.min.js')}}"></script>
<script src="{{asset('yonetim/assets/bundles/izitoast/js/iziToast.min.js')}}"></script>

@yield('izitoast')

<!-- JS Libraies -->
@yield('chartjs')
<!-- Page Specific JS File -->
<script src="{{asset('yonetim/assets/js/page/index.js')}}"></script>
<!-- Template JS File -->
<script src="{{asset('yonetim/assets/js/scripts.js')}}"></script>
<!-- Custom JS File -->
<script src="{{asset('yonetim/assets/js/custom.js')}}"></script>

<script src="{{asset('yonetim/assets/bundles/summernote/summernote-bs4.js')}}"></script>


@if($sabitalanlar->pusher_active==1)

    <script src="https://js.pusher.com/7.2/pusher.min.js"></script>

    <script>
        function tiklacalistir() {
            var audio = document.getElementById("audio");
            audio.play();
        }
    </script>


    <script type="text/javascript">
        // Enable pusher logging - don't include this in production
        Pusher.logToConsole = true;

        function formatDate(dateString) {
            const date = new Date(dateString);
            const options = {
                day: '2-digit',
                month: '2-digit',
                year: 'numeric',
                hour: '2-digit',
                minute: '2-digit',
                second: '2-digit'
            };
            return date.toLocaleDateString('tr-TR', options);
        }

        var pusher = new Pusher('{{ $app_key }}', {
            cluster: '{{ $app_cluster }}'
        });

        var channel = pusher.subscribe('my-channel');
        channel.bind('my-event', function(data) {
            var bildirimsayisi=document.getElementById('bildirimsayisi').innerHTML;
            bildirimsayisi=Number(bildirimsayisi);
            document.getElementById('bildirimsayisi').innerHTML=bildirimsayisi+1;
            document.getElementById("basbaslat").click();

            const formattedDate = formatDate(data["siparisler"]["created_at"]);
            document.getElementById('yenimesaj').innerHTML += "  <a href='/yonetim/siparis/veriupdate/"+data["siparisler"]["id"]+"' class='dropdown-item dropdown-item-unread'><span class='dropdown-item-icon bg-primary text-white'><i class='fas fa-shopping-cart'></i></span><span class='dropdown-item-desc'>Yeni Bir şipariş Oluşturuldu! <span class='time'>"+formattedDate+"</span></span></a>";

            document.getElementById('icindekinisil').textContent="";
        });
    </script>

@endif


@yield('datatables')

@yield('jsler')







@if (\Session::has('success'))


    <script>
        iziToast.show({
            title: 'Başarılı',
            message: "{!! \Session::get('success') !!}",
            color: 'green',
            position: 'topRight', // bottomRight, bottomLeft, topRight, topLeft, topCenter, bottomCenter, center
            timeout: 3000,


        });

        if(!!window.performance && window.performance.navigation.type === 2)
        {
            console.log('Reloading');
            window.location.reload();
        }





    </script>




@endif


@if (\Session::has('danger'))


    <script>



        iziToast.show({
            title: 'Başarısız',
            message: "{!! \Session::get('danger') !!}",
            color: 'red',
            position: 'topRight', // bottomRight, bottomLeft, topRight, topLeft, topCenter, bottomCenter, center
            timeout: 3000,

        });

        if(!!window.performance && window.performance.navigation.type === 2)
        {
            window.location.reload();
        }




    </script>





@endif






</body>


<!-- index.html  21 Nov 2019 03:47:04 GMT -->
</html>
