<!DOCTYPE html>

<html lang="en" class="light">
    <head>
        <meta charset="utf-8">
        <link rel="icon" href="https://www.aryanict.com/favicon.ico">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta name="description" content="Aryan ICT Solutions">
        <meta name="keywords" content="aryan ict Solutions">
        <meta name="author" content="LEFT4CODE">
        <title>Dashboard - Aryan ICT Solutions</title>
        <link rel="stylesheet" href="/Dashboard/dist/css/app.css" />
    </head>
    <!-- END: Head -->
    <body class="app">

        <div class="mobile-menu md:hidden">
            <div class="mobile-menu-bar">
                <a href="/admin" class="flex mr-auto">
                    <img alt="Aryanict Solutions" class="w-6" src="/Dashboard/dist/images/logo.svg">
                </a>
                <a href="javascript:;" id="mobile-menu-toggler"> <i data-feather="bar-chart-2" class="w-8 h-8 text-white transform -rotate-90"></i> </a>
            </div>
            <ul class="border-t border-theme-24 py-5 hidden">
                <li>
                    <a href="/admin" class="menu menu--active">
                        <div class="menu__icon"> <i data-feather="home"></i> </div>
                        <div class="menu__title"> Dashboard </div>
                    </a>
                </li>
            </ul>
        </div>
        <!-- END: Mobile Menu -->
        <div class="flex">
            <!-- BEGIN: Side Menu -->
            <nav class="side-nav">
                <a href="/admin" class="intro-x flex items-center pl-5 pt-4">
                    <img alt="Aryan ICT Solutions" style="width: 200px;" class="w-20" src="/Dashboard/image/logo.png">
                    <span class="hidden xl:block text-white text-lg ml-3"><span class="font-medium"></span> </span>
                </a>
                <div class="side-nav__devider my-6"></div>
                <ul>
                    <li>
                        <a href="/admin" class="side-menu side-menu--active">
                            <div class="side-menu__icon"> <i data-feather="home"></i> </div>
                            <div class="side-menu__title"> Dashboard</div>
                        </a>
                    </li>
                    <li>
                        <a href="/admin/announce" class="side-menu">
                            <div class="side-menu__icon"> <i data-feather="inbox"></i> </div>
                            <div class="side-menu__title"> Announcement </div>
                        </a>
                    </li>
                    <li>
                        <a href="/admin/Users" class="side-menu">
                            <div class="side-menu__icon"> <i data-feather="inbox"></i> </div>
                            <div class="side-menu__title"> Users </div>
                        </a>
                    </li>
                    <li>
                        <a href="/admin/Blog" class="side-menu">
                            <div class="side-menu__icon"> <i data-feather="inbox"></i> </div>
                            <div class="side-menu__title"> Blog </div>
                        </a>
                    </li>
                    <li>
                        <a href="/admin/DomainTransfer" class="side-menu">
                            <div class="side-menu__icon"> <i data-feather="inbox"></i> </div>
                            <div class="side-menu__title"> Domain Transfer </div>
                        </a>
                    </li>
                    <li>
                        <a href="/admin/LeapDomainTransfer" class="side-menu">
                            <div class="side-menu__icon"> <i data-feather="inbox"></i> </div>
                            <div class="side-menu__title"> Leap Domain Transfer </div>
                        </a>
                    </li>
                   

                    <li class="side-nav__devider my-6"></li>



                </ul>
            </nav>
            <!-- END: Side Menu -->
            <!-- BEGIN: Content -->
            <div class="content">
                <!-- BEGIN: Top Bar -->
                <div class="top-bar">
                    <!-- BEGIN: Breadcrumb -->
                    <div class="-intro-x breadcrumb mr-auto hidden sm:flex"> <a href="" class="">Application</a> <i data-feather="chevron-right" class="breadcrumb__icon"></i> <a href="" class="breadcrumb--active">Dashboard</a> </div>
                    <div class="intro-x dropdown mr-auto sm:mr-6">

                     
                    </div>
                    <!-- END: Notifications -->
                    <!-- BEGIN: Account Menu -->
                    <div class="intro-x dropdown w-8 h-8">
                        <div class="dropdown-toggle w-8 h-8 rounded-full overflow-hidden shadow-lg image-fit zoom-in">
                            <img alt="" src="{{ asset('/Dashboard/dist/images/profile-12.jpg') }}">
                        </div>
                        <div class="dropdown-box w-56">
                            <div class="dropdown-box__content box bg-theme-38 text-white">
                                <div class="p-4 border-b border-theme-40">
                                    <div class="font-medium">{{ \Illuminate\Support\Facades\Auth::guard('admin')->user()->name }} {{ \Illuminate\Support\Facades\Auth::guard('admin')->user()->lastname }}</div>
                                </div>
                                <div class="p-2">
                                     <a href="{{ route('AdminChangePassword' , Auth::guard('admin')->user()->id) }}" class="flex items-center block p-2 transition duration-300 ease-in-out hover:bg-theme-1 rounded-md"> <i data-feather="lock" class="w-4 h-4 mr-2"></i> Change Password </a>
                                  </div>
                                <div class="p-2 border-t border-theme-40">
                                    <a href="/aict_logout" class="flex items-center block p-2 transition duration-300 ease-in-out hover:bg-theme-1 rounded-md"> <i data-feather="toggle-right" class="w-4 h-4 mr-2"></i> Logout </a>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- END: Account Menu -->
                </div>


                <!-- END: Top Bar -->

                 <div class="col-span-12 mt-8">
                            @if(Session::has('success_message'))
                            <div class="rounded-md px-5 py-4 mb-2 bg-theme-9 text-white">{{ Session::get('success_message') }}</div>
                            @endif
                           
                           
                        </div>

                <div class="grid grid-cols-12 gap-6">


                	<div class="col-span-12 mt-8">
                                <div class="intro-y flex items-center h-10">
                                    <h2 class="text-lg font-medium truncate mr-5">
                                        General Report
                                    </h2>
                                    <a href="" class="ml-auto flex text-theme-1"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="feather feather-refresh-ccw w-4 h-4 mr-3"><polyline points="1 4 1 10 7 10"></polyline><polyline points="23 20 23 14 17 14"></polyline><path d="M20.49 9A9 9 0 0 0 5.64 5.64L1 10m22 4l-4.64 4.36A9 9 0 0 1 3.51 15"></path></svg> Reload Data </a>
                                </div>
                                <div class="grid grid-cols-12 gap-6 mt-5">
                                    <div class="col-span-12 sm:col-span-6 xl:col-span-3 intro-y">
                                        <div class="report-box zoom-in">
                                            <div class="box p-5">
                                               
                                                <div class="text-3xl font-bold leading-8 mt-6">{{ $day }}</div>
                                                <div class="text-base text-gray-600 mt-1">Today</div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-span-12 sm:col-span-6 xl:col-span-3 intro-y">
                                        <div class="report-box zoom-in">
                                            <div class="box p-5">
                                               
                                                <div class="text-3xl font-bold leading-8 mt-6">{{ $week }}</div>
                                                <div class="text-base text-gray-600 mt-1">This Week</div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-span-12 sm:col-span-6 xl:col-span-3 intro-y">
                                        <div class="report-box zoom-in">
                                            <div class="box p-5">
                                               
                                                <div class="text-3xl font-bold leading-8 mt-6">{{ $month }}</div>
                                                <div class="text-base text-gray-600 mt-1">This Month</div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-span-12 sm:col-span-6 xl:col-span-3 intro-y">
                                        <div class="report-box zoom-in">
                                            <div class="box p-5">
                                                
                                                <div class="text-3xl font-bold leading-8 mt-6">{{ $year }}</div>
                                                <div class="text-base text-gray-600 mt-1">This Year</div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>

                    <div class="col-span-12 xxl:col-span-9 grid grid-cols-12 gap-6">
                        <!-- BEGIN: General Report -->
                       
                        <!-- END: General Report -->



                        <div class="col-span-12 xl:col-span-8 mt-6">
                            <div class="intro-y block sm:flex items-center h-10">
                                <h2 class="text-lg font-medium truncate mr-5">
                                    Account Login History
                                </h2>
                            </div>
                            <div class="intro-y box p-5 mt-12 sm:mt-5" style="width: 100%;">
                                <div>Listing last 10 login attempts for this account</div>

                                <div class="overflow-x-auto">
                                    <table class="table mt-5">
                                        <thead>
                                        <tr class="bg-gray-200 text-gray-700">
                                            <th class="whitespace-nowrap">#</th>
                                            <th class="whitespace-nowrap">Date</th>
                                            <th class="whitespace-nowrap">Ip Address</th>
                                            <th class="whitespace-nowrap">Result</th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        @foreach($histories as $history)
                                        <tr>
                                            <td class="border-b">{{ optional($history->user)->email }}</td>
                                            <td class="border-b">{{ $history->date }}</td>
                                            <td class="border-b">{{ $history->ip_address }}</td>
                                            <td class="border-b">{{ $history->result }}</td>
                                        </tr>
                                            @endforeach

                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                        <!-- END: Official Store -->
                        <!-- BEGIN: Weekly Best Sellers -->
                         


                      
                    </div>
                </div>
            </div>

            <!-- END: Content -->
        </div>




        <!-- BEGIN: Dark Mode Switcher-->
       
        <!-- END: Dark Mode Switcher-->
        <!-- BEGIN: JS Assets-->
        
        
       
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
        <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&callback=initialize"></script>

         <script src="/Dashboard/dist/js/app.js"></script>

        <script src="https://cdn.jsdelivr.net/npm/chart.js@2.9.4/dist/Chart.min.js"></script>
          <script src="/Dashboard/ckeditor/ckeditor.js"></script>


        <script >
            

