<?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);



$gmn = $_REQUEST['game'];


if($gmn == 1)
{
    $gmn = "1";
}



if($gmn == 3)
{
    $gmn = "2";
}


if($gmn == 5)
{
    $gmn = "3";
}


if($gmn == 10)
{
    $gmn = "4";
}





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



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


<script>
    getToStartTiming();
</script>





<!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>
    <?php include "game-timer.php"; ?>
</head>
<body>
    <div id="app">
        <div class="WinGo__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" onclick="gotoTeligram()">-->
                    <!--    <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 onclick="gettorefresh()" class="Wallet__C-balance-l1">
                        <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="setingColoe1" class="GameList__C-item active" data-id="one_Min" onclick="getTwoActivity('1')">
                    <div data-v-484ec2ec="">Win Go<br>1Min</div>
                </div>
                <div id="setingColoe2" class="GameList__C-item" data-id="one_Min"  onclick="getTwoActivity('3')">
                    <div data-v-484ec2ec="">Win Go<br>3Min</div>
                </div>
                <div id="setingColoe3" class="GameList__C-item" data-id="one_Min"  onclick="getTwoActivity('5')">
                    <div data-v-484ec2ec="">Win Go<br>5Min</div>
                </div>
                <div id="setingColoe4" class="GameList__C-item" data-id="one_Min"  onclick="getTwoActivity('10')">
                    <div data-v-484ec2ec="">Win Go<br>10Min</div>
                </div>
            </div>
            
            <div class="bet_details" style="display:none;" id="responceFrom"></div>

