<?php
session_start();
@$userKey = $_SESSION['loginKey'];

if($userKey == "")
{
    echo "<script>window.open('login.php','_self')</script>";
}


include "control/activity.php";
$dd = new activity();

$table = "userdetails";
$condition = " where userKey='$userKey'";
$getuserdetails = $dd->single($table,$condition);






$table = "wingo_game_runing";
$condition = " where game_number='1'";
$getCountDwon = $dd->single($table,$condition);
$newSecound = $getCountDwon['time_perods']-date("s");





$table = "admin_calculation";
$condition = null;
$getAdminDetails = $dd->single($table,$condition);
$fevicon = $getAdminDetails['favicon'];
$notice = $getAdminDetails['notice'];
$loginImg = $getAdminDetails['login_img'];



$game = $_REQUEST['game'];
if($game == "1")
{
    $gm = "1";
}


if($game == "3")
{
    $gm = "2";
}

if($game == "5")
{
    $gm = "3";
}

if($game == "10")
{
    $gm = "4";
}


$table = "k3existing_result";
$condition = " where game_number='$gm' ORDER BY 1 DESC";
$getExistingGame = $dd->single($table,$condition);
$lastResult = explode(",",$getExistingGame['result']);
?>


<!DOCTYPE html>
<html lang="en" translate="no">
<head>
<meta charset="UTF-8">
<link rel="icon" type="image/svg+xml" href="temp_img/<?= $fevicon; ?>">
<meta name="google" content="notranslate">
<meta name="robots" content="noindex,nofollow">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title><?= $getAdminDetails['title']; ?></title>
<link rel="stylesheet" href="css/slick.css" />
<link rel="stylesheet" href="css/modules.css" />
<link rel="stylesheet" href="css/style.css" />
<script src="js/jquery.min.js" type="text/javascript"></script>
<script src="js/slick.min.js" type="text/javascript"></script>
<script src="js/main.js" type="text/javascript"></script>
</head>
<body>
<div id="app">
    <div class="K3__C">
        <div class="navbar">
            <div class="navbar-fixed" style="background: linear-gradient(90deg, rgb(222, 35, 37) 0%, rgb(255, 80, 74) 100%);">
                <div class="navbar__content">
                    <div data-v-905dfe8c="" class="navbar__content-left" onclick="clicktoBack()"><div data-v-905dfe8c="" class="backIcon"></div></div>
                    <div data-v-905dfe8c="" class="navbar__content-center">
                            <div data-v-905dfe8c="" class="headLogo" style="background-image: url(temp_img/<?= $loginImg; ?>);"></div>
                </div>
                <!--<div data-v-905dfe8c="" class="navbar__content-right">-->
                <!--    <div class="WinGo__C-head-more">-->
                <!--        <div data-v-fc1eb9e5="" class="customer-care"></div>-->
                <!--        <div data-v-fc1eb9e5="" class="Voice"></div>-->
                <!--    </div>-->
                <!--</div>-->
                </div>
            </div>
        </div>
<script>
  function clicktoBack()
  {
    window.open('index.php','_self');
  }

</script>

        <div class="Wallet__C">
            <div class="Wallet__C-balance">
                <div class="Wallet__C-balance-l1"  onclick="gettorefresh()">
                    <div data-v-ed6673b8="">₹<?= round($getuserdetails['wallet'],2); ?></div>
                </div>
                <div class="Wallet__C-balance-l2">
                    <div data-v-ed6673b8="">Wallet balance</div>
                </div>
                <div class="Wallet__C-balance-l3">
                    <div data-v-ed6673b8=""  onclick="getActionForwithdrawordeposit('1')">Withdraw</div><div data-v-ed6673b8=""  onclick="getActionForwithdrawordeposit('2')">Deposit</div>
                </div>
            </div>
        </div>
        <div class="noticeBar__container">
            <svg data-v-6c05b3dc="" width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_589_37747)"><path d="M15.9993 4V28C11.3327 28 7.86502 21.8927 7.86502 21.8927H3.99935C3.26297 21.8927 2.66602 21.2958 2.66602 20.5594V11.3405C2.66602 10.6041 3.26297 10.0072 3.99935 10.0072H7.86502C7.86502 10.0072 11.3327 4 15.9993 4Z" fill="url(#paint0_linear_589_37747)"></path><path d="M21.334 10C21.7495 10.371 22.1261 10.7865 22.4567 11.2392C23.4265 12.5669 24.0007 14.2149 24.0007 16C24.0007 17.7697 23.4363 19.4045 22.4819 20.7262C22.1452 21.1923 21.7601 21.6195 21.334 22" stroke="url(#paint1_linear_589_37747)" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"></path><path d="M22.8242 27.4571C26.7227 25.1302 29.3336 20.87 29.3336 16C29.3336 11.2057 26.8031 7.00234 23.005 4.65271" stroke="url(#paint2_linear_589_37747)" stroke-width="1.8" stroke-linecap="round"></path></g><defs><linearGradient id="paint0_linear_589_37747" x1="9.33268" y1="4" x2="9.33268" y2="28" gradientUnits="userSpaceOnUse"><stop stop-color="#FF7C7C"></stop><stop offset="0.74876" stop-color="#F54545"></stop></linearGradient><linearGradient id="paint1_linear_589_37747" x1="22.6673" y1="10" x2="22.6673" y2="22" gradientUnits="userSpaceOnUse"><stop stop-color="#FF7C7C"></stop><stop offset="0.74876" stop-color="#F54545"></stop></linearGradient><linearGradient id="paint2_linear_589_37747" x1="26.0789" y1="4.65271" x2="26.0789" y2="27.4571" gradientUnits="userSpaceOnUse"><stop stop-color="#FF7C7C"></stop><stop offset="0.74876" stop-color="#F54545"></stop></linearGradient><clipPath id="clip0_589_37747"><rect width="32" height="32" fill="white"></rect></clipPath></defs></svg>
            <div class="noticeBar__container-body">
                <div class="noticeBar__container-body-text">
                    <div class="marquee-text">
                        <?= $notice; ?>
                    </div>
                </div>
            </div>
            <button data-v-6c05b3dc=""><svg data-v-6c05b3dc="" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_589_37755)"><path d="M24 0H0V24H24V0Z" fill="white" fill-opacity="0.01"></path><path d="M12 22C16.1173 22 19.4999 18.7371 19.4999 14.5491C19.4999 13.5209 19.4476 12.4187 18.8778 10.7058C18.3079 8.9929 18.1931 8.7718 17.5905 7.71395C17.333 9.8727 15.9555 10.7724 15.6055 11.0413C15.6055 10.7615 14.7722 7.66795 13.5088 5.81695C12.2685 4 10.5817 2.80796 9.59265 2C9.59265 3.53489 9.16095 5.81695 8.5427 6.9797C7.92445 8.14245 7.80835 8.1848 7.0361 9.0501C6.2639 9.9154 5.90945 10.1826 5.2637 11.2325C4.61798 12.2825 4.5 13.6809 4.5 14.7091C4.5 18.8971 7.88265 22 12 22Z" fill="white"></path></g><defs><clipPath id="clip0_589_37755"><rect width="24" height="24" fill="white"></rect></clipPath></defs></svg> Detail</button>
        </div>

        <div class="GameList__C">
            <div id="durationAction1" onclick="durationActivity('1')" class="GameList__C-item active" data-id="one_Min">
                <div data-v-484ec2ec="">K3 Lotre<br>1Min</div>
            </div>
            <div id="durationAction2" onclick="durationActivity('3')" class="GameList__C-item" data-id="three_Min">
                <div data-v-484ec2ec="">K3 Lotre<br>3Min</div>
            </div>
            <div id="durationAction3" onclick="durationActivity('5')" class="GameList__C-item" data-id="five_Min">
                <div data-v-484ec2ec="">K3 Lotre<br>5Min</div>
            </div>
            <div id="durationAction4" onclick="durationActivity('10')" class="GameList__C-item" data-id="ten_Min">
                <div data-v-484ec2ec="">K3 Lotre<br>10Min</div>
            </div>
        </div>

<div class="bet_details" style="display:none;" id="responceFrom"></div>
        
        
        
        
        
        
         <div class="WinningTip__C" id="gameClosedPopupZone" onclick="congpopupZoneForCloseFunction()">
            	<div class="WinningTip__C-body" id="changeClass">
            		<div data-v-dadb0ae1="" class="WinningTip__C-body-l1" id="congorloss"></div>
            		<div class="WinningTip__C-body-l2 typeundefined">
            			K3Lottery results 
            			<div data-v-537dde41="" id="bigsmallPopup"></div>
            			<div data-v-537dde41="" class="WinningNum" id="isnumber"></div>
            			<!--<div data-v-537dde41="" id="isbigsmall">1</div>-->
            		</div>
            		<div class="WinningTip__C-body-l3">
            			<div data-v-dadb0ae1="" class="head" id="ifwin"></div>
            			<div data-v-dadb0ae1="" class="isLose" id="isloss"></div>
            			<div data-v-dadb0ae1="" class="bonus" id="amountWhenWinn"></div>
            			<div data-v-537dde41="" class="gameDetail" id="showPeriods"></div>
            		</div>
            		<!--<div class="WinningTip__C-body-l4">
            			<div data-v-dadb0ae1="" class="acitveBtn"></div>
            			 3 seconds auto close
            		</div>-->
            		<div data-v-dadb0ae1="" class="closeBtn"></div>
            	</div>
            </div>
        
        
        
        
        

        <div class="wingo-tab-content">

                <div class="wingoGame active" id="one_Min">
                <div class="K3TL__C">
                    <div class="K3TL__C-l1">
                        <div class="left">
                            <div data-v-60ededf7="">Period</div>
                            <div data-v-60ededf7="" class="K3TL__C-rule">How to play</div>
                        </div>
                    </div>
                    <?php
                      $run = $_REQUEST['game'];
                      
                      if($run == 3)
                      {
                        $run = 2;
                      }

                      if($run == 5)
                      {
                        $run = 3;
                      }


                      if($run == 10)
                      {
                        $run = 4;
                      }


                      $table = "k3_game_runing";
                      $condition = " where game_number='$run'";
                      $getGameDetails = $dd->single($table,$condition);
                      $leftTime = $getGameDetails['duration']*60-date("s");
                      $periods = $getGameDetails['periods'];
                    ?>
                    <div class="K3TL__C-l2">
                        <div data-v-60ededf7=""><?= $getGameDetails['periods']; ?></div>
                        <div class="K3TL__C-time">
                            <!-- <span id="K3_1m" style="display:block;"></span>
                            <span id="K3_3m" style="display:none;"></span>
                            <span id="K3_5m" style="display:none;"></span>
                            <span id="K3_10m" style="display:none;"></span>
                            <div data-v-60ededf7="">0</div>
                            <div data-v-60ededf7="">0</div>
                            <div data-v-60ededf7="" notime="">:</div>
                            <div data-v-60ededf7="">4</div>
                            <div data-v-60ededf7="">6</div> -->

                            <div data-v-c0d1aac6="" style="display:block;" id="min_1"></div>
                             <div data-v-c0d1aac6="" style="display:block;" id="min_2"></div>
                             <div data-v-c0d1aac6="" style="display:block;" id="midleDott"></div>
                             <div data-v-c0d1aac6="" style="display:block;"  id="sec_1"></div>
                             <div data-v-c0d1aac6="" style="display:block;"  id="sec_2"></div>
                        </div>
                    </div>
                    <div class="K3TL__C-l3">

                        

                        <div class="box">
                            <div data-v-60ededf7="" id="gotinumber1" class="num1"></div>
                            <div data-v-60ededf7="" id="gotinumber2" class="num2"></div>
                            <div data-v-60ededf7="" id="gotinumber3" class="num3"></div>
                        </div>
                    </div>
                </div>
 
 <audio id="myAudio">
  <source src="newSound.mp3" type="audio/mpeg">
  Your browser does not support the audio element.