new Chart(document.getElementById("report-donut-chart"), {
    type: 'doughnut',
    data: {
      labels: ["Acitve Domain", "Active Service"],
      datasets: [
        {
          backgroundColor: ["#FF8B26", "#FFC533"],
          data: [22,33],
          hoverBackgroundColor:["#FF8B26","#FFC533"],
          borderWidth:5,
          borderColor:"#fff"
        }
      ],
    },
    options: {
      legend:{
        display:!1
    },
      cutoutPercentage:80
    }
});

        </script>


        <script >

            let ctxt = document.getElementById("report-line-chart").getContext("2d");
         new Chart(ctxt, {
            type: "line",
            data: {
                labels: [
                "33",
                "22"
                    
                ],

                datasets: [
                    {
                        label: "Order Price",
                        data: [
                            33,22
                        ],
                        borderWidth: 2,
                        borderColor: "#3160D8",
                        backgroundColor: "transparent",
                        pointBorderColor: "transparent",
                    },
                ],
            },
            options: {
                legend: {
                    display: false,
                },
                scales: {
                    xAxes: [
                        {
                            ticks: {
                                fontSize: "12",
                                fontColor: cash("html").hasClass("dark")
                                    ? "#718096"
                                    : "#777777",
                            },
                            gridLines: {
                                display: false,
                            },
                        },
                    ],
                    yAxes: [
                        {
                            ticks: {
                                fontSize: "12",
                                fontColor: cash("html").hasClass("dark")
                                    ? "#718096"
                                    : "#777777",
                                callback: function (value, index, values) {
                                    return "$" + value;
                                },
                            },
                            gridLines: {
                                color: cash("html").hasClass("dark")
                                    ? "#718096"
                                    : "#D8D8D8",
                                zeroLineColor: cash("html").hasClass("dark")
                                    ? "#718096"
                                    : "#D8D8D8",
                                borderDash: [2, 2],
                                zeroLineBorderDash: [2, 2],
                                drawBorder: false,
                            },
                        },
                    ],
                },
            },
        });
            
        </script>


        <script >
            var canvas = document.getElementById("report-pie-chart");
            var ctx = canvas.getContext('2d');