<script>

   function getActionForwithdrawordeposit(a)
   {
      if(a == 1)
      {
          window.open('withdraw.php','_self');
      }

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






  
   document.getElementById('winGo1m').style.display="block";
   function getTwoActivity(a)
   {
       window.open('?game='+a,'_self');
   }
   
   
   
   function gettorefresh()
   {
       window.open('?game='+<?= $_REQUEST['game']; ?>,'_self');
   }
   
</script>    




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

                <div class="wingoGame active" id="one_Min">
                    <div class="TimeLeft__C">
                        <div data-v-c0d1aac6="" class="TimeLeft__C-rule">How to play</div>
                        <div data-v-c0d1aac6="" class="TimeLeft__C-name" id="setWingoSectionInGameSection">Win Go 1Min</div>
                        <div data-v-c0d1aac6="" class="TimeLeft__C-num">
                            <?php
                            
                              $gm = $_REQUEST['game'];
                              if($gm == "3")
                              {
                                  $gm = 2;
                              }
                              
                              if($gm == "5")
                              {
                                  $gm = 3;
                              }
                              
                              
                              if($gm == "10")
                              {
                                  $gm = 4;
                              }
                              
                              
                              $table = "existing_game_wingo";
                              $condition = " WHERE game_number='$gm' ORDER BY 1 DESC limit 5";
                              $getLastFiveResult = $dd->fetch_multi($table,$condition);
                              foreach($getLastFiveResult as $key){
                                 $nNumber = "n".$key->number;
                            ?>
                            <div data-v-c0d1aac6="" class="<?= $nNumber; ?>"></div>
                            <?php } ?>
                            
                        </div>
                        <div data-v-c0d1aac6="" class="TimeLeft__C-id"><?= $getCountDwon['periods']; ?></div>
                        <div data-v-c0d1aac6="" class="TimeLeft__C-text">Time remaining</div>

                        <!--<div class="TimeLeft__C-time">-->
                        <!--    <span style="display:block;"><div class="">0</div><div class="">1</div><div class="">:</div><div class="">1</div><div class="">2</div></span>-->
                            <!--id="winGo1m"-->
                        <!--</div>-->
                        
                        <div data-v-c0d1aac6="" class="TimeLeft__C-time">
                             <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="Betting__C">
                        <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="Betting__C-head">
                            <div data-v-0aa493a0="" onclick="gotopicData('green')" class="Betting__C-head-g">Green</div>
                            <div data-v-0aa493a0="" onclick="gotopicData('voilet')" class="Betting__C-head-p">Violet</div>
                            <div data-v-0aa493a0="" onclick="gotopicData('red')" class="Betting__C-head-r">Red</div>
                        </div>
                        <div class="Betting__C-numC">
                            <div class="Betting__C-numC-item0" id="activation_0" onclick="gotopicData('0')"></div>
                            <div data-v-0aa493a0="" id="activation_1" class="Betting__C-numC-item1"  onclick="gotopicData('1')"></div>
                            <div data-v-0aa493a0="" id="activation_2" class="Betting__C-numC-item2"  onclick="gotopicData('2')"></div>
                            <div data-v-0aa493a0="" id="activation_3" class="Betting__C-numC-item3"  onclick="gotopicData('3')"></div>
                            <div data-v-0aa493a0="" id="activation_4" class="Betting__C-numC-item4"  onclick="gotopicData('4')"></div>
                            <div data-v-0aa493a0="" id="activation_5" class="Betting__C-numC-item5"  onclick="gotopicData('5')"></div>
                            <div data-v-0aa493a0="" id="activation_6" class="Betting__C-numC-item6"  onclick="gotopicData('6')"></div>
                            <div data-v-0aa493a0="" id="activation_7" class="Betting__C-numC-item7"  onclick="gotopicData('7')"></div>
                            <div data-v-0aa493a0="" id="activation_8" class="Betting__C-numC-item8"  onclick="gotopicData('8')"></div>
                            <div data-v-0aa493a0="" id="activation_9" class="Betting__C-numC-item9"  onclick="gotopicData('9')"></div>
                        </div>
                        <div class="Betting__C-multiple">
                           <div data-v-0aa493a0="" class="Betting__C-multiple-l" onclick="getToClickRandumButton()">Random</div>
                            <div data-v-0aa493a0="" onclick="gettoMultipli('1')" class="Betting__C-multiple-r active"><div class="Betting_multiple_item">X1</div> </div>
                            <div data-v-0aa493a0="" onclick="gettoMultipli('2')" class="Betting__C-multiple-r"><div class="Betting_multiple_item">X5</div> </div>
                            <div data-v-0aa493a0="" onclick="gettoMultipli('3')" class="Betting__C-multiple-r"><div class="Betting_multiple_item">X10</div> </div>
                            <div data-v-0aa493a0="" onclick="gettoMultipli('4')" class="Betting__C-multiple-r"><div class="Betting_multiple_item">X20</div> </div>
                            <div data-v-0aa493a0="" onclick="gettoMultipli('5')" class="Betting__C-multiple-r"><div class="Betting_multiple_item">X50</div> </div>
                            <div data-v-0aa493a0="" onclick="gettoMultipli('6')" class="Betting__C-multiple-r"><div class="Betting_multiple_item">X100</div> </div>
                        </div>
                        <div class="Betting__C-foot">
                            <div data-v-0aa493a0="" onclick="gotopicData('big')" class="Betting__C-foot-b">Big</div>
                            <div data-v-0aa493a0="" onclick="gotopicData('small')" class="Betting__C-foot-s">Small</div>
                        </div>
                        
<script>
    function getToClickRandumButton()
    {
        i = 0;
       sendRequestForActive(i);
    } 
    
    function sendRequestForActive(i)
    {
        i++;
        const rnumber = ["0", "1", "2","3","4","5","6","7","8","9","0","1","2","3","4","5","6","7","8","9","0","1","2","3","4","5"];
        alert(rnumber[0]);
        if(3=i){
            
        }else{
           setTimeout(function () {
            if(i==1){
                document.getElementById("activation_0").setAttribute("class", "Betting__C-numC-item0 active");
                document.getElementById("activation_1").setAttribute("class", "Betting__C-numC-item1 ");
                document.getElementById("activation_2").setAttribute("class", "Betting__C-numC-item2 ");
                document.getElementById("activation_3").setAttribute("class", "Betting__C-numC-item3 ");
                document.getElementById("activation_4").setAttribute("class", "Betting__C-numC-item4 ");
                document.getElementById("activation_5").setAttribute("class", "Betting__C-numC-item5 ");
                document.getElementById("activation_6").setAttribute("class", "Betting__C-numC-item6 ");
                document.getElementById("activation_7").setAttribute("class", "Betting__C-numC-item7 ");
                document.getElementById("activation_8").setAttribute("class", "Betting__C-numC-item8 ");
                document.getElementById("activation_9").setAttribute("class", "Betting__C-numC-item9 ");
            }
            
            
            
               if(i==2){
                document.getElementById("activation_0").setAttribute("class", "Betting__C-numC-item0");
                document.getElementById("activation_1").setAttribute("class", "Betting__C-numC-item1 active");
                document.getElementById("activation_2").setAttribute("class", "Betting__C-numC-item2 ");
                document.getElementById("activation_3").setAttribute("class", "Betting__C-numC-item3 ");
                document.getElementById("activation_4").setAttribute("class", "Betting__C-numC-item4 ");
                document.getElementById("activation_5").setAttribute("class", "Betting__C-numC-item5 ");
                document.getElementById("activation_6").setAttribute("class", "Betting__C-numC-item6 ");
                document.getElementById("activation_7").setAttribute("class", "Betting__C-numC-item7 ");
                document.getElementById("activation_8").setAttribute("class", "Betting__C-numC-item8 ");
                document.getElementById("activation_9").setAttribute("class", "Betting__C-numC-item9 ");
            }
            
            
                if(i==3){
                document.getElementById("activation_0").setAttribute("class", "Betting__C-numC-item0");
                document.getElementById("activation_1").setAttribute("class", "Betting__C-numC-item1 ");
                document.getElementById("activation_2").setAttribute("class", "Betting__C-numC-item2 active");
                document.getElementById("activation_3").setAttribute("class", "Betting__C-numC-item3 ");
                document.getElementById("activation_4").setAttribute("class", "Betting__C-numC-item4 ");
                document.getElementById("activation_5").setAttribute("class", "Betting__C-numC-item5 ");
                document.getElementById("activation_6").setAttribute("class", "Betting__C-numC-item6 ");
                document.getElementById("activation_7").setAttribute("class", "Betting__C-numC-item7 ");
                document.getElementById("activation_8").setAttribute("class", "Betting__C-numC-item8 ");
                document.getElementById("activation_9").setAttribute("class", "Betting__C-numC-item9 ");
            }
            
            
            
                 if(i==4){
                document.getElementById("activation_0").setAttribute("class", "Betting__C-numC-item0");
                document.getElementById("activation_1").setAttribute("class", "Betting__C-numC-item1 ");
                document.getElementById("activation_2").setAttribute("class", "Betting__C-numC-item2 ");
                document.getElementById("activation_3").setAttribute("class", "Betting__C-numC-item3 active");
                document.getElementById("activation_4").setAttribute("class", "Betting__C-numC-item4 ");
                document.getElementById("activation_5").setAttribute("class", "Betting__C-numC-item5 ");
                document.getElementById("activation_6").setAttribute("class", "Betting__C-numC-item6 ");
                document.getElementById("activation_7").setAttribute("class", "Betting__C-numC-item7 ");
                document.getElementById("activation_8").setAttribute("class", "Betting__C-numC-item8 ");
                document.getElementById("activation_9").setAttribute("class", "Betting__C-numC-item9 ");
            }
            
            
            
               if(i==5){
                document.getElementById("activation_0").setAttribute("class", "Betting__C-numC-item0");
                document.getElementById("activation_1").setAttribute("class", "Betting__C-numC-item1 ");
                document.getElementById("activation_2").setAttribute("class", "Betting__C-numC-item2 ");
                document.getElementById("activation_3").setAttribute("class", "Betting__C-numC-item3 ");
                document.getElementById("activation_4").setAttribute("class", "Betting__C-numC-item4 active");
                document.getElementById("activation_5").setAttribute("class", "Betting__C-numC-item5 ");
                document.getElementById("activation_6").setAttribute("class", "Betting__C-numC-item6 ");
                document.getElementById("activation_7").setAttribute("class", "Betting__C-numC-item7 ");
                document.getElementById("activation_8").setAttribute("class", "Betting__C-numC-item8 ");
                document.getElementById("activation_9").setAttribute("class", "Betting__C-numC-item9 ");
            }
            
            
            
             
               if(i==6){
                document.getElementById("activation_0").setAttribute("class", "Betting__C-numC-item0");
                document.getElementById("activation_1").setAttribute("class", "Betting__C-numC-item1 ");
                document.getElementById("activation_2").setAttribute("class", "Betting__C-numC-item2 ");
                document.getElementById("activation_3").setAttribute("class", "Betting__C-numC-item3 ");
                document.getElementById("activation_4").setAttribute("class", "Betting__C-numC-item4 ");
                document.getElementById("activation_5").setAttribute("class", "Betting__C-numC-item5 active");
                document.getElementById("activation_6").setAttribute("class", "Betting__C-numC-item6 ");
                document.getElementById("activation_7").setAttribute("class", "Betting__C-numC-item7 ");
                document.getElementById("activation_8").setAttribute("class", "Betting__C-numC-item8 ");
                document.getElementById("activation_9").setAttribute("class", "Betting__C-numC-item9 ");
            }
            
            
            
               if(i==7){
                document.getElementById("activation_0").setAttribute("class", "Betting__C-numC-item0");
                document.getElementById("activation_1").setAttribute("class", "Betting__C-numC-item1 ");
                document.getElementById("activation_2").setAttribute("class", "Betting__C-numC-item2 ");
                document.getElementById("activation_3").setAttribute("class", "Betting__C-numC-item3 ");
                document.getElementById("activation_4").setAttribute("class", "Betting__C-numC-item4 ");
                document.getElementById("activation_5").setAttribute("class", "Betting__C-numC-item5 ");
                document.getElementById("activation_6").setAttribute("class", "Betting__C-numC-item6 active");
                document.getElementById("activation_7").setAttribute("class", "Betting__C-numC-item7 ");
                document.getElementById("activation_8").setAttribute("class", "Betting__C-numC-item8 ");
                document.getElementById("activation_9").setAttribute("class", "Betting__C-numC-item9 ");
            }
            
            
            
               if(i==8){
                document.getElementById("activation_0").setAttribute("class", "Betting__C-numC-item0");
                document.getElementById("activation_1").setAttribute("class", "Betting__C-numC-item1 ");
                document.getElementById("activation_2").setAttribute("class", "Betting__C-numC-item2 ");
                document.getElementById("activation_3").setAttribute("class", "Betting__C-numC-item3 ");
                document.getElementById("activation_4").setAttribute("class", "Betting__C-numC-item4 ");
                document.getElementById("activation_5").setAttribute("class", "Betting__C-numC-item5 ");
                document.getElementById("activation_6").setAttribute("class", "Betting__C-numC-item6 ");
                document.getElementById("activation_7").setAttribute("class", "Betting__C-numC-item7 active");
                document.getElementById("activation_8").setAttribute("class", "Betting__C-numC-item8 ");
                document.getElementById("activation_9").setAttribute("class", "Betting__C-numC-item9 ");
            }
            
            
            
                if(i==9){
                document.getElementById("activation_0").setAttribute("class", "Betting__C-numC-item0");
                document.getElementById("activation_1").setAttribute("class", "Betting__C-numC-item1 ");
                document.getElementById("activation_2").setAttribute("class", "Betting__C-numC-item2 ");
                document.getElementById("activation_3").setAttribute("class", "Betting__C-numC-item3 ");
                document.getElementById("activation_4").setAttribute("class", "Betting__C-numC-item4 ");
                document.getElementById("activation_5").setAttribute("class", "Betting__C-numC-item5 ");
                document.getElementById("activation_6").setAttribute("class", "Betting__C-numC-item6 ");
                document.getElementById("activation_7").setAttribute("class", "Betting__C-numC-item7 ");
                document.getElementById("activation_8").setAttribute("class", "Betting__C-numC-item8 active");
                document.getElementById("activation_9").setAttribute("class", "Betting__C-numC-item9 ");
            }
            
            
                if(i==10){
                document.getElementById("activation_0").setAttribute("class", "Betting__C-numC-item0");
                document.getElementById("activation_1").setAttribute("class", "Betting__C-numC-item1 ");
                document.getElementById("activation_2").setAttribute("class", "Betting__C-numC-item2 ");
                document.getElementById("activation_3").setAttribute("class", "Betting__C-numC-item3 ");
                document.getElementById("activation_4").setAttribute("class", "Betting__C-numC-item4 ");
                document.getElementById("activation_5").setAttribute("class", "Betting__C-numC-item5 ");
                document.getElementById("activation_6").setAttribute("class", "Betting__C-numC-item6 ");
                document.getElementById("activation_7").setAttribute("class", "Betting__C-numC-item7 ");
                document.getElementById("activation_8").setAttribute("class", "Betting__C-numC-item8 ");
                document.getElementById("activation_9").setAttribute("class", "Betting__C-numC-item9 active");
            }
            
            
            
            sendRequestForActive(i);
          }, 1000);
           
        }
    }

</script>                        
                        
                        
                        
                        
                        

                    
                        <div class="van-overlay" style="z-index: 2009;display: none;" id="outareazone"></div>
                        <div class="van-popup van-popup--round van-popup--bottom" id="orderpopup" style="z-index: 2009;display: none;">
                            <div class="Betting__Popup-1" id="setpopupcolor">
                                <div class="Betting__Popup-head">
                                    <div data-v-15f0cefa="" id="betPupupTiming" class="Betting__Popup-head-title"></div>
                                    <div class="Betting__Popup-head-selectName">
                                        <span data-v-15f0cefa="">Select</span>
                                        <span data-v-15f0cefa="" id="setnumber">1</span>
                                    </div>
                                </div>
                                <div class="Betting__Popup-body">
                                    <div class="Betting__Popup-body-line">
                                        Balance 
                                        <div class="Betting__Popup-body-line-list">
                                            <div data-v-15f0cefa="" id="setActiveColorAmount1" onclick="selecteAmount('1')" class="Betting__Popup-body-line-item bgcolor">1</div>
                                            <div data-v-15f0cefa="" id="setActiveColorAmount2" onclick="selecteAmount('10')" class="Betting__Popup-body-line-item">10</div>
                                            <div data-v-15f0cefa="" id="setActiveColorAmount3" onclick="selecteAmount('100')" class="Betting__Popup-body-line-item">100</div>
                                            <div data-v-15f0cefa="" id="setActiveColorAmount4" onclick="selecteAmount('1000')" class="Betting__Popup-body-line-item">1000</div>
                                        </div>
                                        
                                    </div>



                                    <input id="multiple" value="1" type="hidden"/>
                                    <input id="bitamount" value="1" type="hidden"/>

                                    <div class="Betting__Popup-body-line">
                                        Quantity  
                                        <div class="Betting__Popup-body-line-btnL">
                                            <div data-v-15f0cefa=""   onclick="getactivititoAddormin('0')"  class="Betting__Popup-btn bgcolor minus">-</div>
                                            <div class="van-cell van-field Betting__Popup-input">
                                                <div class="van-cell__value van-field__value">
                                                    <div class="van-field__body">
                                                        <input type="tel"  onkeyup="getManualAmountChange()" inputmode="numeric" id="van-field-9-input" class="text van-field__control">
                                                    </div>
                                                </div>
                                            </div>
                                            <div data-v-15f0cefa="" onclick="getactivititoAddormin('1')" class="Betting__Popup-btn bgcolor plus">+</div>
                                        </div>
                                        
                                    </div>
                                    <div class="Betting__Popup-body-line">
                                        <div data-v-15f0cefa=""></div>
                                        <div class="Betting__Popup-body-line-list">
                                            <div data-v-15f0cefa="" id="popupmultipleColor1"  onclick="getmultiplybyPopup('1')" class="Betting__Popup-body-line-item bgcolor"> X1</div>
                                            <div data-v-15f0cefa="" id="popupmultipleColor2"  onclick="getmultiplybyPopup('2')" class="Betting__Popup-body-line-item"> X5</div>
                                            <div data-v-15f0cefa="" id="popupmultipleColor3"  onclick="getmultiplybyPopup('3')" class="Betting__Popup-body-line-item"> X10</div>
                                            <div data-v-15f0cefa="" id="popupmultipleColor4"  onclick="getmultiplybyPopup('4')" class="Betting__Popup-body-line-item"> X20</div>
                                            <div data-v-15f0cefa="" id="popupmultipleColor5"  onclick="getmultiplybyPopup('5')" class="Betting__Popup-body-line-item"> X50</div>
                                            <div data-v-15f0cefa="" id="popupmultipleColor6"  onclick="getmultiplybyPopup('6')" class="Betting__Popup-body-line-item"> X100</div>
                                        </div>
                                    </div>
                                    <div class="Betting__Popup-body-line">
                                        <span data-v-15f0cefa="" class="Betting__Popup-agree active">I agree</span>
                                        <span data-v-15f0cefa="" class="Betting__Popup-preSaleShow">《Pre-sale rules》</span>
                                    </div>
                                </div>
    
                                <div class="Betting__Popup-foot">
                                    <div data-v-15f0cefa="" onclick="cancelPopup()" class="Betting__Popup-foot-c">Cancel</div>
                                    <div data-v-15f0cefa="" onclick="placeAnOrder()" id="secalculateAmount" class="Betting__Popup-foot-s bgcolor"></div>
                                </div>
    
                            </div>
                        </div>
                    </div>
    

                    <div class="RecordNav__C">
                        <div data-v-4e271e20="" class="history_tabs active" data-id="game_history">Game history</div>
                        <div data-v-4e271e20=""data-id="game_chart"  class="history_tabs">Chart</div>
                        <div data-v-4e271e20=""data-id="my_history"  class="history_tabs">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-c74f4bba="" class="van-col van-col--8">Period</div>
                                    <div data-v-c74f4bba="" class="van-col van-col--5">Number</div>
                                    <div data-v-c74f4bba="" class="van-col van-col--5">Big Small</div>
                                    <div data-v-c74f4bba="" class="van-col van-col--6">Color</div>
                                </div>
                            </div>
                            
                            
                            
                            <div class="GameRecord__C-body">
                               
                            
                                <?php
                                   if($_REQUEST['game'] == "1")
                                   {
                                       $gm = "1";
                                   }
                                   
                                    if($_REQUEST['game'] == "3")
                                   {
                                       $gm = "2";
                                   }
                                   
                                   
                                    if($_REQUEST['game'] == "5")
                                   {
                                       $gm = "3";
                                   }
                                   
                                    if($_REQUEST['game'] == "10")
                                   {
                                       $gm = "4";
                                   }
                                
                                
                                 $table = "existing_game_wingo";
                                 $condition = " where game_number='$gm' ORDER BY 1 DESC limit 15";
                                 $getExistingDetails = $dd->fetch_multi($table,$condition);
                                 foreach($getExistingDetails as $key){

                                    if($key->color == "red,voilet")
                                    {
                                         $colorZone = "1";
                                    }

                                    if($key->color == "red")
                                    {
                                        $colorZone = "2";
                                    }

                                    if($key->color == "voilet")
                                    {
                                        $colorZone = "3";
                                    }

                                    if($key->color == "green")
                                    {
                                        $colorZone = "4";
                                    }

                                    if($key->color == "green,voilet")
                                    {
                                        $colorZone = "5";
                                    }
                                ?>

                                <div class="van-row">
                                    <div data-v-c74f4bba="" class="van-col van-col--8"><?= $key->periods; ?></div>
                                    <div data-v-c74f4bba="" class="van-col van-col--5 numcenter"><div data-v-c74f4bba="" class="GameRecord__C-body-num defaultColor clr<?= $colorZone; ?>"><?= $key->number; ?></div></div>
                                    <div data-v-c74f4bba="" class="van-col van-col--5"><span data-v-c74f4bba=""><?= ucfirst($key->bigorsmall); ?></span></div>
                                    <div class="van-col van-col--6">
                                        <div class="GameRecord__C-origin">
                                            <?php if($colorZone == "1"){ ?>
                                            <div style="border-radius: 40%; width:9px; height:9px; background:#F32510; border: 1px solid #000;"></div>
                                            <div style="border-radius: 40%; width:9px; height:9px; background:#C04AFA; border: 1px solid #000; margin-left:3px;"></div>
                                            <?php } ?>

                                            <?php if($colorZone == "2"){ ?>
                                                <div style="border-radius: 40%; width:9px; height:9px; background:#F32510; border: 1px solid #000;"></div>
                                            <?php } ?>

                                            <?php if($colorZone == "3"){ ?>
                                                <div style="border-radius: 40%; width:9px; height:9px; background:#C04AFA; border: 1px solid #000;"></div>
                                            <?php } ?>

                                            <?php if($colorZone == "4"){ ?>
                                                <div style="border-radius: 40%; width:9px; height:9px; background:#3ECB05; border: 1px solid #000;"></div>
                                            <?php } ?>

                                            <?php if($colorZone == "5"){ ?>
                                                <div style="border-radius: 40%; width:9px; height:9px; background:#3ECB05; border: 1px solid #000;"></div>
                                            <div style="border-radius: 40%; width:9px; height:9px; background:#C04AFA; border: 1px solid #000; margin-left:3px;"></div>
                                            <?php } ?>
                                        </div>
                                    </div>
                                </div>
                                <?php } ?>
                            </div>

                                <div class="more-result-btn">
                                                                    <div onclick="gotomore(<?= $_REQUEST['game']; ?>)" class="btn btn-primary">More</div>
                                                                </div>
                                                            </div>
                                
                                <script>
                                    function gotomore(a){
                                        window.open('result-records.php?game='+a,'_self');
                                    }
                                </script>
                            <!--<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"></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="game_chart">
                            <div class="GameRecord__C-head">
                                <div class="van-row">
                                    <div data-v-d485a39d="" class="van-col van-col--8">Period</div>
                                    <div data-v-d485a39d="" class="van-col van-col--16">Number</div>
                                </div>
                            </div>
                            
                            
                            
                            <div class="Trend__C-body2">
                                
                                <?php
                                   if($_REQUEST['game'] == "1")
                                   {
                                       $gm = "1";
                                   }
                                   
                                    if($_REQUEST['game'] == "3")
                                   {
                                       $gm = "2";
                                   }
                                   
                                   
                                    if($_REQUEST['game'] == "5")
                                   {
                                       $gm = "3";
                                   }
                                   
                                    if($_REQUEST['game'] == "10")
                                   {
                                       $gm = "4";
                                   }
                                
                                
                                 $table = "existing_game_wingo";
                                 $condition = " where game_number='$gm' ORDER BY 1 DESC limit 15";
                                 $getExistingDetails = $dd->fetch_multi($table,$condition);
                                 foreach($getExistingDetails as $key){

                                    if($key->color == "red,voilet")
                                    {
                                         $colorZone = "1";
                                    }

                                    if($key->color == "red")
                                    {
                                        $colorZone = "2";
                                    }

                                    if($key->color == "voilet")
                                    {
                                        $colorZone = "3";
                                    }

                                    if($key->color == "green")
                                    {
                                        $colorZone = "4";
                                    }

                                    if($key->color == "green,voilet")
                                    {
                                        $colorZone = "5";
                                    }
                                ?>
                                <div colour="green" number="9">
                                    <div class="van-row">
                                        <div data-v-d485a39d="" class="van-col van-col--8">
                                            <div data-v-d485a39d="" class="Trend__C-body2-IssueNumber"><?= $key->periods; ?></div>
                                        </div>
                                        <div class="van-col van-col--16">
                                            <div class="Trend__C-body2-Num  action<?= $key->number; ?>">
                                                <canvas data-v-d485a39d="" canvas="" id="myCanvas<?= $key->number; ?>" class="line-canvas"></canvas>
                                                <div data-v-d485a39d="" class="Trend__C-body2-Num-item action_0">0</div>
                                                <div data-v-d485a39d="" class="Trend__C-body2-Num-item action_1">1</div>
                                                <div data-v-d485a39d="" class="Trend__C-body2-Num-item action_2">2</div>
                                                <div data-v-d485a39d="" class="Trend__C-body2-Num-item action_3">3</div>
                                                <div data-v-d485a39d="" class="Trend__C-body2-Num-item action_4">4</div>
                                                <div data-v-d485a39d="" class="Trend__C-body2-Num-item action_5">5</div>
                                                <div data-v-d485a39d="" class="Trend__C-body2-Num-item action_6">6</div>
                                                <div data-v-d485a39d="" class="Trend__C-body2-Num-item action_7">7</div>
                                                <div data-v-d485a39d="" class="Trend__C-body2-Num-item action_8">8</div>
                                                <div data-v-d485a39d="" class="Trend__C-body2-Num-item action_9">9</div>
                                                <div data-v-d485a39d="" class="Trend__C-body2-Num-BS is<?= strtoupper(substr($key->bigorsmall, 0, 1)); ?>"><?= strtoupper(substr($key->bigorsmall, 0, 1)); ?></div>
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <!-- <div class="van-row">
                                    <div data-v-c74f4bba="" class="van-col van-col--8"><?= $key->periods; ?></div>
                                    <div data-v-c74f4bba="" class="van-col van-col--5 numcenter"><div data-v-c74f4bba="" class="GameRecord__C-body-num defaultColor clr<?= $colorZone; ?>"><?= $key->number; ?></div></div>
                                    <div data-v-c74f4bba="" class="van-col van-col--5"><span data-v-c74f4bba=""><?= ucfirst($key->bigorsmall); ?></span></div>
                                    <div class="van-col van-col--6">
                                        <div class="GameRecord__C-origin">
                                            <?php if($colorZone == "1"){ ?>
                                            <div style="border-radius: 40%; width:9px; height:9px; background:#F32510; border: 1px solid #000;"></div>
                                            <div style="border-radius: 40%; width:9px; height:9px; background:#C04AFA; border: 1px solid #000; margin-left:3px;"></div>
                                            <?php } ?>

                                            <?php if($colorZone == "2"){ ?>
                                                <div style="border-radius: 40%; width:9px; height:9px; background:#F32510; border: 1px solid #000;"></div>
                                            <?php } ?>

                                            <?php if($colorZone == "3"){ ?>
                                                <div style="border-radius: 40%; width:9px; height:9px; background:#C04AFA; border: 1px solid #000;"></div>
                                            <?php } ?>

                                            <?php if($colorZone == "4"){ ?>
                                                <div style="border-radius: 40%; width:9px; height:9px; background:#3ECB05; border: 1px solid #000;"></div>
                                            <?php } ?>

                                            <?php if($colorZone == "5"){ ?>
                                                <div style="border-radius: 40%; width:9px; height:9px; background:#3ECB05; border: 1px solid #000;"></div>
                                            <div style="border-radius: 40%; width:9px; height:9px; background:#C04AFA; border: 1px solid #000; margin-left:3px;"></div>
                                            <?php } ?>
                                        </div>
                                    </div>
                                </div> -->

                                <?php } ?>
                            </div>

                        </div>
                        <div class="GameRecord__C" id="my_history">
                            <!--div class="GameRecord__C-head ">
                                <div class="van-row">
                                    <div data-v-c74f4bba="" class="van-col van-col--8">Period</div>
                                    <div data-v-c74f4bba="" class="van-col van-col--5">Number</div>
                                    <div data-v-c74f4bba="" class="van-col van-col--5">Big Small</div>
                                    <div data-v-c74f4bba="" class="van-col van-col--6">Color</div>
                                </div>
                            </div-->
                            <div class="GameRecord__C-body my_history">
                                <div class="van-row my_history_item">
                                    
                                     <?php
                                          $table = "wingo_order_details";
                                          $condition = " where userKey='$userKey' AND status='pending' AND game_number='$gm' ORDER BY 1 DESC";
                                          $getWingo = $dd->fetch_multi($table,$condition);
                                          foreach($getWingo as $key){
                                              
                                      ?>
                                    
                                    
                                      <div class="item c-row">
                                        <div class="result">
                                            <div class="select select-red">
                                                <span><?= $key->select_number; ?></span>
                                            </div>
                                        </div>
                                        <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 : Pending</span>
                                                </div>
                                                <div data-v-a9660e98="" class="tiem">Pending</div>
                                            </div>
                                            <div class="money">
                                                <span data-v-a9660e98="" class="<?= $amcolor; ?>"><?= $key->amount; ?></span>
                                            </div>
                                        </div>
                                    </div>
                                    <?php } ?>
                                    
                                    
                                   <?php
                                     $table = "account_history";
                                     $condition = " where userKey='$userKey' AND game_name='Wingo' AND gameNumber='$gm' ORDER BY 1 DESC  limit 15";
                                     $getMyHistory = $dd->fetch_multi($table,$condition);
                                     foreach($getMyHistory as $key){
                                        if($key->lossorprofit >1){
                                            $status = "success";
                                        }
                                        else{
                                            $status = "failed";
                                        }

                                        if($status == "success"){
                                             $statusColor = "green";
                                             $comment = "success";
                                             $amcolor = "success";
                                             $amount = $key->lossorprofit;
                                        }

                                        if($status == "failed"){
                                            $statusColor = "red";
                                            $comment = "failed";
                                            $amcolor = "fail";
                                            $amount = $key->lossorprofit;
                                        }

                                       if($key->selected_number == "red")
                                       {
                                           $cardColor = "red";
                                           $showColor = "1";
                                           $slctNumber = null;
                                       }elseif($key->selected_number == "green")
                                       {
                                           $cardColor = "green";
                                           $showColor = "1";
                                           $slctNumber = null;
                                       }elseif($key->selected_number == "voilet")
                                       {
                                           $cardColor = "violet";
                                           $showColor = "1";
                                           $slctNumber = null;
                                       }elseif($key->selected_number == "big"){
                                         $cardColor = "big";
                                         $showColor = "0";
                                       }elseif($key->selected_number == "small")
                                       {
                                            $cardColor = "small";
                                            $showColor = "0";
                                       }else{
                                           if($key->selected_number == "0"){
                                             $cardColor = "red-violet";
                                             $slctNumber = $key->selected_number;
                                             $showColor = "1";
                                           }else{
                                            $cardColor = "small";
                                            $showColor = "1";
                                            $slctNumber = $key->selected_number;
                                           }
                                       }
                                     ?>

                                    <div class="item c-row">
                                        <div class="result">
                                            <div class="select select-<?= $cardColor; ?>">
                                               <?php if($showColor == "0"){ ?>
                                                <div class="van-image">
                                                    <img src="./images/<?= $cardColor; ?>.png" class="van-image__img">
                                                </div>
                                                <?php }else{ ?>
                                                <span><?= $slctNumber; ?></span>
                                                <?php } ?>
                                            </div>
                                        </div>
                                        <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 <?= $statusColor; ?>"><?= $comment; ?></span>
                                                </div>
                                                <div data-v-a9660e98="" class="tiem"><?= $key->action_date; ?></div>
                                            </div>
                                            <div class="money">
                                                <span data-v-a9660e98="" class="<?= $amcolor; ?>"><?= $amount; ?></span>
                                            </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/1691</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>


            <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">
            			Lottery results 
            			<div data-v-537dde41="" id="iscolor"></div>
            			<div data-v-537dde41="" class="WinningNum" id="isnumber"></div>
            			<div data-v-537dde41="" id="isbigsmall"></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="howToPlayContent">
                <div class="van-overlay" data-v-a7a14dc2="" style="z-index: 100;display:none"></div>
                <div class="wingo_howTpPlay van-popup van-popup--round van-popup--center" style="z-index: 120;display:none">
                    <div class="TimeLeft__C-PreSale">
                        <div data-v-a7a14dc2="" class="TimeLeft__C-PreSale-head">How to play</div>
                        <div class="TimeLeft__C-PreSale-body">
                            <div class="content">
                                <p>1 minutes 1 issue, 45 seconds to order, 15 seconds waiting for the draw. It opens all day. The total number of trade is 1440 issues.</p>
                                <p>If you spend 100 to trade, after deducting 2 service fee, your contract amount is 98:</p>
                                <p>1.Select green: if the result shows 1,3,7,9 you will get (98*2) 196;If the result shows 5, you will get (98*1.5) 147</p>
                                <p>2.Select red: if the result shows 2,4,6,8 you will get (98*2) 196;If the result shows 0, you will get (98*1.5) 147</p>
                                <p>3.Select violet:if the result shows 0 or 5, you will get (98*4.5) 441</p>
                                <p>4. Select number:if the result is the same as the number you selected, you will get (98*9) 882</p>
                                <p>5. Select big: if the result shows 5,6,7,8,9 you will get (98 * 2) 196</p>
                                <p>6. Select small: if the result shows 0,1,2,3,4 you will get (98 * 2) 196</p>
                            </div>
                        </div>
                        <div class="TimeLeft__C-PreSale-foot">
                            <div data-v-a7a14dc2="" class="TimeLeft__C-PreSale-foot-btn">Close</div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!------------------FORM FOR GAME ORDER------------>
    <input name="selectedNumber" id="snumber" type="hidden" />
    <input name="amount" id="amount" value="1"  type="hidden"/>
    <input name="quantity" id="qty" value="1" type="hidden"/>
    <input name="requestType" id="reqtype" type="hidden"/>
    <input name="duration" id="duration_zone" value="1" type="hidden"/>





<audio id="myAudio">
  <!-- <source src="horse.ogg" type="audio/ogg"> -->
  <source src="newSound.mp3" type="audio/mpeg">
  Your browser does not support the audio element.
</audio>
<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>


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

  var sec = getfulltime;
  setInterval(function() {
    
    if(sec <= 0 )
    {
        document.getElementById("myAudio").pause();
        var minn = 00;
        getProccessedForResult('<?= $runningPeriods; ?>');
    }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('orderpopup').style.display = "none";
        document.getElementById('outareazone').style.display = "none";
        
        document.getElementById("ertyuisdfghjk45678").style.display = "block";
        document.getElementById("setCountdwonTimeForBlock").innerHTML = sec;
    }
   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 getManualAmountChange(){
        var getLiveQuantity = document.getElementById('van-field-9-input').value;
           var getAmountFrom = document.getElementById("amount").value;
           var ttttt = parseInt(document.getElementById("qty").value);
           document.getElementById("qty").value = getLiveQuantity;
        //    document.getElementById("van-field-9-input").value = getAmountFrom;
           document.getElementById("secalculateAmount").innerHTML = "Total amount ₹"+getAmountFrom*getLiveQuantity;
   }



   function getactivititoAddormin(a)
   {
       if(a == "1"){
           var getAmountFrom = document.getElementById("amount").value;
           var ttttt = parseInt(document.getElementById("qty").value);
           var ttttt2 = ttttt+1;
           document.getElementById("qty").value = ttttt2;
           document.getElementById("van-field-9-input").value = ttttt2;
           document.getElementById("secalculateAmount").innerHTML = "Total amount ₹"+getAmountFrom*ttttt2;
       }


       if(a == "0"){
           var getAmountFrom = document.getElementById("amount").value;
           var ttttt = parseInt(document.getElementById("qty").value);
           if(ttttt > 1){
            var ttttt2 = ttttt-1;
            document.getElementById("qty").value = ttttt2;
            document.getElementById("van-field-9-input").value = ttttt2;
            document.getElementById("secalculateAmount").innerHTML = "Total amount ₹"+getAmountFrom*ttttt2;
           }
       }
   }


  if("<?= $_REQUEST['game']; ?>" == "1")
   {
            document.getElementById("duration_zone").value = "1";
            
            document.getElementById("setingColoe1").setAttribute("class", "GameList__C-item active");
            document.getElementById("setingColoe2").setAttribute("class", "GameList__C-item");
            document.getElementById("setingColoe3").setAttribute("class", "GameList__C-item");
            document.getElementById("setingColoe4").setAttribute("class", "GameList__C-item");
            
            document.getElementById("setWingoSectionInGameSection").innerHTML = "Win Go 1Min";
            
   }
   
   
   if("<?= $_REQUEST['game']; ?>" == "3")
   {
            document.getElementById("duration_zone").value = "2";
            
            
            document.getElementById("setingColoe1").setAttribute("class", "GameList__C-item");
            document.getElementById("setingColoe2").setAttribute("class", "GameList__C-item active");
            document.getElementById("setingColoe3").setAttribute("class", "GameList__C-item");
            document.getElementById("setingColoe4").setAttribute("class", "GameList__C-item");
            
            document.getElementById("setWingoSectionInGameSection").innerHTML = "Win Go 3Min";
   }
   
   
   if("<?= $_REQUEST['game']; ?>" == "5")
   {
            document.getElementById("duration_zone").value = "3";
            
            document.getElementById("setingColoe1").setAttribute("class", "GameList__C-item");
            document.getElementById("setingColoe2").setAttribute("class", "GameList__C-item");
            document.getElementById("setingColoe3").setAttribute("class", "GameList__C-item active");
            document.getElementById("setingColoe4").setAttribute("class", "GameList__C-item");
            document.getElementById("setWingoSectionInGameSection").innerHTML = "Win Go 5Min";
   }
   
   
   if("<?= $_REQUEST['game']; ?>" == "10")
   {
            document.getElementById("duration_zone").value = "4";
            
            document.getElementById("setingColoe1").setAttribute("class", "GameList__C-item");
            document.getElementById("setingColoe2").setAttribute("class", "GameList__C-item");
            document.getElementById("setingColoe3").setAttribute("class", "GameList__C-item");
            document.getElementById("setingColoe4").setAttribute("class", "GameList__C-item active");
            
            document.getElementById("setWingoSectionInGameSection").innerHTML = "Win Go 10Min";
   }





   
   ///////////////----------GET TO PICK NUMBER'S AND OPEN POPUP------------------///////////
   function gotopicData(a)
   {
         if(document.getElementById('duration_zone').value == 1){
             var mmm = 1;
         }
         
         if(document.getElementById('duration_zone').value == 2){
             var mmm = 3;
         }
         
         if(document.getElementById('duration_zone').value == 3){
             var mmm = 5;
         }
         
         if(document.getElementById('duration_zone').value == 4){
             var mmm = 10;
         }
       
        
        document.getElementById('orderpopup').style.display = "block";
        document.getElementById('outareazone').style.display = "block";
        document.getElementById('betPupupTiming').innerHTML = "Win Go "+mmm+"min";
        
        if(a==0 || a==1 || a==2 || a==3 || a==4 || a==5 || a==6 || a==7 || a==8 || a==9){
            document.getElementById('setpopupcolor').setAttribute("class", "Betting__Popup-"+a);
           document.getElementById("snumber").value =a;
        }

        if(a=='green')
        {
            document.getElementById("snumber").value = "green";
            document.getElementById('setpopupcolor').setAttribute("class", "Betting__Popup-"+a);
            
        }
        
        if(a=='voilet'){
            document.getElementById('setpopupcolor').setAttribute("class", "Betting__Popup-"+a);
            document.getElementById("snumber").value = "voilet";
        }

        if(a=='red'){
            document.getElementById('setpopupcolor').setAttribute("class", "Betting__Popup-"+a);
            document.getElementById("snumber").value = "red";
        }

        if(a=='big'){
            document.getElementById('setpopupcolor').setAttribute("class", "Betting__Popup-"+a);
            document.getElementById("snumber").value = "big";
        }

        if(a=='small'){
            document.getElementById('setpopupcolor').setAttribute("class", "Betting__Popup-"+a);
            document.getElementById("snumber").value = "small";
        }

       
        
         document.getElementById("setnumber").innerHTML = a;

        setamounttoPopupForUser();
   }






   ///////////////////////////--------------GET TO PICK MULTIPLE NUMBER-------------------////////////////
   function gettoMultipli(a)
   {
        if(a==1)
        {
            document.getElementById("qty").value = 1;
            document.getElementById('mulpleId0').setAttribute("class", "Betting__C-multiple-r active");
            document.getElementById('mulpleId1').setAttribute("class", "Betting__C-multiple-r");
            document.getElementById('mulpleId2').setAttribute("class", "Betting__C-multiple-r");
            document.getElementById('mulpleId3').setAttribute("class", "Betting__C-multiple-r");
            document.getElementById('mulpleId4').setAttribute("class", "Betting__C-multiple-r");
            document.getElementById('mulpleId5').setAttribute("class", "Betting__C-multiple-r");
            document.getElementById('mulpleId6').setAttribute("class", "Betting__C-multiple-r");


            document.getElementById('popupmultipleColor1').setAttribute("class", "Betting__Popup-body-line-item bgcolor");
            document.getElementById('popupmultipleColor2').setAttribute("class", "Betting__Popup-body-line-item");
            document.getElementById('popupmultipleColor3').setAttribute("class", "Betting__Popup-body-line-item");
            document.getElementById('popupmultipleColor4').setAttribute("class", "Betting__Popup-body-line-item");
            document.getElementById('popupmultipleColor5').setAttribute("class", "Betting__Popup-body-line-item");
            document.getElementById('popupmultipleColor6').setAttribute("class", "Betting__Popup-body-line-item");
            


        }

        
        if(a==2)
        {
            document.getElementById("qty").value = 5;
            document.getElementById('mulpleId0').setAttribute("class", "Betting__C-multiple-r");
            document.getElementById('mulpleId1').setAttribute("class", "Betting__C-multiple-r active");
            document.getElementById('mulpleId2').setAttribute("class", "Betting__C-multiple-r");
            document.getElementById('mulpleId3').setAttribute("class", "Betting__C-multiple-r");
            document.getElementById('mulpleId4').setAttribute("class", "Betting__C-multiple-r");
            document.getElementById('mulpleId5').setAttribute("class", "Betting__C-multiple-r");

            
            document.getElementById('popupmultipleColor1').setAttribute("class", "Betting__Popup-body-line-item");
            document.getElementById('popupmultipleColor2').setAttribute("class", "Betting__Popup-body-line-item bgcolor");
            document.getElementById('popupmultipleColor3').setAttribute("class", "Betting__Popup-body-line-item");
            document.getElementById('popupmultipleColor4').setAttribute("class", "Betting__Popup-body-line-item");
            document.getElementById('popupmultipleColor5').setAttribute("class", "Betting__Popup-body-line-item");
            document.getElementById('popupmultipleColor6').setAttribute("class", "Betting__Popup-body-line-item");
        }

        
        if(a==3)
        {
            document.getElementById("qty").value = 10;
            document.getElementById('mulpleId0').setAttribute("class", "Betting__C-multiple-r");
            document.getElementById('mulpleId1').setAttribute("class", "Betting__C-multiple-r");
            document.getElementById('mulpleId2').setAttribute("class", "Betting__C-multiple-r active");
            document.getElementById('mulpleId3').setAttribute("class", "Betting__C-multiple-r");
            document.getElementById('mulpleId4').setAttribute("class", "Betting__C-multiple-r");
            document.getElementById('mulpleId5').setAttribute("class", "Betting__C-multiple-r");


            
            document.getElementById('popupmultipleColor1').setAttribute("class", "Betting__Popup-body-line-item");
            document.getElementById('popupmultipleColor2').setAttribute("class", "Betting__Popup-body-line-item");
            document.getElementById('popupmultipleColor3').setAttribute("class", "Betting__Popup-body-line-item bgcolor");
            document.getElementById('popupmultipleColor4').setAttribute("class", "Betting__Popup-body-line-item");
            document.getElementById('popupmultipleColor5').setAttribute("class", "Betting__Popup-body-line-item");
            document.getElementById('popupmultipleColor6').setAttribute("class", "Betting__Popup-body-line-item");
        }

        
        if(a==4)
        {
            document.getElementById("qty").value = 20;
            document.getElementById('mulpleId0').setAttribute("class", "Betting__C-multiple-r");
            document.getElementById('mulpleId1').setAttribute("class", "Betting__C-multiple-r");
            document.getElementById('mulpleId2').setAttribute("class", "Betting__C-multiple-r");
            document.getElementById('mulpleId3').setAttribute("class", "Betting__C-multiple-r active");
            document.getElementById('mulpleId4').setAttribute("class", "Betting__C-multiple-r");
            document.getElementById('mulpleId5').setAttribute("class", "Betting__C-multiple-r");

            
            
            document.getElementById('popupmultipleColor1').setAttribute("class", "Betting__Popup-body-line-item");
            document.getElementById('popupmultipleColor2').setAttribute("class", "Betting__Popup-body-line-item");
            document.getElementById('popupmultipleColor3').setAttribute("class", "Betting__Popup-body-line-item");
            document.getElementById('popupmultipleColor4').setAttribute("class", "Betting__Popup-body-line-item bgcolor");
            document.getElementById('popupmultipleColor5').setAttribute("class", "Betting__Popup-body-line-item");
            document.getElementById('popupmultipleColor6').setAttribute("class", "Betting__Popup-body-line-item");
        }

        
        if(a==5)
        {
            document.getElementById("qty").value = 50;
            document.getElementById('mulpleId0').setAttribute("class", "Betting__C-multiple-r");
            document.getElementById('mulpleId1').setAttribute("class", "Betting__C-multiple-r");
            document.getElementById('mulpleId2').setAttribute("class", "Betting__C-multiple-r");
            document.getElementById('mulpleId3').setAttribute("class", "Betting__C-multiple-r");
            document.getElementById('mulpleId4').setAttribute("class", "Betting__C-multiple-r active");
            document.getElementById('mulpleId5').setAttribute("class", "Betting__C-multiple-r");

            
            document.getElementById('popupmultipleColor1').setAttribute("class", "Betting__Popup-body-line-item");
            document.getElementById('popupmultipleColor2').setAttribute("class", "Betting__Popup-body-line-item");
            document.getElementById('popupmultipleColor3').setAttribute("class", "Betting__Popup-body-line-item");
            document.getElementById('popupmultipleColor4').setAttribute("class", "Betting__Popup-body-line-item");
            document.getElementById('popupmultipleColor5').setAttribute("class", "Betting__Popup-body-line-item bgcolor");
            document.getElementById('popupmultipleColor6').setAttribute("class", "Betting__Popup-body-line-item");
        }

        
        if(a==6)
        {
            document.getElementById("qty").value = 100;
            document.getElementById('mulpleId0').setAttribute("class", "Betting__C-multiple-r");
            document.getElementById('mulpleId1').setAttribute("class", "Betting__C-multiple-r");
            document.getElementById('mulpleId2').setAttribute("class", "Betting__C-multiple-r");
            document.getElementById('mulpleId3').setAttribute("class", "Betting__C-multiple-r");
            document.getElementById('mulpleId4').setAttribute("class", "Betting__C-multiple-r");
            document.getElementById('mulpleId5').setAttribute("class", "Betting__C-multiple-r active");

            
            document.getElementById('popupmultipleColor1').setAttribute("class", "Betting__Popup-body-line-item");
            document.getElementById('popupmultipleColor2').setAttribute("class", "Betting__Popup-body-line-item");
            document.getElementById('popupmultipleColor3').setAttribute("class", "Betting__Popup-body-line-item");
            document.getElementById('popupmultipleColor4').setAttribute("class", "Betting__Popup-body-line-item");
            document.getElementById('popupmultipleColor5').setAttribute("class", "Betting__Popup-body-line-item");
            document.getElementById('popupmultipleColor6').setAttribute("class", "Betting__Popup-body-line-item bgcolor");
        }
       
   }




   /////////////////////////----------------SELECT AMOUNT FROM POPUP-------------////////////

   function selecteAmount(a)
   {
     if(a == 1){
        document.getElementById('setActiveColorAmount1').setAttribute("class", "Betting__Popup-body-line-item bgcolor");
        document.getElementById('setActiveColorAmount2').setAttribute("class", "Betting__Popup-body-line-item");
        document.getElementById('setActiveColorAmount3').setAttribute("class", "Betting__Popup-body-line-item");
        document.getElementById('setActiveColorAmount4').setAttribute("class", "Betting__Popup-body-line-item");

        document.getElementById("amount").value = 1;
        setamounttoPopupForUser();
     }

     if(a == 10){
        document.getElementById('setActiveColorAmount1').setAttribute("class", "Betting__Popup-body-line-item");
        document.getElementById('setActiveColorAmount2').setAttribute("class", "Betting__Popup-body-line-item bgcolor");
        document.getElementById('setActiveColorAmount3').setAttribute("class", "Betting__Popup-body-line-item");
        document.getElementById('setActiveColorAmount4').setAttribute("class", "Betting__Popup-body-line-item");

        document.getElementById("amount").value = 10;
        setamounttoPopupForUser();
     }

     if(a == 100){
        document.getElementById('setActiveColorAmount1').setAttribute("class", "Betting__Popup-body-line-item");
        document.getElementById('setActiveColorAmount2').setAttribute("class", "Betting__Popup-body-line-item");
        document.getElementById('setActiveColorAmount3').setAttribute("class", "Betting__Popup-body-line-item bgcolor");
        document.getElementById('setActiveColorAmount4').setAttribute("class", "Betting__Popup-body-line-item");
        
        document.getElementById("amount").value = 100;
        setamounttoPopupForUser();
     }


     if(a == 1000){
        document.getElementById('setActiveColorAmount1').setAttribute("class", "Betting__Popup-body-line-item");
        document.getElementById('setActiveColorAmount2').setAttribute("class", "Betting__Popup-body-line-item");
        document.getElementById('setActiveColorAmount3').setAttribute("class", "Betting__Popup-body-line-item");
        document.getElementById('setActiveColorAmount4').setAttribute("class", "Betting__Popup-body-line-item bgcolor");

        
        document.getElementById("amount").value = 1000;
        setamounttoPopupForUser();
     }
   }
   




   //////////////////////////-------------------SELECT MULTIPLE INSIDE POPUP---------------//////////
   function getmultiplybyPopup(a)
   {
      if(a == 1)
      {
        
            document.getElementById('popupmultipleColor1').setAttribute("class", "Betting__Popup-body-line-item bgcolor");
            document.getElementById('popupmultipleColor2').setAttribute("class", "Betting__Popup-body-line-item");
            document.getElementById('popupmultipleColor3').setAttribute("class", "Betting__Popup-body-line-item");
            document.getElementById('popupmultipleColor4').setAttribute("class", "Betting__Popup-body-line-item");
            document.getElementById('popupmultipleColor5').setAttribute("class", "Betting__Popup-body-line-item");
            document.getElementById('popupmultipleColor6').setAttribute("class", "Betting__Popup-body-line-item");

            document.getElementById("qty").value = 1;
            setamounttoPopupForUser();
      }


      if(a == 2)
      {
        
            document.getElementById('popupmultipleColor1').setAttribute("class", "Betting__Popup-body-line-item");
            document.getElementById('popupmultipleColor2').setAttribute("class", "Betting__Popup-body-line-item bgcolor");
            document.getElementById('popupmultipleColor3').setAttribute("class", "Betting__Popup-body-line-item");
            document.getElementById('popupmultipleColor4').setAttribute("class", "Betting__Popup-body-line-item");
            document.getElementById('popupmultipleColor5').setAttribute("class", "Betting__Popup-body-line-item");
            document.getElementById('popupmultipleColor6').setAttribute("class", "Betting__Popup-body-line-item");

            document.getElementById("qty").value = 5;
            setamounttoPopupForUser();
      }


      if(a == 3)
      {
        
            document.getElementById('popupmultipleColor1').setAttribute("class", "Betting__Popup-body-line-item");
            document.getElementById('popupmultipleColor2').setAttribute("class", "Betting__Popup-body-line-item");
            document.getElementById('popupmultipleColor3').setAttribute("class", "Betting__Popup-body-line-item bgcolor");
            document.getElementById('popupmultipleColor4').setAttribute("class", "Betting__Popup-body-line-item");
            document.getElementById('popupmultipleColor5').setAttribute("class", "Betting__Popup-body-line-item");
            document.getElementById('popupmultipleColor6').setAttribute("class", "Betting__Popup-body-line-item");

            document.getElementById("qty").value = 10;
            setamounttoPopupForUser();
      }


      
      if(a == 4)
      {
        
            document.getElementById('popupmultipleColor1').setAttribute("class", "Betting__Popup-body-line-item");
            document.getElementById('popupmultipleColor2').setAttribute("class", "Betting__Popup-body-line-item");
            document.getElementById('popupmultipleColor3').setAttribute("class", "Betting__Popup-body-line-item");
            document.getElementById('popupmultipleColor4').setAttribute("class", "Betting__Popup-body-line-item bgcolor");
            document.getElementById('popupmultipleColor5').setAttribute("class", "Betting__Popup-body-line-item");
            document.getElementById('popupmultipleColor6').setAttribute("class", "Betting__Popup-body-line-item");

            document.getElementById("qty").value = 20;
            setamounttoPopupForUser();
      }


      if(a == 5)
      {
        
            document.getElementById('popupmultipleColor1').setAttribute("class", "Betting__Popup-body-line-item");
            document.getElementById('popupmultipleColor2').setAttribute("class", "Betting__Popup-body-line-item");
            document.getElementById('popupmultipleColor3').setAttribute("class", "Betting__Popup-body-line-item");
            document.getElementById('popupmultipleColor4').setAttribute("class", "Betting__Popup-body-line-item");
            document.getElementById('popupmultipleColor5').setAttribute("class", "Betting__Popup-body-line-item bgcolor");
            document.getElementById('popupmultipleColor6').setAttribute("class", "Betting__Popup-body-line-item");

            document.getElementById("qty").value = 50;
            setamounttoPopupForUser();
      }


      if(a == 6)
      {
        
            document.getElementById('popupmultipleColor1').setAttribute("class", "Betting__Popup-body-line-item");
            document.getElementById('popupmultipleColor2').setAttribute("class", "Betting__Popup-body-line-item");
            document.getElementById('popupmultipleColor3').setAttribute("class", "Betting__Popup-body-line-item");
            document.getElementById('popupmultipleColor4').setAttribute("class", "Betting__Popup-body-line-item");
            document.getElementById('popupmultipleColor5').setAttribute("class", "Betting__Popup-body-line-item");
            document.getElementById('popupmultipleColor6').setAttribute("class", "Betting__Popup-body-line-item bgcolor");
            
            document.getElementById("qty").value = 100;
            setamounttoPopupForUser();
      }
   }






   ///////////////////////--------------------CANCEL POPUP------------////////////
   function cancelPopup()
   {
    
        document.getElementById('orderpopup').style.display = "none";
        document.getElementById('outareazone').style.display = "none";
   }

   

   function setamounttoPopupForUser()
   {
      var getAmountFrom = document.getElementById("amount").value;
      var qty = document.getElementById("qty").value;
      document.getElementById("van-field-9-input").value = qty;
      document.getElementById("secalculateAmount").innerHTML = "Total amount ₹"+getAmountFrom*qty;
   }





   ////////////////////////////-----------------Place An Order--------------//////////////
   function placeAnOrder()
   {
        var SlNumber = document.getElementById("snumber").value;
        var amountGet = document.getElementById("amount").value;
        var qtyGet = document.getElementById("qty").value;
        var gameNumber = document.getElementById("duration_zone").value;
        var totalAmount = amountGet*qtyGet;
    
        const xhttp = new XMLHttpRequest();
        xhttp.onload = function() {
            var demo_show = this.responseText;
            console.log(demo_show);
            const myArr = JSON.parse(demo_show);
            if(myArr.status == "success")
            {
                document.getElementById("responceFrom").style.display = "block";
                document.getElementById("responceFrom").innerHTML = "success";
                document.getElementById('orderpopup').style.display = "none";
                document.getElementById('outareazone').style.display = "none";
                setInterval(function() {
                   window.open('?game='+<?= $_REQUEST['game']; ?>,'_self');
                }, 1000);
            }
            else{
                document.getElementById('orderpopup').style.display = "none";
                document.getElementById('outareazone').style.display = "none";
                
                document.getElementById("responceFrom").style.display = "block";
                document.getElementById("responceFrom").innerHTML = myArr.remark;
                setInterval(function() {
                   document.getElementById("responceFrom").style.display = "none";
                }, 1000);
            }
        }
        xhttp.open("GET", "Wingo_placeorderApi.php?snumber="+SlNumber+"&amount="+totalAmount+"&gameNumber="+gameNumber+"&qty"+qtyGet+"&periods="+<?= $runningPeriods; ?>);
        xhttp.send(); 

   }


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" && myArr.userorder == "1")
            {
               
               
               if(myArr.result == "0"){
                  var rrcolor = "Red-Violet";
               }
               
               if(myArr.result == "5"){
                  var rrcolor = "Green-Violet";
               }
               
               
               if(myArr.result == "1" || myArr.result == "3" || myArr.result == "7" || myArr.result == "9"){
                  var rrcolor = "Green";
               }
               
               if(myArr.result == "2" || myArr.result == "4" || myArr.result == "6" || myArr.result == "8"){
                  var rrcolor = "Red";
               }
               
               if(myArr.result < 5){
                 rrBigSmall = "Small";
               }else{
                 rrBigSmall = "Big";
               }
               
               
               if(myArr.winorloss == "1"){
                    document.getElementById('isnumber').innerHTML = myArr.result;
                   document.getElementById('iscolor').innerHTML = rrcolor;
                   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{
                   document.getElementById('isnumber').innerHTML = myArr.result;
                   document.getElementById('iscolor').innerHTML = rrcolor;
                   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", "getLiveResult.php?periods="+a+"&userkey="+<?= $userKey; ?>);
        xhttp.send(); 

  }, 1000);        
}



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




$('.TimeLeft__C-rule').click(function(){
    $('body').addClass('howToPlay');
});
$('.TimeLeft__C-PreSale-foot-btn').click(function(){
    $('body').removeClass('howToPlay');
});

</script>