</audio>

 <script>
 
 function congpopupZoneForCloseFunction()
{
  document.getElementById("gameClosedPopupZone").style.display = "none";
  window.open('?game='+<?= $_REQUEST['game']; ?>,'_self');
}
 
 
 

window.onload = function() {
   var getfulltime = <?= $leftTime; ?>;

  var sec = getfulltime;
  setInterval(function() {
    
    if(sec <= 0 )
    {
        document.getElementById("myAudio").pause();
        var minn = 00;
        getProccessedForResult('<?= $periods; ?>');
    }else{
        if(sec > 60){
          var minn = 1;  
        }else{
            var minn = 0;   
        }

        
        if(sec > 120){
            var minn = 2;  
        }

        
        if(sec > 180){
            var minn = 3;  
        }

        
        if(sec > 240){
            var minn = 4;  
        }

        if(sec > 300){
            var minn = 5;  
        }

        if(sec > 360){
            var minn = 6;  
        }

        if(sec > 420){
            var minn = 7;  
        }


        if(sec > 480){
            var minn = 8;  
        }


        if(sec > 540){
            var minn = 9;  
        }

        if(sec > 600){
            var minn = 10;  
        }


        

        sec--;
    }
    var sssss = sec-minn*60;
    
    if(sssss < 10)
    {
        sssss = sssss;
        sssss1 = "0";
    }else{
        var tytyty = sssss.toString();
        sssss1 = tytyty.substr(0, 1);
        sssss = tytyty.substr(1, 1);
    }


    if(sec <=5 && sec>=1)
    {
        document.getElementById("myAudio").play(); 
        document.getElementById("ertyuisdfghjk45678").style.display = "block";
        document.getElementById("setCountdwonTimeForBlock").innerHTML = sec;
        document.getElementById("orderplacedPopup").style.display = "none";
    }
   else{
      document.getElementById("myAudio").pause();
      document.getElementById("ertyuisdfghjk45678").style.display = "none";
    }
           document.getElementById("min_1").innerHTML = "0";
           document.getElementById("min_2").innerHTML = minn;
           document.getElementById("midleDott").innerHTML = ":";
           document.getElementById("sec_1").innerHTML = sssss1;
           document.getElementById("sec_2").innerHTML = sssss; 
    
  }, 1000);
   }






   function getProccessedForResult(a)
   {
      
    
    setInterval(function() {
        const xhttp = new XMLHttpRequest();
        xhttp.onload = function() {
            var demo_show = this.responseText;
            const myArr = JSON.parse(demo_show);
            if(myArr.status == "success")
            {
                 if(myArr.winorloss == "1"){
                    document.getElementById('isnumber').innerHTML = myArr.result;
                    document.getElementById('bigsmallPopup').innerHTML = myArr.bigsmall;
                //   document.getElementById('isbigsmall').innerHTML = rrBigSmall;
                   document.getElementById('congorloss').innerHTML = "Congratulations";
                   document.getElementById('ifwin').innerHTML = "Bonus";
                   document.getElementById('amountWhenWinn').innerHTML = myArr.amount;
                   document.getElementById("gameClosedPopupZone").style.display = "block";
                   document.getElementById('showPeriods').innerHTML = "Period:1 minute "+myArr.periods;
                   document.getElementById("changeClass").setAttribute("class", "WinningTip__C-body");
               }else if(myArr.winorloss == "0"){
                  document.getElementById('isnumber').innerHTML = myArr.result;
                  document.getElementById('bigsmallPopup').innerHTML = myArr.bigsmall;
                //   document.getElementById('isbigsmall').innerHTML = rrBigSmall;
                   document.getElementById('isloss').innerHTML = "Loss";
                   document.getElementById('congorloss').innerHTML = "Sorry";
                   document.getElementById("gameClosedPopupZone").style.display = "block";
                   document.getElementById('showPeriods').innerHTML = "Period:1 minute "+myArr.periods;
                   document.getElementById("changeClass").setAttribute("class", "WinningTip__C-body isL");
                   
               }
             
            }else{
               window.open('?game='+<?= $_REQUEST['game']; ?>,'_self');
            }
        }
        xhttp.open("GET", "getK3LiveResult.php?periods="+a+"&userkey="+<?= $userKey; ?>+"&game="+<?= $run; ?>);
        xhttp.send(); 

  }, 1000);     


   }


    // document.getElementById("min_1").innerHTML = "0";
    // document.getElementById("min_2").innerHTML = "1";
    // document.getElementById("midleDott").innerHTML = ":";
    // document.getElementById("sec_1").innerHTML = "2";
    // document.getElementById("sec_2").innerHTML = "3"; 
    


 
 
 function gettorefresh()
   {
       window.open('?game='+<?= $_REQUEST['game']; ?>,'_self');
   }

///////////////////////-----------------------Withdraw AND Diposit section ----------///////
function getActionForwithdrawordeposit(a)
   {
      if(a == 1)
      {
          window.open('withdraw.php','_self');
      }

      
      if(a == 2)
      {
          window.open('deposit.php','_self');
      }
   }





i = 0;

const rnumber = ["111", "243", "265","112","432","532","112","432","532","112","432","532","112","432","231"];
sendReq(i,rnumber);            
function sendReq(i,rnumber)
{
    i++;

    if(i == rnumber.length){
        var f1 = <?= $lastResult[0]; ?>;
        var f2 = <?= $lastResult[1]; ?>;
        var f3 = <?= $lastResult[2]; ?>;
        document.getElementById("gotinumber1").setAttribute("class", "num"+f1);
        document.getElementById("gotinumber2").setAttribute("class", "num"+f2);
        document.getElementById("gotinumber3").setAttribute("class", "num"+f3);
    }
    else{
        setTimeout(function () {
            var getNum = rnumber[i];
            var f2 = getNum.substr(1, 1);
            var f3 = getNum.substr(2, 2);
            var f1 = getNum.substr(0, 1);
            document.getElementById("gotinumber1").setAttribute("class", "num"+f1);
            document.getElementById("gotinumber2").setAttribute("class", "num"+f2);
            document.getElementById("gotinumber3").setAttribute("class", "num"+f3);
            sendReq(i,rnumber);
    }, 100);
   } 
}
  
 
    