// Global Options:
 Chart.defaults.global.defaultFontColor = 'black';
 Chart.defaults.global.defaultFontSize = 16;
    var unpaid = 33;
    var paid  = 44;
    var support = 10;

var data = {
      labels : ['Unpaid Invoice' , 'Support Tickets' , 'Paid Invoice'],  
      datasets: [
        {
            fill: true,
            backgroundColor: [
                '#FF8B26',
                '#FFC533',
                '#285FD3'],
            data: [unpaid, paid , support],
 
            borderColor:    ['#fff'],
            borderWidth: [2,2]
        }
    ]
};

var options = {
        legend:{display:!1}
};



var myBarChart = new Chart(ctx, {
    type: 'pie',
    data: data,
    options: options
});
        </script>



        
        

        <script>


 



            function countdown( elementName, minutes, seconds )
            {
                var element, endTime, hours, mins, msLeft, time;

                function twoDigits( n )
                {
                    return (n <= 9 ? "0" + n : n);
                }

                function updateTimer()
                {
                    msLeft = endTime - (+new Date);
                    if ( msLeft < 1000 ) {
                        element.innerHTML = "Time is up!";
                        $.ajax({
                            url:"login",
                            type:"POST",
                            data:{"_token":"{{ csrf_token() }}"},
                            success: function() {
                                window.location.href('/login');
                            }
                        });
                    } else {
                        time = new Date( msLeft );
                        hours = time.getUTCHours();
                        mins = time.getUTCMinutes();
                        element.innerHTML = (hours ? hours + ':' + twoDigits( mins ) : mins) + ':' + twoDigits( time.getUTCSeconds() );
                        setTimeout( updateTimer, time.getUTCMilliseconds() + 500 );
                    }
                }

                element = document.getElementById( elementName );
                endTime = (+new Date) + 1000 * (60*minutes + seconds) + 500;
                updateTimer();
            }

            countdown( "ten-countdown", 30, 0 );

            



        </script>
        <!-- END: JS Assets-->
    </body>
</html>