<?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>
<?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 id="games_wrap" class="tab-pane fade in active">

  <div id="launch_window" style="position:absolute; left:0px; top:0px; width:100%; height:100%; display:none">
    <iframe id="embedgameIframe" name="embedgameIframe" scrolling="no" width="100%" height="100%" src="pleaseWait.html" allowfullscreen="" frameborder="0" style="margin: 0; padding: 0; white-space: nowrap; border: 0; background-color:#272b30">
    </iframe>
  </div>

  <div id="game_window" style="width:100%;">

    <ul class="nav nav-pills grabgtab" style="padding-bottom:0px; font-size:16px; font-weight:normal;">
        
        

      <li class="" id="tab_pp" style="width:32.78%; margin-left:2px; margin-bottom: 2px; font-weight: normal" onclick="location.href='?games&amp;head=games&amp;gid=PR'"><a href="slots.php" style="padding-left:5px"><span><img src="<?php echo $urlwebs; ?>/images/pp.png" height="25" alt="" style="vertical-align:bottom">&nbsp;Pragmatic</span><span style="position:absolute; margin-top:-20px; margin-left:0px;"><img src="<?php echo $urlwebs; ?>/images/dailywins.png" height="45" alt=""/></span></a></li>
     
      <li class="" id="tab_pg" style="width:32.78%; margin-left:2px; margin-bottom: 2px; font-weight: normal" ><a href="/pg.php" style="padding-left:5px"><span><img src="<?php echo $urlwebs; ?>/images/pg.png" height="25" alt="" style="vertical-align:bottom">&nbsp;PGSoft</span><span style="position:absolute; margin-top:-13px; margin-left:5px"><img src="<?php echo $urlwebs; ?>/images/hot.png" width="30" alt=""></span> </a></li>
        
        
        
        <li class="" id="tab_hb" style="width:32.78%; margin-left:2px; margin-bottom: 2px; font-weight: normal")><a href="/m/hb.php" style="padding-left:5px"><span><img src="<?php echo $urlwebs; ?>/images/hb.png" height="25" alt="" style="vertical-align:bottom">&nbsp;Habanero</span>

        </a></li>
        <li class="active" id="tab_jg" style="width:24.5%; margin-left:2px; margin-bottom: 2px; font-weight: normal"><a href="/m/jk.php" style="padding-left:5px"><span><img src="<?php echo $urlwebs; ?>/images/jg.png" height="25" alt="" style="vertical-align:bottom">&nbsp;Joker</span>

        </a></li>
        <li class="" id="tab_sg" style="width:24.5%; margin-left:2px; margin-bottom: 2px; font-weight: normal"><a href="/m/sg.php" style="padding-left:5px"><span><img src="<?php echo $urlwebs; ?>/images/sg.png" height="25" alt="" style="vertical-align:bottom">&nbsp;Spade</span>

        </a></li>
        <li class="" id="tab_jl" style="width:24.5%; margin-left:2px; margin-bottom: 2px; font-weight: normal" ><a href="/m/ja.php" style="padding-left:5px"><span><img src="<?php echo $urlwebs; ?>/images/jl.png" height="25" alt="" style="vertical-align:bottom">&nbsp;JILI</span>

        </a></li>
        <li class="" id="tab_ps" style="width:24.5%; margin-left:2px; margin-bottom: 2px; font-weight: normal"><a href="ps.php" style="padding-left:5px"><span><img src="<?php echo $urlwebs; ?>/images/ps.png" height="25" alt="" style="vertical-align:bottom">&nbsp;PlayStar</span>

          <span style="position:absolute; margin-top:-20px; margin-left:-20px;"><img src="<?php echo $urlwebs; ?>/images/new2.png" width="40" alt=""></span> </a></li>
          <li class="" id="tab_cq9" style="width:24.5%; margin-left:2px; margin-bottom: 2px; font-weight: normal" ><a data-toggle="tab" href="cq9.php" style="padding-left:5px"><span><img src="<?php echo $urlwebs; ?>/images/cq9.png" height="25" alt="" style="vertical-align:bottom">&nbsp;</span>

          </a></li>
          <li class="" id="tab_mg" style="width:24.5%; margin-left:2px; margin-bottom: 2px; font-weight: normal" ><a href="/m/mp.php" style="padding-left:5px"><span><img src="<?php echo $urlwebs; ?>/images/mg.png" height="25" alt="" style="vertical-align:bottom">&nbsp;Micro</span>

          </a></li>
        </ul>

        <div style="height:10px; background-color:#FFF" class="grabgtabbottom"></div>

        <div class="tab-content">


          <div id="games_window_pp" class="tab-pane fade in active">
            <ul class="nav nav-pills">
              <li style="width:20%" class="active"><a data-toggle="pill" href="#ppslot">✨ Slots</a></li>
              <li style="width:20%"><a data-toggle="pill" href="#pphot">🔥 Top 20</a></li>
              <li style="width:30%"><a data-toggle="pill" href="#ppspin">⭐ Fitur Beli FreeSpin</a></li>
              <li style="width:28%"><a data-toggle="pill" href="#pppoker">♣ Card &amp; Table</a></li>
            </ul>

            <div style="margin-top:10px; margin-right: 6px">
              <form method="GET" style="width:200px;  float:right;">
                <div class="input-group">

                  <label>Cari :</label>
                  <input type="text" name="cari">
                  <input type="submit" class="btn btn-primary btn-block"value="Cari">
                </div>
              </form>
              <?php 
              if(isset($_GET['cari'])){
               $cari = $_GET['cari'];
               echo '
               <div class="btn btn-primary" role="alert">
               <span class="alert-icon text-success ">
               <i class="ti ti-check ti-xs"></i>
               </span>
               Permainan yang di cari : <span> '. $cari .'</span>
               </div>
               ';
               
             }
             ?>
           </div>
           <div style="clear:both;"></div>
         </div>
         <div class="tab-content" style="margin-top:20px">
          <div id="ppslot" class="text-center tab-pane fade in active">

            <?php 
                if(isset($_GET['cari'])){
                 $cari = $_GET['cari'];
               }
            ?>

           <table border="1">
             <tr>
              <th>No</th>
              <th>Nama</th>
              <th>Spesialis</th>
              <th>Hari</th>
            </tr>
            <?php 
                if(isset($_GET['cari'])){
                  $cari = $_GET['cari'];
                  $data = mysqli_query($conn,"select * from game_list where game_provider='JK' AND game_name like '%".$cari."%'");
                }else {
                    $data = mysqli_query($conn, "SELECT * FROM game_list WHERE game_provider='JK' AND game_type='SL'");  
                }
                $no = 1;
                while($d = mysqli_fetch_array($data)){
                 ?>
                 <?php
                 if(isset($_SESSION['user'])){
                  $externalPlayerId = $_SESSION['user'];
                  $playUrl = $urlweb.'/m/gameplay.php?provider='.$d['game_provider'].'&gamecode='.$d['game_code'];
                }
                else {
                  $playUrl = $urlweb.'/login/';
                }
                $random = mt_rand(40,100);
                if($random < 55){
                  $warna = 'bg-danger';
                }    
                else if($random >= 55 && $random < 75){
                  $warna = 'bg-warning';
                }
                else if($random >= 75){
                  $warna = 'bg-success';
                }
            ?>

            <div style="height:190px; width:170px;display:inline-block; text-align:ri; vertical-align:top">
              <a href="<?php echo $playUrl; ?>">
                <img src="<?php echo $d['game_image']; ?>" style="width:150px">
                <div style="text-align:center; margin-top:3px;"><?php echo $d['game_name']; ?></div>
              </a>
            </div>
          <?php } ?>
        </div>
    </div>
    <div class="well well-sm container-fluid text-center" style="margin:0px; padding:5px; border-radius:0px; padding-bottom: 55px">
      © 2018 - 2024 Copyright <?php echo $s0['instansi']; ?>. All Rights Reserved.
    </div>
  }
  <?php include('footer.php'); ?>
</body>

</html>