</script>
                <div class="howToPlay_k3">
                    <div class="van-overlay" data-v-a7a14dc2="" style="z-index: 2000;"><!----></div>
                    <div class="van-popup van-popup--round van-popup--center" style="z-index: 2003;">
                        <div class="TimeLeft__C-PreSale">
                            <div data-v-a7a14dc2="" class="TimeLeft__C-PreSale-head">How to play</div>
                            <div data-v-a7a14dc2="" class="TimeLeft__C-PreSale-body">
                                <div data-v-a7a14dc2="">
                                    <p class="MsoNormal"><font face="宋体">Fast 3 open with 3 numbers in each period as the opening number，The opening numbers are 111 to 666 Natural number，No zeros in the array，And the opening numbers are in no particular order，Quick 3 is to guess all or part of the 3 winning numbers.</font></p><p class="MsoNormal">Sum Value</p><p class="MsoNormal">Place a bet on the sum of three numbers</p><p class="MsoNormal">Choose 3 same number all</p><p class="MsoNormal">For all the same three numbers（111、222、…、666）Make an all-inclusive bet</p><p class="MsoNormal">Choose 3 same number single</p><p class="MsoNormal">From all the same three numbers（111、…、666）Choose a group of numbers in any of them to place bets</p><p class="MsoNormal">Choose 2 Same Multiple</p><p class="MsoNormal">Place a bet on two designated same numbers and an arbitrary number among the three numbers</p><p class="MsoNormal">Choose 2 Same Single</p><p class="MsoNormal">Place a bet on two designated same numbers and a designated different number among the three numbers</p><p class="MsoNormal">3 numbers different</p><p class="MsoNormal">Place a bet on three different numbers</p><p class="MsoNormal">2 numbers different</p><p class="MsoNormal">Place a bet on two designated different numbers and an arbitrary number among the three numbers</p><p class="MsoNormal">Choose 3 Consecutive number all</p><p class="MsoNormal">For all three consecutive numbers（123、234、345、456）Place a bet</p><p class="MsoNormal">Description of winning and odds:</p><p class="MsoNormal">Sum Value</p><p class="MsoNormal">A bet with the same opening number and value is the winning</p><p class="MsoNormal">Choose 3 same number all</p><p class="MsoNormal">If the opening numbers are any three of the same number, it is the winning</p><p class="MsoNormal">Choose 3 same number single</p><p class="MsoNormal">A bet that is exactly the same as the opening number is the winning</p><p class="MsoNormal">Choose 2 Same Multiple</p><p class="MsoNormal">The same number as the two same numbers in the opening number (except for the three same numbers) is the winning</p><p class="MsoNormal">Choose 2 Same Single</p><p class="MsoNormal">A bet that is exactly the same as the opening number is the winning</p><p class="MsoNormal">3 numbers different</p><p class="MsoNormal">A bet that is exactly the same as the opening number is the winning</p><p class="MsoNormal">2 numbers different</p><p class="MsoNormal">The same as the two arbitrary numbers in the opening number is the winning</p><p class="MsoNormal">Choose 3 Consecutive number all</p><p class="MsoNormal">If the opening numbers are any three consecutive numbers, it is the winning<br></p><p class="MsoNormal"><br></p>
                                </div>
                            </div>
                            <div data-v-a7a14dc2="" class="TimeLeft__C-PreSale-foot">
                                <div data-v-a7a14dc2="" class="TimeLeft__C-PreSale-foot-btn">Close</div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="K3B__C">
                    <!--<div class="K3B__C-mark"  id="ertyuisdfghjk45678" style="display: none;">-->
                    <!--<div data-v-0aa493a0=""></div><div data-v-0aa493a0="" style="margin-left:100px; margin-top:40px;" id="setCountdwonTimeForBlock">5</div>-->
                    <!--<div class="Betting__C-mark_iner"><div data-v-a22770c4="">0</div><div data-v-a22770c4="" id="setCountdwonTimeForBlock">5</div></div>-->
                    <!--</div>-->
                    
                    <div class="Betting__C-mark" style="display: none;" id="ertyuisdfghjk45678">
                            <div class="Betting__C-mark_iner"><div data-v-a22770c4="">0</div><div data-v-a22770c4="" id="setCountdwonTimeForBlock">5</div></div>
                     </div>
                    
                    
                    <div class="K3B__C-nav">
                        <div data-v-b537c9f7="" onclick="gameActivity('1')" id="gameAction1" class="K3B_nav_item active" data-id="total">Total</div>
                        <div data-v-b537c9f7="" onclick="gameActivity('2')" id="gameAction2" class="K3B_nav_item" data-id="2_same">2 same</div>
                        <div data-v-b537c9f7="" onclick="gameActivity('3')" id="gameAction3" class="K3B_nav_item" data-id="3_same">3 same</div>
                        <div data-v-b537c9f7="" onclick="gameActivity('4')" id="gameAction4"  class="K3B_nav_item" data-id="Different">Different</div>
                    </div>



                    <div class="K3B_tab_content active" id="total">
                        <div class="K3B__C-bettingList">
                        <div class="num num3" onclick="selectNumber('3')">
                            <div class="ball rball">
                                <div data-v-01cf71e0="" class="K3B__C-odds-bet num3">3</div>
                            </div>
                            <div data-v-01cf71e0="" class="K3B__C-odds-rate">207.36X </div>
                        </div>
                        <div class="num num4"  onclick="selectNumber('4')">
                            <div data-v-01cf71e0="" class="ball gball"><div data-v-01cf71e0="" class="K3B__C-odds-bet num4">4</div></div>
                            <div data-v-01cf71e0="" class="K3B__C-odds-rate">69.12X </div>
                        </div>
                        <div class="num num5" onclick="selectNumber('5')">
                            <div data-v-01cf71e0="" class="ball rball"><div data-v-01cf71e0="" class="K3B__C-odds-bet num5">5</div></div>
                            <div data-v-01cf71e0="" class="K3B__C-odds-rate">34.56X </div>
                        </div>
                        <div class="num num6" onclick="selectNumber('6')">
                            <div data-v-01cf71e0="" class="ball gball"><div data-v-01cf71e0="" class="K3B__C-odds-bet num6">6</div></div>
                            <div data-v-01cf71e0="" class="K3B__C-odds-rate">20.74X </div>
                        </div>
                        <div class="num num7" onclick="selectNumber('7')">
                            <div data-v-01cf71e0="" class="ball rball"><div data-v-01cf71e0="" class="K3B__C-odds-bet num7">7</div></div>
                            <div data-v-01cf71e0="" class="K3B__C-odds-rate">13.83X </div>
                        </div>
                        <div class="num num8" onclick="selectNumber('8')">
                            <div data-v-01cf71e0="" class="ball gball"><div data-v-01cf71e0="" class="K3B__C-odds-bet num8">8</div></div>
                            <div data-v-01cf71e0="" class="K3B__C-odds-rate">9.88X </div>
                        </div>
                        <div class="num num9" onclick="selectNumber('9')">
                            <div data-v-01cf71e0="" class="ball rball"><div data-v-01cf71e0="" class="K3B__C-odds-bet num9">9</div></div>
                            <div data-v-01cf71e0="" class="K3B__C-odds-rate">8.3X </div>
                        </div>
                        <div class="num num10" onclick="selectNumber('10')">
                            <div data-v-01cf71e0="" class="ball gball"><div data-v-01cf71e0="" class="K3B__C-odds-bet num10">10</div></div>
                            <div data-v-01cf71e0="" class="K3B__C-odds-rate">7.68X </div>
                        </div>
                        <div class="num num11" onclick="selectNumber('11')">
                            <div data-v-01cf71e0="" class="ball rball"><div data-v-01cf71e0="" class="K3B__C-odds-bet num11">11</div></div>
                            <div data-v-01cf71e0="" class="K3B__C-odds-rate">7.68X </div>
                        </div>
                        <div class="num num12" onclick="selectNumber('12')">
                            <div data-v-01cf71e0="" class="ball gball"><div data-v-01cf71e0="" class="K3B__C-odds-bet num12">12</div></div>
                            <div data-v-01cf71e0="" class="K3B__C-odds-rate">8.3X </div>
                        </div>
                        <div class="num num13" onclick="selectNumber('13')">
                            <div data-v-01cf71e0="" class="ball gball"><div data-v-01cf71e0="" class="K3B__C-odds-bet num13">13</div></div>
                            <div data-v-01cf71e0="" class="K3B__C-odds-rate">9.88X </div>
                        </div>
                        <div class="num num14" onclick="selectNumber('14')">
                            <div data-v-01cf71e0="" class="ball gball"><div data-v-01cf71e0="" class="K3B__C-odds-bet num14">14</div></div>
                            <div data-v-01cf71e0="" class="K3B__C-odds-rate">13.83X </div>
                        </div>
                        <div class="num num15" onclick="selectNumber('15')">
                            <div data-v-01cf71e0="" class="ball rball"><div data-v-01cf71e0="" class="K3B__C-odds-bet num15">15</div></div>
                            <div data-v-01cf71e0="" class="K3B__C-odds-rate">20.74X </div>
                        </div>
                        <div class="num num16" onclick="selectNumber('16')">
                            <div data-v-01cf71e0="" class="ball gball"><div data-v-01cf71e0="" class="K3B__C-odds-bet num16">16</div></div>
                            <div data-v-01cf71e0="" class="K3B__C-odds-rate">34.56X </div>
                        </div>
                        <div class="num num17" onclick="selectNumber('17')">
                            <div data-v-01cf71e0="" class="ball rball"><div data-v-01cf71e0="" class="K3B__C-odds-bet num17">17</div></div>
                            <div data-v-01cf71e0="" class="K3B__C-odds-rate">69.12X </div>
                        </div>
                        <div class="num num18" onclick="selectNumber('18')">
                            <div data-v-01cf71e0="" class="ball gball"><div data-v-01cf71e0="" class="K3B__C-odds-bet num18">18</div></div>
                            <div data-v-01cf71e0="" class="K3B__C-odds-rate">207.36X </div>
                        </div>
                        <div data-v-01cf71e0="" class="num numA" onclick="getGameOrderBysmallorBig('big')"><div data-v-01cf71e0="" class="">Big</div><div data-v-01cf71e0="" class="K3B__C-odds-rate">1.92X </div></div>
                        <div data-v-01cf71e0="" class="num numB" onclick="getGameOrderBysmallorBig('small')"><div data-v-01cf71e0="" class="">Small</div><div data-v-01cf71e0="" class="K3B__C-odds-rate">1.92X </div></div>
                        <div data-v-01cf71e0="" class="num numC" onclick="getGameOrderBysmallorBig('odd')"><div data-v-01cf71e0="" class="">Odd</div><div data-v-01cf71e0="" class="K3B__C-odds-rate">1.92X </div></div>
                        <div data-v-01cf71e0="" class="num numD" onclick="getGameOrderBysmallorBig('even')"><div data-v-01cf71e0="" class="">Even</div><div data-v-01cf71e0="" class="K3B__C-odds-rate">1.92X </div></div>

                        </div>
                    </div>





                    <div class="K3B_tab_content" id="2_same" style="display:none;">
                        <div class="K3B__C-betting2">
                            <div class="K3B__C-betting2-tip1">
                                2 matching numbers: odds<span data-v-ab3a9776="">(13.83)</span><i data-v-ab3a9776="" class="van-badge__wrapper van-icon van-icon-question icon" style="color: rgb(250, 87, 74); font-size: 16px;"><!----><!----><!----></i>
                            </div>
                            <div class="K3B__C-betting2-line1 mb30">
                                <div data-v-ab3a9776="" id="same2number1" onclick="getSelectedNumber('11')" class="bg-info" ><div data-v-ab3a9776="">11</div></div>
                                <div data-v-ab3a9776="" id="same2number2" onclick="getSelectedNumber('22')" class=""><div data-v-ab3a9776="">22</div></div>
                                <div data-v-ab3a9776="" id="same2number3" onclick="getSelectedNumber('33')" class=""><div data-v-ab3a9776="">33</div></div>
                                <div data-v-ab3a9776="" id="same2number4" onclick="getSelectedNumber('44')" class=""><div data-v-ab3a9776="">44</div></div>
                                <div data-v-ab3a9776="" id="same2number5" onclick="getSelectedNumber('55')" class=""><div data-v-ab3a9776="">55</div></div>
                                <div data-v-ab3a9776="" id="same2number6" onclick="getSelectedNumber('66')" class=""><div data-v-ab3a9776="">66</div></div>
                            </div>
                            <div class="K3B__C-betting2-tip1">
                                A pair of unique numbers: odds<span data-v-ab3a9776="">(69.12)</span><i data-v-ab3a9776="" class="van-badge__wrapper van-icon van-icon-question icon" style="color: rgb(250, 87, 74); font-size: 16px;"><!----><!----><!----></i>
                            </div>
                            <div class="K3B__C-betting2-line2">
                                <div data-v-ab3a9776="" class=""><div data-v-ab3a9776="" class="">11</div></div>
                                <div data-v-ab3a9776="" class=""><div data-v-ab3a9776="" class="">22</div></div>
                                <div data-v-ab3a9776="" class=""><div data-v-ab3a9776="" class="">33</div></div>
                                <div data-v-ab3a9776="" class=""><div data-v-ab3a9776="" class="">44</div></div>
                                <div data-v-ab3a9776="" class=""><div data-v-ab3a9776="" class="">55</div></div>
                                <div data-v-ab3a9776="" class=""><div data-v-ab3a9776="" class="">66</div></div>
                            </div>


                            <div class="K3B__C-betting2-line3">
                                <div data-v-ab3a9776="" onclick="selectUniqueeNumber('1')" id="uniqueeSelectedNumber1" class=""><div data-v-ab3a9776="" class="">1</div></div>
                                <div data-v-ab3a9776="" onclick="selectUniqueeNumber('2')" id="uniqueeSelectedNumber2" class=""><div data-v-ab3a9776="" class="">2</div></div>
                                <div data-v-ab3a9776="" onclick="selectUniqueeNumber('3')" id="uniqueeSelectedNumber3" class=""><div data-v-ab3a9776="" class="">3</div></div>
                                <div data-v-ab3a9776="" onclick="selectUniqueeNumber('4')" id="uniqueeSelectedNumber4" class=""><div data-v-ab3a9776="" class="">4</div></div>
                                <div data-v-ab3a9776="" onclick="selectUniqueeNumber('5')" id="uniqueeSelectedNumber5" class=""><div data-v-ab3a9776="" class="">5</div></div>
                                <div data-v-ab3a9776="" onclick="selectUniqueeNumber('6')" id="uniqueeSelectedNumber6" class=""><div data-v-ab3a9776="" class="">6</div></div>
                            </div>


                        </div>
                    </div>

                    <div class="K3B_tab_content" id="3_same">
                        <div class="K3B__C-betting3">
                            <div class="K3B__C-betting3-tip1">
                                3 of the same number: odds <span data-v-d1d67fb2="">(207.36)</span><i data-v-d1d67fb2="" class="van-badge__wrapper van-icon van-icon-question icon" style="color: rgb(250, 87, 74); font-size: 16px;"><!----><!----><!----></i>
                            </div>
                            <div class="K3B__C-betting3-line1 mb30">
                                <div data-v-d1d67fb2="" class="" onclick="getThreeSameNumber('1')" id="setThreeSameNumber1"><div data-v-d1d67fb2="">111</div></div>
                                <div data-v-d1d67fb2="" class="" onclick="getThreeSameNumber('2')" id="setThreeSameNumber2"><div data-v-d1d67fb2="">222</div></div>
                                <div data-v-d1d67fb2="" class="" onclick="getThreeSameNumber('3')" id="setThreeSameNumber3"><div data-v-d1d67fb2="">333</div></div>
                                <div data-v-d1d67fb2="" class="" onclick="getThreeSameNumber('4')" id="setThreeSameNumber4"><div data-v-d1d67fb2="">444</div></div>
                                <div data-v-d1d67fb2="" class="" onclick="getThreeSameNumber('5')" id="setThreeSameNumber5"><div data-v-d1d67fb2="">555</div></div>
                                <div data-v-d1d67fb2="" class="" onclick="getThreeSameNumber('6')" id="setThreeSameNumber6"><div data-v-d1d67fb2="">666</div></div>
                            </div>
                            <div class="K3B__C-betting3-tip1">
                                Any 3 of the same number: odds <span data-v-d1d67fb2="">(34.56)</span><i data-v-d1d67fb2="" class="van-badge__wrapper van-icon van-icon-question icon" style="color: rgb(250, 87, 74); font-size: 16px;"><!----><!----><!----></i>
                            </div>
                            <div data-v-d1d67fb2="" onclick="getThreeSameNumber('7')" class="K3B__C-betting3-btn">Any 3 of the same number: odds</div>
                        </div>
                    </div>

                    <div class="K3B_tab_content" id="Different">
                        <div class="K3B__C-betting4">
                            <div data-v-c6b7f91d="" class="K3B__C-betting4-tip1">3 different numbers: odds <span data-v-c6b7f91d="">(34.56)</span><i data-v-c6b7f91d="" class="van-badge__wrapper van-icon van-icon-question icon" style="color: rgb(250, 87, 74); font-size: 16px;"><!----><!----><!----></i></div>
                            <div class="K3B__C-betting4-line1 mb30">
                                <div data-v-c6b7f91d="" class="" onclick="getThreeDifrentNumbers('1')" id="setThreeDifrentNumber1"><div data-v-c6b7f91d="">1</div></div>  
                                <div data-v-c6b7f91d="" class="" onclick="getThreeDifrentNumbers('2')" id="setThreeDifrentNumber2"><div data-v-c6b7f91d="">2</div></div>
                                <div data-v-c6b7f91d="" class="" onclick="getThreeDifrentNumbers('3')" id="setThreeDifrentNumber3"><div data-v-c6b7f91d="">3</div></div>
                                <div data-v-c6b7f91d="" class="" onclick="getThreeDifrentNumbers('4')" id="setThreeDifrentNumber4"><div data-v-c6b7f91d="">4</div></div>
                                <div data-v-c6b7f91d="" class="" onclick="getThreeDifrentNumbers('5')" id="setThreeDifrentNumber5"><div data-v-c6b7f91d="">5</div></div>
                                <div data-v-c6b7f91d="" class="" onclick="getThreeDifrentNumbers('6')" id="setThreeDifrentNumber6"><div data-v-c6b7f91d="">6</div></div>
                            </div>
                            <div data-v-c6b7f91d="" class="K3B__C-betting4-tip1">3 continuous numbers: odds <span data-v-c6b7f91d="">(8.64)</span><i data-v-c6b7f91d="" class="van-badge__wrapper van-icon van-icon-question icon" style="color: rgb(250, 87, 74); font-size: 16px;"><!----><!----><!----></i></div>
                            <div data-v-c6b7f91d="" class="K3B__C-betting4-btn" onclick="getThreeDifrentNumbers('7')">3 continuous numbers</div>
                            <div data-v-c6b7f91d="" class="K3B__C-betting4-tip1">2 different numbers: odds <span data-v-c6b7f91d="">(6.91)</span><i data-v-c6b7f91d="" class="van-badge__wrapper van-icon van-icon-question icon" style="color: rgb(250, 87, 74); font-size: 16px;"><!----><!----><!----></i></div>
                            <div class="K3B__C-betting4-line1">
                                <div data-v-c6b7f91d="" class="" onclick="getTwoDifrentNumberInsideThree('1')" id="setTwoDiffrentNumberInsideThree1"><div data-v-c6b7f91d="">1</div></div>
                                <div data-v-c6b7f91d="" class="" onclick="getTwoDifrentNumberInsideThree('2')" id="setTwoDiffrentNumberInsideThree2"><div data-v-c6b7f91d="">2</div></div>
                                <div data-v-c6b7f91d="" class="" onclick="getTwoDifrentNumberInsideThree('3')" id="setTwoDiffrentNumberInsideThree3"><div data-v-c6b7f91d="">3</div></div>
                                <div data-v-c6b7f91d="" class="" onclick="getTwoDifrentNumberInsideThree('4')" id="setTwoDiffrentNumberInsideThree4"><div data-v-c6b7f91d="">4</div></div>
                                <div data-v-c6b7f91d="" class="" onclick="getTwoDifrentNumberInsideThree('5')" id="setTwoDiffrentNumberInsideThree5"><div data-v-c6b7f91d="">5</div></div>
                                <div data-v-c6b7f91d="" class="" onclick="getTwoDifrentNumberInsideThree('6')" id="setTwoDiffrentNumberInsideThree6"><div data-v-c6b7f91d="">6</div></div>
                            </div>
                        </div>
                    </div>

                </div>

                <div class="RecordNav__C">
                    <div class="history_tabs active" data-id="game_history">Game history</div>
                    <div class="history_tabs" data-id="my_history" >My history</div>
                </div>

                <div class="record_tabs">
                    <div class="GameRecord__C active" id="game_history">
                        <div class="GameRecord__C-head">
                            <div class="van-row">
                                <div data-v-f5a8bf77="" class="van-col van-col--10">Period</div>
                                <div data-v-f5a8bf77="" class="van-col van-col--4">Sum</div>
                                <div data-v-f5a8bf77="" class="van-col van-col--10">Results</div>
                            </div>
                        </div>
                        <div class="GameRecord__C-body">

                        <?php
                            $table = "k3existing_result";
                            $condition = " where game_number='$gm' ORDER BY 1 DESC limit 10";
                            $getResultList = $dd->fetch_multi($table,$condition);
                            foreach($getResultList as $key){
                                if($key->sum >= 10){
                                  $smallOrBig = "Big";
                                }
                                else{
                                    $smallOrBig = "Small";
                                }

                                $getBotonNumber = explode(",",$key->result);
                        ?>
                        <div class="GameRecord__C-body">
                            <div class="van-row">
                                <div data-v-f5a8bf77="" class="van-col van-col--8"><?= $key->periods; ?></div>
                                <div data-v-f5a8bf77="" class="van-col van-col--1"><span data-v-f5a8bf77=""><?= $key->sum; ?></span></div>
                                <div data-v-f5a8bf77="" class="van-col van-col--4"><span data-v-f5a8bf77=""><?= $smallOrBig; ?></span></div>
                                <div data-v-f5a8bf77="" class="van-col van-col--4"><span data-v-f5a8bf77=""><?= $key->oddoreven; ?></span></div>
                                <div data-v-f5a8bf77="" class="van-col van-col--6">
                                    <div class="GameRecord__C-body-premium">
                                        <div data-v-f5a8bf77="" class="n<?= $getBotonNumber[0]; ?>"></div>
                                        <div data-v-f5a8bf77="" class="n<?= $getBotonNumber[1]; ?>"></div>
                                        <div data-v-f5a8bf77="" class="n<?= $getBotonNumber[2]; ?>"></div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <?php } ?>

                           

                        </div>
                        <!--div class="GameRecord__C-foot">
                            <div class="GameRecord__C-foot-previous disabled">
                                <i data-v-c74f4bba="" class="van-badge__wrapper van-icon van-icon-arrow-left GameRecord__C-icon" style="font-size: 20px;"></i>
                            </div>
                            <div data-v-c74f4bba="" class="GameRecord__C-foot-page">1/100</div>
                            <div class="GameRecord__C-foot-next">
                                <i data-v-c74f4bba="" class="van-badge__wrapper van-icon van-icon-arrow GameRecord__C-icon" style="font-size: 20px;"></i>
                            </div>
                        </div-->
                        
                    </div>

                    


                    <div class="GameRecord__C" id="my_history">
                        <?php
                             $table = "k3_orders";
                             $condition = " where user_key='$userKey' AND game_number='$gm' AND status='pending' ORDER BY 1 DESC LIMIT 10";
                             $getBetDetails = $dd->fetch_multi($table,$condition);
                             foreach($getBetDetails as $key){
                                 if($key->selected_number == "")
                                 {
                                     $secltNumber = $key->bigorsmall;
                                 }else{
                                     $secltNumber = $key->selected_number;
                                 }
                        ?>
                        
                         <div class="GameRecord__C-body my_history">
                            <div class="van-row my_history_item">
                                    <div class="item c-row">
                                        
                                        <div class="c-row c-row-between info">
                                            <div class="period_id">
                                                <div data-v-a9660e98="" class="issueName">
                                                <?= $key->periods; ?> 
                                                    <span data-v-a9660e98="" class="state <?= $clr; ?>"><?= $key->amount." | ".$secltNumber; ?></span>
                                                </div>
                                                <div data-v-a9660e98="" class="tiem"><?= $key->place_date; ?></div>
                                            </div>
                                            <div class="money">
                                            <span data-v-a9660e98="" class="<?= $amntclr; ?>">Pending</span>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>

                        
                        
                        <?php } ?>
                       <?php
                         $table = "account_history";
                         $condition = " where userKey='$userKey' AND gameNumber='$gm' AND game_name='k3' ORDER BY 1 DESC LIMIT 10";
                         $getMyHistory = $dd->fetch_multi($table,$condition);
                         foreach($getMyHistory as $key){

                            if($key->lossorprofit >1){
                                $cmnt = "success";
                                $clr = "green";
                                $amntclr = "success";
                            }
                            else{
                                $cmnt = "failed";
                                $clr = "red";
                                $amntclr = "fail";
                            }
                         ?>
                         <div class="GameRecord__C-body my_history">
                            <div class="van-row my_history_item">
                                    <div class="item c-row">
                                        
                                        <div class="c-row c-row-between info">
                                            <div class="period_id">
                                                <div data-v-a9660e98="" class="issueName">
                                                <?= $key->periods; ?> 
                                                    <span data-v-a9660e98="" class="state <?= $clr; ?>"><?= $cmnt; ?></span>
                                                </div>
                                                <div data-v-a9660e98="" class="tiem"><?= $key->action_date; ?></div>
                                            </div>
                                            <div class="money">
                                            <span data-v-a9660e98="" class="<?= $amntclr; ?>"><?= $key->lossorprofit; ?> </span>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>

                         
                       <?php } ?>

                              <!-- <div class="van-row my_history_item">
                                    <div class="item c-row">
                                        
                                        <div class="c-row c-row-between info">
                                            <div class="period_id">
                                                <div data-v-a9660e98="" class="issueName">
                                                    2022070165186 
                                                    <span data-v-a9660e98="" class="state red">Fail</span>
                                                </div>
                                                <div data-v-a9660e98="" class="tiem">2024-01-22 01:11:18</div>
                                            </div>
                                            <div class="money">
                                                <span data-v-a9660e98="" class="fail"> - 989800</span>
                                            </div>
                                        </div>
                                    </div>
                                </div> -->

                       


                        <!--div class="GameRecord__C-foot">
                            <div class="GameRecord__C-foot-previous disabled">
                                <i data-v-c74f4bba="" class="van-badge__wrapper van-icon van-icon-arrow-left GameRecord__C-icon" style="font-size: 20px;"></i>
                            </div>
                            <div data-v-c74f4bba="" class="GameRecord__C-foot-page">1/100</div>
                            <div class="GameRecord__C-foot-next">
                                <i data-v-c74f4bba="" class="van-badge__wrapper van-icon van-icon-arrow GameRecord__C-icon" style="font-size: 20px;"></i>
                            </div>
                        </div-->
                        
                    </div>
                   
                </div>

                </div>


                <div class="van-overlay" style="z-index: 2009;display: none;"></div>
                <div class="van-popup van-popup--round van-popup--bottom" id="orderplacedPopup" style="z-index: 2009;display: none;">
                        <div class="Betting__Popup-body">
                            <div class="Betting__Popup-type1">
                                <p data-v-6ac039f3="" class="title">Total:</p>
                                <div data-v-6ac039f3="" class="list"><div data-v-6ac039f3="" id="selectedNumber" class="red num3">3</div></div>
                            </div>
                            <div class="Betting__Popup-body-line">
                                Balance 
                                <div class="Betting__Popup-body-line-list">
                                    <div data-v-6ac039f3="" onclick="getSelectAmount('1')" id="slcAmount1" class="Betting__Popup-body-line-item bgcolor">1</div>
                                    <div data-v-6ac039f3="" onclick="getSelectAmount('10')" id="slcAmount2" class="Betting__Popup-body-line-item">10</div>
                                    <div data-v-6ac039f3="" onclick="getSelectAmount('100')" id="slcAmount3" class="Betting__Popup-body-line-item">100</div>
                                    <div data-v-6ac039f3="" onclick="getSelectAmount('1000')" id="slcAmount4" class="Betting__Popup-body-line-item">1000</div>
                                </div>
                            </div>
                            <div class="Betting__Popup-body-line">
                                Quantity 
                                <div class="Betting__Popup-body-line-btnL">
                                    <div data-v-6ac039f3="" onclick="getactivititoAddormin('0')"  class="Betting__Popup-btn bgcolor">-</div>
                                    <div class="van-cell van-field Betting__Popup-input">
                                        <div class="van-cell__value van-field__value">
                                            <div class="van-field__body"><input onkeyup="getManualAmountChange()" type="tel" id="multiple" inputmode="numeric" id="van-field-5-input" class="van-field__control"><!----><!----><!----></div>
                                        </div>
                                    </div>
                                    <div data-v-6ac039f3="" onclick="getactivititoAddormin('1')" class="Betting__Popup-btn bgcolor">+</div>
                                </div>
                            </div>
                            <div class="Betting__Popup-body-line">
                                <div data-v-6ac039f3=""></div>
                                <div class="Betting__Popup-body-line-list">
                                    <div data-v-6ac039f3="" id="multiAm1" onclick="multipleAmount('1')" class="Betting__Popup-body-line-item bgcolor"> X1</div>
                                    <div data-v-6ac039f3="" id="multiAm2" onclick="multipleAmount('5')" class="Betting__Popup-body-line-item"> X5</div>
                                    <div data-v-6ac039f3="" id="multiAm3" onclick="multipleAmount('10')" class="Betting__Popup-body-line-item"> X10</div>
                                    <div data-v-6ac039f3="" id="multiAm4" onclick="multipleAmount('20')" class="Betting__Popup-body-line-item"> X20</div>
                                    <div data-v-6ac039f3="" id="multiAm5" onclick="multipleAmount('50')" class="Betting__Popup-body-line-item"> X50</div>
                                    <div data-v-6ac039f3="" id="multiAm6" onclick="multipleAmount('100')" class="Betting__Popup-body-line-item"> X100</div>
                                </div>
                            </div>
                            <div class="Betting__Popup-body-line">
                                <span data-v-6ac039f3="" class="Betting__Popup-agree active">I agree</span>
                                <span data-v-6ac039f3="" class="Betting__Popup-preSaleShow">《Pre-sale rules》</span>
                            </div>
                        </div>
                        <div class="Betting__Popup-foot">
                            <div data-v-6ac039f3="" onclick="getPopupcancel()" class="Betting__Popup-foot-c">Cancel</div>
                            <div data-v-6ac039f3="" onclick="placeOrder()" class="Betting__Popup-foot-s bgcolor" id="totalAmount">Total amount ₹0.00</div>
                        </div>
                </div>
            </div>

            

        </div>

    </div>
