<?php
include('session.php');

?>

<html lang="en">

<head>
    <title><?php echo $s0['instansi']; ?>: User Area</title>

    <!-- Meta -->
    <meta charset="utf-8">
    <!-- <meta content="width=device-width, initial-scale=1.0" name="viewport"> -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, height=device-height, initial-scale=0.65, maximum-scale=1, minimum-scale=0.65">
    <meta name="theme-color" content="#272b30">

    <!-- Favicon -->
    <link rel="icon" type="image/png" href="<?php echo $urlwebs; ?>/upload/favicon.png">

    <!-- CSS Global Compulsory -->

    <link rel="stylesheet" href="<?php echo $urlwebs; ?>/assets/home/bootstrap.web.min.css">
    <link href="https://fonts.googleapis.com/css?family=Abel" rel="stylesheet">
    <style>
        .blink_me {
            animation: blinker 1s step-start infinite;
        }

        @keyframes blinker {
            20% {
                opacity: 0.2;
            }
        }
    </style>
    <!-- JS Global Compulsory -->
    <script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@3.4.1/dist/js/bootstrap.min.js" integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
    <script src="<?php echo $urlwebs; ?>/js/4dv5.js"></script>
    <script>
        function secondtominute(d) {
            var m = Math.floor(d / (60));
            var s = d - (m * 60);
            if (s < 10) s = '0' + s;
            return m + ':' + s;
        }
    </script>

</head>


<body>
<?php include('uptop.php'); ?>


    

        <div class="clearfix"></div>
        <link rel="stylesheet" href="<?php echo $urlwebs; ?>/assets/home/m.css">
        <!-- MAIN TAB -->

        <?php include('navtab.php'); ?>


       <div class="tab-content">

    <div id="games_wrap" class="tab-pane fade in">
        <!-- Konten game utama bisa ditempatkan di sini -->
    </div>

    <div id="sport_wrap" class="tab-pane fade in active">
        <div style="margin-top:0px;">
            <img src="<?php echo $urlwebs; ?>/images/pp.png" height="30" alt="" style="vertical-align:text-bottom; margin-right:5px">
            <span style="font-size:16px; font-weight:bold">Sport Pragmatic</span>
        </div>
        <hr style="margin-top:5px; height:2px">

        <div class="text-center tab-pane fade in">
    <?php
    // Daftar provider sport
    $providers = ['AF', 'IB'];

    foreach ($providers as $provider) {
        $sql = mysqli_query($conn, "SELECT * FROM `game_list` WHERE `game_provider` = '$provider' AND game_status = 1") 
            or die(mysqli_error($conn));

        if (mysqli_num_rows($sql) == 0) {
            echo "<p>Tidak ada game untuk provider $provider</p>";
            continue;
        }

        while ($s = mysqli_fetch_array($sql)) {
    ?>
            <div style="height:145px; width:175px; display:inline-block; text-align:center; vertical-align:top; cursor:pointer">
                <a href="javascript:void(0);" onclick="Swal.fire({
                    icon: 'info',
                    title: 'Maintenance',
                    text: 'Game ini sedang dalam maintenance',
                    confirmButtonText: 'Oke'
                });">
                    <img src="<?php echo $s['game_image']; ?>" style="width:165px">
                    <div style="text-align:center; margin-top:5px;"><?php echo $s['game_name']; ?></div>
                </a>
            </div>
    <?php
        } // end while
    } // end foreach
    ?>
    <br>
</div>


        <p>&nbsp;</p>
    </div>

</div>

<div style="clear: both;"></div>

    <div class="well well-sm container-fluid text-center" style="margin:0px; padding:5px; border-radius:0px; padding-bottom: 55px">
        © 2018 - 2023 Copyright <?php echo $s0['instansi']; ?>. All Rights Reserved.
    </div>


   <!--tampilan /m/ versi mobile bawah trakhir alias footer--><!--next halaman footer-->
<?php include('footer.php'); ?>






</html>