</div>


 <input id="time" type="hidden" value="<?= $_REQUEST['game']; ?>"/><!-----One Min--->
 <input id="game_activity" type="hidden" value="sum"/><!-----Sum/2same/3same/difrent--->
 <input id="bigsmall" type="hidden" value=""/><!-----big/small--->
 <input id="number" type="hidden" value=""/><!-----number's--->
 <input id="balance" type="hidden" value="1"/><!-----banance's--->
 <input id="quantity" type="hidden" value="1"/><!-----quantity's--->
 <input id="tempUniquee" type="hidden"/><!-----store temprory uniquee number--->

<style>
.navbar__content-center .headLogo {
    width: 5.08667rem;
    height: 1.12rem;
    background-repeat: no-repeat;
    background-size: 4.98667rem 1.12rem;
    background-position: center;
}
</style>


</body>

</html>


<script>
    ////////////////////---------------GAME DURATION------//////////

    function getManualAmountChange(){
        var ttttt = parseInt(document.getElementById("multiple").value);
            document.getElementById("quantity").value = ttttt;
            // document.getElementById("multiple").value=ttttt;
            document.getElementById("totalAmount").innerHTML = "Total amount ₹"+document.getElementById("balance").value*ttttt;
   }



   function getactivititoAddormin(a)
   {
       if(a == "1"){
            var ttttt = parseInt(document.getElementById("quantity").value);
            var ttttt2 = ttttt+1;
            document.getElementById("quantity").value = ttttt2;
            document.getElementById("multiple").value=ttttt2;
            document.getElementById("totalAmount").innerHTML = "Total amount ₹"+document.getElementById("balance").value*ttttt2;
       }


       if(a == "0"){
            var ttttt = parseInt(document.getElementById("quantity").value);
            if(ttttt >1){
            var ttttt2 = ttttt-1;
            document.getElementById("quantity").value = ttttt2;
            document.getElementById("multiple").value=ttttt2;
            document.getElementById("totalAmount").innerHTML = "Total amount ₹"+document.getElementById("balance").value*ttttt2;
           }
         }
       
   }



  function durationActivity(a)
  {
     window.open('?game='+a,'_self');
  }


  if(<?= $_REQUEST['game']; ?>== "1")
  {
        document.getElementById("durationAction1").setAttribute("class", "GameList__C-item active");
        document.getElementById("durationAction2").setAttribute("class", "GameList__C-item");
        document.getElementById("durationAction3").setAttribute("class", "GameList__C-item");
        document.getElementById("durationAction4").setAttribute("class", "GameList__C-item");
        document.getElementById("K3_1m").style.display = "block";
        document.getElementById("K3_3m").style.display = "none";
        document.getElementById("K3_5m").style.display = "none";
        document.getElementById("K3_10m").style.display = "none";
  }


  if(<?= $_REQUEST['game']; ?>== "3")
  {
        document.getElementById("durationAction1").setAttribute("class", "GameList__C-item");
        document.getElementById("durationAction2").setAttribute("class", "GameList__C-item active");
        document.getElementById("durationAction3").setAttribute("class", "GameList__C-item");
        document.getElementById("durationAction4").setAttribute("class", "GameList__C-item");
        document.getElementById("K3_1m").style.display = "none";
        document.getElementById("K3_3m").style.display = "block";
        document.getElementById("K3_5m").style.display = "none";
        document.getElementById("K3_10m").style.display = "none";
  }




  if(<?= $_REQUEST['game']; ?>== "5")
  {
        document.getElementById("durationAction1").setAttribute("class", "GameList__C-item");
        document.getElementById("durationAction2").setAttribute("class", "GameList__C-item");
        document.getElementById("durationAction3").setAttribute("class", "GameList__C-item active");
        document.getElementById("durationAction4").setAttribute("class", "GameList__C-item");
        document.getElementById("K3_1m").style.display = "none";
        document.getElementById("K3_3m").style.display = "none";
        document.getElementById("K3_5m").style.display = "block";
        document.getElementById("K3_10m").style.display = "none";
  }



  if(<?= $_REQUEST['game']; ?>== "10")
  {
        document.getElementById("durationAction1").setAttribute("class", "GameList__C-item");
        document.getElementById("durationAction2").setAttribute("class", "GameList__C-item");
        document.getElementById("durationAction3").setAttribute("class", "GameList__C-item");
        document.getElementById("durationAction4").setAttribute("class", "GameList__C-item active");
        document.getElementById("K3_1m").style.display = "none";
        document.getElementById("K3_3m").style.display = "none";
        document.getElementById("K3_5m").style.display = "none";
        document.getElementById("K3_10m").style.display = "block";
  }






/////////////////////---------------get SUM/2SAM/3SAM/DIFFRENT--------//////////
function gameActivity(a)
{
   if(a == 1)
   {
       document.getElementById("gameAction1").setAttribute("class", "K3B_nav_item active");
       document.getElementById("gameAction2").setAttribute("class", "K3B_nav_item");
       document.getElementById("gameAction3").setAttribute("class", "K3B_nav_item");
       document.getElementById("gameAction4").setAttribute("class", "K3B_nav_item");

       document.getElementById("total").style.display = "block";
       document.getElementById("2_same").style.display = "none";
       document.getElementById("3_same").style.display = "none";
       document.getElementById("Different").style.display = "none";


       document.getElementById("game_activity").value = "sum";

     
   }
   

   if(a == 2)
   {
       document.getElementById("gameAction1").setAttribute("class", "K3B_nav_item");
       document.getElementById("gameAction2").setAttribute("class", "K3B_nav_item active");
       document.getElementById("gameAction3").setAttribute("class", "K3B_nav_item");
       document.getElementById("gameAction4").setAttribute("class", "K3B_nav_item");

       document.getElementById("total").style.display = "none";
       document.getElementById("2_same").style.display = "block";
       document.getElementById("3_same").style.display = "none";
       document.getElementById("Different").style.display = "none";

       document.getElementById("game_activity").value = "2same";
   }


   if(a == 3)
   {
       document.getElementById("gameAction1").setAttribute("class", "K3B_nav_item");
       document.getElementById("gameAction2").setAttribute("class", "K3B_nav_item");
       document.getElementById("gameAction3").setAttribute("class", "K3B_nav_item active");
       document.getElementById("gameAction4").setAttribute("class", "K3B_nav_item");


       document.getElementById("total").style.display = "none";
       document.getElementById("2_same").style.display = "none";
       document.getElementById("3_same").style.display = "block";
       document.getElementById("Different").style.display = "none";

       document.getElementById("game_activity").value = "3same";

   }


   if(a == 4)
   {
       document.getElementById("gameAction1").setAttribute("class", "K3B_nav_item");
       document.getElementById("gameAction2").setAttribute("class", "K3B_nav_item");
       document.getElementById("gameAction3").setAttribute("class", "K3B_nav_item");
       document.getElementById("gameAction4").setAttribute("class", "K3B_nav_item active");

       document.getElementById("total").style.display = "none";
       document.getElementById("2_same").style.display = "none";
       document.getElementById("3_same").style.display = "none";
       document.getElementById("Different").style.display = "block";

       document.getElementById("game_activity").value = "diffrent";

   }
}









///////////////////--------------NUMBER SELECT----------////////
function selectNumber(a)
{
  document.getElementById("selectedNumber").innerHTML = a;
  
  if(a==3 || a==5 || a==9 || a==7 || a==11 || a==15 || a==17)
  {
    document.getElementById("selectedNumber").setAttribute("class", "red num3");
  }
  else{
    document.getElementById("selectedNumber").setAttribute("class", "green num3");
  }
  document.getElementById("number").value=a;
  document.getElementById("multiple").value=document.getElementById("quantity").value;
  document.getElementById("totalAmount").innerHTML = "Total amount ₹"+document.getElementById("balance").value;
  document.getElementById("orderplacedPopup").style.display = "block";
}



/////////////////////////////----------------Popup Cancel---------///////
function getPopupcancel()
{
    document.getElementById("orderplacedPopup").style.display = "none";
    window.open('?game='+<?= $_REQUEST['game']; ?>,'_self');
}





//////////////////////--------------------Select Amount------------//////////
function getSelectAmount(a)
{
  if(a == 1){
    document.getElementById("slcAmount1").setAttribute("class", "Betting__Popup-body-line-item bgcolor");
    document.getElementById("slcAmount2").setAttribute("class", "Betting__Popup-body-line-item");
    document.getElementById("slcAmount3").setAttribute("class", "Betting__Popup-body-line-item");
    document.getElementById("slcAmount4").setAttribute("class", "Betting__Popup-body-line-item");
  }


  if(a == 10){
    document.getElementById("slcAmount1").setAttribute("class", "Betting__Popup-body-line-item");
    document.getElementById("slcAmount2").setAttribute("class", "Betting__Popup-body-line-item bgcolor");
    document.getElementById("slcAmount3").setAttribute("class", "Betting__Popup-body-line-item");
    document.getElementById("slcAmount4").setAttribute("class", "Betting__Popup-body-line-item");
  }


  if(a == 100){
    document.getElementById("slcAmount1").setAttribute("class", "Betting__Popup-body-line-item");
    document.getElementById("slcAmount2").setAttribute("class", "Betting__Popup-body-line-item");
    document.getElementById("slcAmount3").setAttribute("class", "Betting__Popup-body-line-item bgcolor");
    document.getElementById("slcAmount4").setAttribute("class", "Betting__Popup-body-line-item");
  }

  if(a == 1000){
    document.getElementById("slcAmount1").setAttribute("class", "Betting__Popup-body-line-item");
    document.getElementById("slcAmount2").setAttribute("class", "Betting__Popup-body-line-item");
    document.getElementById("slcAmount3").setAttribute("class", "Betting__Popup-body-line-item");
    document.getElementById("slcAmount4").setAttribute("class", "Betting__Popup-body-line-item bgcolor");
  }


  document.getElementById("balance").value=a;
  document.getElementById("totalAmount").innerHTML = "Total amount ₹"+document.getElementById("balance").value*document.getElementById("quantity").value;
}









///////////////////---------------Multiple Request---------/////////
function multipleAmount(a)
{
    if(a == 1)
    {
        document.getElementById("multiAm1").setAttribute("class", "Betting__Popup-body-line-item bgcolor");
        document.getElementById("multiAm2").setAttribute("class", "Betting__Popup-body-line-item");
        document.getElementById("multiAm3").setAttribute("class", "Betting__Popup-body-line-item");
        document.getElementById("multiAm4").setAttribute("class", "Betting__Popup-body-line-item");
        document.getElementById("multiAm5").setAttribute("class", "Betting__Popup-body-line-item");
        document.getElementById("multiAm6").setAttribute("class", "Betting__Popup-body-line-item");
    }


    if(a == 5)
    {
        document.getElementById("multiAm1").setAttribute("class", "Betting__Popup-body-line-item");
        document.getElementById("multiAm2").setAttribute("class", "Betting__Popup-body-line-item bgcolor");
        document.getElementById("multiAm3").setAttribute("class", "Betting__Popup-body-line-item");
        document.getElementById("multiAm4").setAttribute("class", "Betting__Popup-body-line-item");
        document.getElementById("multiAm5").setAttribute("class", "Betting__Popup-body-line-item");
        document.getElementById("multiAm6").setAttribute("class", "Betting__Popup-body-line-item");
    }


    if(a == 10)
    {
        document.getElementById("multiAm1").setAttribute("class", "Betting__Popup-body-line-item");
        document.getElementById("multiAm2").setAttribute("class", "Betting__Popup-body-line-item");
        document.getElementById("multiAm3").setAttribute("class", "Betting__Popup-body-line-item bgcolor");
        document.getElementById("multiAm4").setAttribute("class", "Betting__Popup-body-line-item");
        document.getElementById("multiAm5").setAttribute("class", "Betting__Popup-body-line-item");
        document.getElementById("multiAm6").setAttribute("class", "Betting__Popup-body-line-item");
    }


    if(a == 20)
    {
        document.getElementById("multiAm1").setAttribute("class", "Betting__Popup-body-line-item");
        document.getElementById("multiAm2").setAttribute("class", "Betting__Popup-body-line-item");
        document.getElementById("multiAm3").setAttribute("class", "Betting__Popup-body-line-item");
        document.getElementById("multiAm4").setAttribute("class", "Betting__Popup-body-line-item bgcolor");
        document.getElementById("multiAm5").setAttribute("class", "Betting__Popup-body-line-item");
        document.getElementById("multiAm6").setAttribute("class", "Betting__Popup-body-line-item");
    }
    

    if(a == 50)
    {
        document.getElementById("multiAm1").setAttribute("class", "Betting__Popup-body-line-item");
        document.getElementById("multiAm2").setAttribute("class", "Betting__Popup-body-line-item");
        document.getElementById("multiAm3").setAttribute("class", "Betting__Popup-body-line-item");
        document.getElementById("multiAm4").setAttribute("class", "Betting__Popup-body-line-item");
        document.getElementById("multiAm5").setAttribute("class", "Betting__Popup-body-line-item bgcolor");
        document.getElementById("multiAm6").setAttribute("class", "Betting__Popup-body-line-item");
    }


    if(a == 100)
    {
        document.getElementById("multiAm1").setAttribute("class", "Betting__Popup-body-line-item");
        document.getElementById("multiAm2").setAttribute("class", "Betting__Popup-body-line-item");
        document.getElementById("multiAm3").setAttribute("class", "Betting__Popup-body-line-item");
        document.getElementById("multiAm4").setAttribute("class", "Betting__Popup-body-line-item");
        document.getElementById("multiAm5").setAttribute("class", "Betting__Popup-body-line-item");
        document.getElementById("multiAm6").setAttribute("class", "Betting__Popup-body-line-item bgcolor");
    }

    
    document.getElementById("quantity").value = a;
    document.getElementById("multiple").value=document.getElementById("quantity").value;
    document.getElementById("totalAmount").innerHTML = "Total amount ₹"+document.getElementById("balance").value*document.getElementById("quantity").value;
}





function getSelectedNumber(a)
{
    if(a == "11")
    {
        document.getElementById("same2number1").style.background = "#000";
        document.getElementById("same2number2").style.background = "#B6C1E3";
        document.getElementById("same2number3").style.background = "#B6C1E3";
        document.getElementById("same2number4").style.background = "#B6C1E3";
        document.getElementById("same2number5").style.background = "#B6C1E3";
        document.getElementById("same2number6").style.background = "#B6C1E3";

        document.getElementById("selectedNumber").innerHTML = "11";
        document.getElementById("number").value="11";
        document.getElementById("multiple").value=document.getElementById("quantity").value;
        document.getElementById("totalAmount").innerHTML = "Total amount ₹"+document.getElementById("balance").value;
        document.getElementById("orderplacedPopup").style.display = "block";
    }


    if(a == "22")
    {
        document.getElementById("selectedNumber").innerHTML = "22";
        document.getElementById("number").value="22";
        document.getElementById("same2number1").style.background = "#B6C1E3";
        document.getElementById("same2number2").style.background = "#000";
        document.getElementById("same2number3").style.background = "#B6C1E3";
        document.getElementById("same2number4").style.background = "#B6C1E3";
        document.getElementById("same2number5").style.background = "#B6C1E3";
        document.getElementById("same2number6").style.background = "#B6C1E3";


        document.getElementById("selectedNumber").innerHTML = "22";
        document.getElementById("number").value="22";
        document.getElementById("multiple").value=document.getElementById("quantity").value;
        document.getElementById("totalAmount").innerHTML = "Total amount ₹"+document.getElementById("balance").value;
        document.getElementById("orderplacedPopup").style.display = "block";
    }


    if(a == "33")
    {
        document.getElementById("selectedNumber").innerHTML = "33";
        document.getElementById("number").value="33";
        document.getElementById("same2number1").style.background = "#B6C1E3";
        document.getElementById("same2number2").style.background = "#B6C1E3";
        document.getElementById("same2number3").style.background = "#000";
        document.getElementById("same2number4").style.background = "#B6C1E3";
        document.getElementById("same2number5").style.background = "#B6C1E3";
        document.getElementById("same2number6").style.background = "#B6C1E3";


        document.getElementById("selectedNumber").innerHTML = "33";
        document.getElementById("number").value="33";
        document.getElementById("multiple").value=document.getElementById("quantity").value;
        document.getElementById("totalAmount").innerHTML = "Total amount ₹"+document.getElementById("balance").value;
        document.getElementById("orderplacedPopup").style.display = "block";
    }


    if(a == "44")
    {
        document.getElementById("selectedNumber").innerHTML = "44";
        document.getElementById("number").value="44";
        document.getElementById("same2number1").style.background = "#B6C1E3";
        document.getElementById("same2number2").style.background = "#B6C1E3";
        document.getElementById("same2number3").style.background = "#B6C1E3";
        document.getElementById("same2number4").style.background = "#000";
        document.getElementById("same2number5").style.background = "#B6C1E3";
        document.getElementById("same2number6").style.background = "#B6C1E3";

        document.getElementById("selectedNumber").innerHTML = "44";
        document.getElementById("number").value="44";
        document.getElementById("multiple").value=document.getElementById("quantity").value;
        document.getElementById("totalAmount").innerHTML = "Total amount ₹"+document.getElementById("balance").value;
        document.getElementById("orderplacedPopup").style.display = "block";
    }


    if(a == "55")
    {
        document.getElementById("selectedNumber").innerHTML = "55";
        document.getElementById("number").value="55";
        document.getElementById("same2number1").style.background = "#B6C1E3";
        document.getElementById("same2number2").style.background = "#B6C1E3";
        document.getElementById("same2number3").style.background = "#B6C1E3";
        document.getElementById("same2number4").style.background = "#B6C1E3";
        document.getElementById("same2number5").style.background = "#000";
        document.getElementById("same2number6").style.background = "#B6C1E3";


        document.getElementById("selectedNumber").innerHTML = "55";
        document.getElementById("number").value="55";
        document.getElementById("multiple").value=document.getElementById("quantity").value;
        document.getElementById("totalAmount").innerHTML = "Total amount ₹"+document.getElementById("balance").value;
        document.getElementById("orderplacedPopup").style.display = "block";
    }

    

    if(a == "66")
    {
        document.getElementById("selectedNumber").innerHTML = "66";
        document.getElementById("number").value="66";
        document.getElementById("same2number1").style.background = "#B6C1E3";
        document.getElementById("same2number2").style.background = "#B6C1E3";
        document.getElementById("same2number3").style.background = "#B6C1E3";
        document.getElementById("same2number4").style.background = "#B6C1E3";
        document.getElementById("same2number5").style.background = "#B6C1E3";
        document.getElementById("same2number6").style.background = "#000";


        document.getElementById("selectedNumber").innerHTML = "66";
        document.getElementById("number").value="66";
        document.getElementById("multiple").value=document.getElementById("quantity").value;
        document.getElementById("totalAmount").innerHTML = "Total amount ₹"+document.getElementById("balance").value;
        document.getElementById("orderplacedPopup").style.display = "block";
    }

   
}






function selectUniqueeNumber(a)
{
    
    if(a == 1){
        document.getElementById("uniqueeSelectedNumber1").style.background = "#000";
        document.getElementById("tempUniquee").value=document.getElementById("tempUniquee").value+"1";
    }

    if(a == 2){
        document.getElementById("uniqueeSelectedNumber2").style.background = "#000";
        document.getElementById("tempUniquee").value=document.getElementById("tempUniquee").value+"2";
    }

    if(a == 3){
        document.getElementById("uniqueeSelectedNumber3").style.background = "#000";
        document.getElementById("tempUniquee").value=document.getElementById("tempUniquee").value+"3";
    }

    if(a == 4){
        document.getElementById("uniqueeSelectedNumber4").style.background = "#000";
        document.getElementById("tempUniquee").value=document.getElementById("tempUniquee").value+"4";
    }

    if(a == 5){
        document.getElementById("uniqueeSelectedNumber5").style.background = "#000";
        document.getElementById("tempUniquee").value=document.getElementById("tempUniquee").value+"5";
    }

    if(a == 6){
        document.getElementById("uniqueeSelectedNumber6").style.background = "#000";
        document.getElementById("tempUniquee").value=document.getElementById("tempUniquee").value+"6";
    }


   if(document.getElementById("tempUniquee").value.length == 2){
        document.getElementById("selectedNumber").innerHTML = document.getElementById("tempUniquee").value;
        document.getElementById("number").value=document.getElementById("tempUniquee").value;
        document.getElementById("multiple").value=document.getElementById("quantity").value;
        document.getElementById("totalAmount").innerHTML = "Total amount ₹"+document.getElementById("balance").value;
        document.getElementById("orderplacedPopup").style.display = "block";
   }
    
    
}






///////////////////////////-------------------------

function getThreeSameNumber(a)
{
    if(a == 1)
    {
        document.getElementById("tempUniquee").value="111";
        document.getElementById("setThreeSameNumber1").style.background = "#000";
        document.getElementById("setThreeSameNumber2").style.background = "#B6C1E3";
        document.getElementById("setThreeSameNumber3").style.background = "#B6C1E3";
        document.getElementById("setThreeSameNumber4").style.background = "#B6C1E3";
        document.getElementById("setThreeSameNumber5").style.background = "#B6C1E3";
        document.getElementById("setThreeSameNumber6").style.background = "#B6C1E3";

        document.getElementById("selectedNumber").innerHTML = document.getElementById("tempUniquee").value;
        document.getElementById("number").value=document.getElementById("tempUniquee").value;
        document.getElementById("multiple").value=document.getElementById("quantity").value;
        document.getElementById("totalAmount").innerHTML = "Total amount ₹"+document.getElementById("balance").value;
        document.getElementById("orderplacedPopup").style.display = "block";
    }


    if(a == 2)
    {
        document.getElementById("tempUniquee").value="222";
        document.getElementById("setThreeSameNumber1").style.background = "#B6C1E3";
        document.getElementById("setThreeSameNumber2").style.background = "#000";
        document.getElementById("setThreeSameNumber3").style.background = "#B6C1E3";
        document.getElementById("setThreeSameNumber4").style.background = "#B6C1E3";
        document.getElementById("setThreeSameNumber5").style.background = "#B6C1E3";
        document.getElementById("setThreeSameNumber6").style.background = "#B6C1E3";
        
        document.getElementById("selectedNumber").innerHTML = document.getElementById("tempUniquee").value;
        document.getElementById("number").value=document.getElementById("tempUniquee").value;
        document.getElementById("multiple").value=document.getElementById("quantity").value;
        document.getElementById("totalAmount").innerHTML = "Total amount ₹"+document.getElementById("balance").value;
        document.getElementById("orderplacedPopup").style.display = "block";
    }


    if(a == 3)
    {
        document.getElementById("tempUniquee").value="333";
        document.getElementById("setThreeSameNumber1").style.background = "#B6C1E3";
        document.getElementById("setThreeSameNumber2").style.background = "#B6C1E3";
        document.getElementById("setThreeSameNumber3").style.background = "#000";
        document.getElementById("setThreeSameNumber4").style.background = "#B6C1E3";
        document.getElementById("setThreeSameNumber5").style.background = "#B6C1E3";
        document.getElementById("setThreeSameNumber6").style.background = "#B6C1E3";
        
        document.getElementById("selectedNumber").innerHTML = document.getElementById("tempUniquee").value;
        document.getElementById("number").value=document.getElementById("tempUniquee").value;
        document.getElementById("multiple").value=document.getElementById("quantity").value;
        document.getElementById("totalAmount").innerHTML = "Total amount ₹"+document.getElementById("balance").value;
        document.getElementById("orderplacedPopup").style.display = "block";
    }


    if(a == 4)
    {
        document.getElementById("tempUniquee").value="444";
        document.getElementById("setThreeSameNumber1").style.background = "#B6C1E3";
        document.getElementById("setThreeSameNumber2").style.background = "#B6C1E3";
        document.getElementById("setThreeSameNumber3").style.background = "#B6C1E3";
        document.getElementById("setThreeSameNumber4").style.background = "#000";
        document.getElementById("setThreeSameNumber5").style.background = "#B6C1E3";
        document.getElementById("setThreeSameNumber6").style.background = "#B6C1E3";
        
        document.getElementById("selectedNumber").innerHTML = document.getElementById("tempUniquee").value;
        document.getElementById("number").value=document.getElementById("tempUniquee").value;
        document.getElementById("multiple").value=document.getElementById("quantity").value;
        document.getElementById("totalAmount").innerHTML = "Total amount ₹"+document.getElementById("balance").value;
        document.getElementById("orderplacedPopup").style.display = "block";
    }


    if(a == 5)
    {
        document.getElementById("tempUniquee").value="555";
        document.getElementById("setThreeSameNumber1").style.background = "#B6C1E3";
        document.getElementById("setThreeSameNumber2").style.background = "#B6C1E3";
        document.getElementById("setThreeSameNumber3").style.background = "#B6C1E3";
        document.getElementById("setThreeSameNumber4").style.background = "#B6C1E3";
        document.getElementById("setThreeSameNumber5").style.background = "#000";
        document.getElementById("setThreeSameNumber6").style.background = "#B6C1E3";
        
        document.getElementById("selectedNumber").innerHTML = document.getElementById("tempUniquee").value;
        document.getElementById("number").value=document.getElementById("tempUniquee").value;
        document.getElementById("multiple").value=document.getElementById("quantity").value;
        document.getElementById("totalAmount").innerHTML = "Total amount ₹"+document.getElementById("balance").value;
        document.getElementById("orderplacedPopup").style.display = "block";
    }


    if(a == 6)
    {
        document.getElementById("tempUniquee").value="666";
        document.getElementById("setThreeSameNumber1").style.background = "#B6C1E3";
        document.getElementById("setThreeSameNumber2").style.background = "#B6C1E3";
        document.getElementById("setThreeSameNumber3").style.background = "#B6C1E3";
        document.getElementById("setThreeSameNumber4").style.background = "#B6C1E3";
        document.getElementById("setThreeSameNumber5").style.background = "#B6C1E3";
        document.getElementById("setThreeSameNumber6").style.background = "#000";
        
        document.getElementById("selectedNumber").innerHTML = document.getElementById("tempUniquee").value;
        document.getElementById("number").value=document.getElementById("tempUniquee").value;
        document.getElementById("multiple").value=document.getElementById("quantity").value;
        document.getElementById("totalAmount").innerHTML = "Total amount ₹"+document.getElementById("balance").value;
        document.getElementById("orderplacedPopup").style.display = "block";
    }




     if(a==7)
     {
        document.getElementById("tempUniquee").value="111-222-333-444-555-666";
        document.getElementById("selectedNumber").innerHTML = "D";
        document.getElementById("number").value=document.getElementById("tempUniquee").value;
        document.getElementById("multiple").value=document.getElementById("quantity").value;
        document.getElementById("totalAmount").innerHTML = "Total amount ₹"+document.getElementById("balance").value;
        document.getElementById("orderplacedPopup").style.display = "block";
     }
}







function getThreeDifrentNumbers(a)
{
    if(a == 1)
    {
        document.getElementById('setThreeDifrentNumber1').style.background = "#000";
        document.getElementById("tempUniquee").value=document.getElementById("tempUniquee").value+"1";
    }
    
    if(a == 2)
    {
        document.getElementById('setThreeDifrentNumber2').style.background = "#000";
        document.getElementById("tempUniquee").value=document.getElementById("tempUniquee").value+"2";
    }

    
    if(a == 3)
    {
        document.getElementById('setThreeDifrentNumber3').style.background = "#000";
        document.getElementById("tempUniquee").value=document.getElementById("tempUniquee").value+"3";
    }

    
    if(a == 4)
    {
        document.getElementById('setThreeDifrentNumber4').style.background = "#000";
        document.getElementById("tempUniquee").value=document.getElementById("tempUniquee").value+"4";
    }


    
    if(a == 5)
    {
        document.getElementById('setThreeDifrentNumber5').style.background = "#000";
        document.getElementById("tempUniquee").value=document.getElementById("tempUniquee").value+"5";
    }

    
    if(a == 6)
    {
        document.getElementById('setThreeDifrentNumber6').style.background = "#000";
        document.getElementById("tempUniquee").value=document.getElementById("tempUniquee").value+"6";
    }


    if(a == 7)
    {
        document.getElementById("tempUniquee").value="123-234-345-456-135-246";
        document.getElementById("selectedNumber").innerHTML = "C";
        document.getElementById("number").value=document.getElementById("tempUniquee").value;
        document.getElementById("multiple").value=document.getElementById("quantity").value;
        document.getElementById("totalAmount").innerHTML = "Total amount ₹"+document.getElementById("balance").value;
        document.getElementById("orderplacedPopup").style.display = "block";
    }


    if(document.getElementById("tempUniquee").value.length == 3){
        document.getElementById("selectedNumber").innerHTML = document.getElementById("tempUniquee").value;
        document.getElementById("number").value=document.getElementById("tempUniquee").value;
        document.getElementById("multiple").value=document.getElementById("quantity").value;
        document.getElementById("totalAmount").innerHTML = "Total amount ₹"+document.getElementById("balance").value;
        document.getElementById("orderplacedPopup").style.display = "block";
   }
}









function getTwoDifrentNumberInsideThree(a)
{
    if(a==1)
    {
        document.getElementById('setTwoDiffrentNumberInsideThree1').style.background = "#000";
        document.getElementById("tempUniquee").value=document.getElementById("tempUniquee").value+"1";
    }

    if(a==2)
    {
        document.getElementById('setTwoDiffrentNumberInsideThree2').style.background = "#000";
        document.getElementById("tempUniquee").value=document.getElementById("tempUniquee").value+"2";
    }

    if(a==3)
    {
        document.getElementById('setTwoDiffrentNumberInsideThree3').style.background = "#000";
        document.getElementById("tempUniquee").value=document.getElementById("tempUniquee").value+"3";
    }

    
    if(a==4)
    {
        document.getElementById('setTwoDiffrentNumberInsideThree4').style.background = "#000";
        document.getElementById("tempUniquee").value=document.getElementById("tempUniquee").value+"4";
    }

    
    if(a==5)
    {
        document.getElementById('setTwoDiffrentNumberInsideThree5').style.background = "#000";
        document.getElementById("tempUniquee").value=document.getElementById("tempUniquee").value+"5";
    }
    

    
    if(a==6)
    {
        document.getElementById('setTwoDiffrentNumberInsideThree6').style.background = "#000";
        document.getElementById("tempUniquee").value=document.getElementById("tempUniquee").value+"6";
    }


    if(document.getElementById("tempUniquee").value.length == 2){
        document.getElementById("selectedNumber").innerHTML = document.getElementById("tempUniquee").value;
        document.getElementById("number").value=document.getElementById("tempUniquee").value;
        document.getElementById("multiple").value=document.getElementById("quantity").value;
        document.getElementById("totalAmount").innerHTML = "Total amount ₹"+document.getElementById("balance").value;
        document.getElementById("orderplacedPopup").style.display = "block";
   }
}





//////////////////////-------------PLACE ORDER BY BIG OR SMALL-------------///////////
function getGameOrderBysmallorBig(a)
{
//    document.getElementById("game_activity").value = a;
   document.getElementById('bigsmall').value = a;
   document.getElementById("selectedNumber").innerHTML = a;
   document.getElementById("number").value="";
   document.getElementById("multiple").value=document.getElementById("quantity").value;
   document.getElementById("totalAmount").innerHTML = "Total amount ₹"+document.getElementById("balance").value;
   document.getElementById("orderplacedPopup").style.display = "block";
}





////////////////////////-------------PLACE ORDER------------------/////////////
function placeOrder()
{
        var timeDuration = document.getElementById("time").value;
        var gameAction = document.getElementById("game_activity").value;
        var bigsmallGame = document.getElementById("bigsmall").value;
        var numberZone = document.getElementById("number").value;
        var balanceZone = document.getElementById("balance").value;
        var quantityZone = document.getElementById("quantity").value;
        var totalAmount = balanceZone*quantityZone;
    
        const xhttp = new XMLHttpRequest();
        xhttp.onload = function() {
            var demo_show = this.responseText;
            const myArr = JSON.parse(demo_show);
            if(myArr.status == "success")
            {
                //alert(myArr.remark);
                //window.open('?game='+,'_self');
                
                document.getElementById("responceFrom").style.display = "block";
                document.getElementById("responceFrom").innerHTML = "success";
                document.getElementById("orderplacedPopup").style.display = "none";
                setInterval(function() {
                   window.open('?game='+<?= $_REQUEST['game']; ?>,'_self');
                }, 1000);
            }
            else{
                document.getElementById("responceFrom").style.display = "block";
                document.getElementById("responceFrom").innerHTML = myArr.remark;
                document.getElementById("orderplacedPopup").style.display = "none";
                setInterval(function() {
                    document.getElementById("responceFrom").style.display = "none";
                }, 1000);
            }
        }
        xhttp.open("GET", "k3_place_order.php?timeduration="+timeDuration+"&gameAction="+gameAction+"&bigsmall="+bigsmallGame+"&selectNumber="+numberZone+"&totalAmount="+totalAmount+"&gamenumber="+<?= $_REQUEST['game']; ?>+"&pirods="+<?= $periods; ?>);
        xhttp.send();  
}

//K3 Timer 1 minutes
const K3_1mmcountdown = () => {
  let timer = document.getElementById("K3_1m");
  let dt = new Date();
  let m = dt.getMinutes();
  let s = dt.getSeconds();

  // minutes remaining until next 10 minute mark
  m = s ? 0 - (m % 1) : 1 - (m % 1);

  // seconds remaining until next minute mark
  if (s) {
    s = 60 - s;
    if(s <=5)
    {
        document.getElementById("ertyuisdfghjk45678").style.display = "block";
        document.getElementById("setCountdwonTimeForBlock").innerHTML = s;
    }
  }else{
    window.open('?game='+<?= $_REQUEST['game']; ?>,'_self');
  }

  timer.textContent = `${m}:${s < 10 ? "0" + s : s}`;
};
setInterval(K3_1mmcountdown, 60);



// //K3 Timer 3 minutes
const K3_3mcountdown = () => {
  let timer = document.getElementById("K3_3m");
  let dt = new Date();
  let m = dt.getMinutes();
  let s = dt.getSeconds();

  // minutes remaining until next 10 minute mark
  m = s ? 2 - (m % 3) : 3 - (m % 3);

  // seconds remaining until next minute mark
  if (s) {
    s = 60 - s;
  }else{
    window.open('?game='+<?= $_REQUEST['game']; ?>,'_self');
  }

  timer.textContent = `${m}:${s < 10 ? "0" + s : s}`;
};
setInterval(K3_3mcountdown, 180);

// //K3 Timer 5 minutes
const K3_5mcountdown = () => {
  let timer = document.getElementById("K3_5m");
  let dt = new Date();
  let m = dt.getMinutes();
  let s = dt.getSeconds();

  // minutes remaining until next 10 minute mark
  m = s ? 4 - (m % 5) : 5 - (m % 5);

  // seconds remaining until next minute mark
  if (s) {
    s = 60 - s;
  }else{
    window.open('?game='+<?= $_REQUEST['game']; ?>,'_self');
  }

  timer.textContent = `${m}:${s < 10 ? "0" + s : s}`;
};
setInterval(K3_5mcountdown, 300);


// const k3K3_10mcountdown = () => {
//   let timer = document.getElementById("K3_10m");
//   let dt = new Date();
//   let m = dt.getMinutes();
//   let s = dt.getSeconds();

//   // minutes remaining until next 10 minute mark
//   m = s ? 9 - (m % 10) : 10 - (m % 10);

//   // seconds remaining until next minute mark
//   if (s) {
//     s = 60 - s;
//   }else{
//     window.open('?game='+,'_self');
//   }

//   timer.textContent = `${m}:${s < 10 ? "0" + s : s}`;
// };
// setInterval(k3K3_10mcountdown, 1000);
</script>
