<?php
session_start();
@$userKey = $_SESSION['loginKey'];
include "control/activity.php";
$dd = new activity();

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

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



<!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>
    
<script>
   let gameNumber = 1;
   let duration = 0;
   let periods = 0;
   let walletBalance = 0;
   let amount = 1;
   let multipleNumber = 1;
   let betBalance = 1;
   var betSelectedNumber;
</script>    
    
    
  <style>
    .image-container {
      position: relative;
      display: inline-block;
    }

    .image-container img {
      border-radius: 50%;
    }

    .image-container .number {
      position: absolute;
      top: 10px; /* Adjust the position */
      left: 50%;
      transform: translateX(-50%);
      font-size: 24px;
      font-weight: bold;
      color: #f79679;
      text-shadow: 1px 1px 5px black;
    }
  </style>    
</head>
<body>
    <div id="app">
        <div class="WinGo__C container trx_page">
            <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>
                </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=""><font id="walletAmount"></font></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="">TRX<br>1Min</div>
                </div>
                 <div id="setingColoe2" class="GameList__C-item" data-id="one_Min"  onclick="getTwoActivity('2')">
                    <div data-v-484ec2ec="">TRX<br>3Min</div>
                </div>
                <div id="setingColoe3" class="GameList__C-item" data-id="one_Min"  onclick="getTwoActivity('3')">
                    <div data-v-484ec2ec="">TRX<br>5Min</div>
                </div>
                <div id="setingColoe4" class="GameList__C-item" data-id="one_Min"  onclick="getTwoActivity('4')">
                    <div data-v-484ec2ec="">TRX<br>10Min</div>
                </div>
               
            </div>
            
    <div class="game-content">
        
           
            
            <div class="bet_details" style="display:none;" id="responceFrom"></div>
        
            
            
            <div class="bet_details" style="display:none;" id="responceFrom"></div>




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

                <div class="wingoGame active" id="one_Min">
                    <div class="trx-timer">
                        <div class="trx-timer-top">
                            <div class="trx-preiod">
                                <div class="d-flex align-center justify-center" style="gap: 5px;">
                                    <span class="text-box">Period</span>
                                    <div class="htp">
                                        <svg xmlns="http://www.w3.org/2000/svg" width="17px" height="17px" viewBox="0 0 24 24">
                                            <path
                                                fill="var(--main-color)"
                                                d="M14.727 6.727H14V0H4.91c-.905 0-1.637.732-1.637 1.636v20.728c0 .904.732 1.636 1.636 1.636h14.182c.904 0 1.636-.732 1.636-1.636V6.727zm-.545 10.455H7.09v-1.364h7.09v1.364zm2.727-3.273H7.091v-1.364h9.818zm0-3.273H7.091V9.273h9.818zM14.727 6h6l-6-6z"
                                            ></path>
                                        </svg>
                                        <span>How to play</span>
                                    </div>
                                </div>
                                <div class="htp">
                                    <svg xmlns="http://www.w3.org/2000/svg" width="17px" height="17px" viewBox="0 0 24 24">
                                        <path fill="none" stroke="var(--main-color)" d="M18.425 18.425L23.5 23.5m-12.5-2C5.201 21.5.5 16.799.5 11S5.201.5 11 .5S21.5 5.201 21.5 11S16.799 21.5 11 21.5Z"></path>
                                    </svg>
                                    <span>Public Chain Query</span>
                                </div>
                            </div>
                            <div class="trx-timer-content">
                                <span class="trx-preiod-id"><font id="periods_data"></font></span>
                                <span class="dt-text"></span>
                                <div data-v-c0d1aac6="" class="trx-counter-container">
                                    <div class="trx-counter-num" id="min_1"></div>
                                    <div class="trx-counter-num" id="min_2"></div>
                                    <div class="trx-counter-num" id="midleDott"></div>
                                    <div class="trx-counter-num" id="sec_1"></div>
                                    <div class="trx-counter-num" id="sec_2"></div>
                                </div>
                            </div>
                        </div>
                       
                        
                        
                        
                        
                        
                        <div class="trx-result-balls">
                            <div class="image-container">
                                <img src="number_background.png" alt="Circular Image">
                                <div id="number1" style="margin-top:6px;" class="number"></div>
                             </div>
                            <!--<img src="number_background.png" alt="6"/>-->
                            <div class="image-container">
                                <img src="number_background.png" alt="Circular Image">
                                <div id="number2" style="margin-top:6px;" class="number"></div>
                             </div>
                             
                             
                            <div class="image-container">
                                <img src="number_background.png" alt="Circular Image">
                                <div id="number3" style="margin-top:6px;" class="number"></div>
                             </div>
                             
                             
                            <div class="image-container">
                                <img src="number_background.png" alt="Circular Image">
                                <div id="number4" style="margin-top:6px;" class="number"></div>
                             </div>
                             
                             
                           <div class="image-container">
                                <img src="number_background.png" alt="Circular Image">
                                <div id="number5" style="margin-top:6px;" class="number"></div>
                             </div>
                        </div>
                    </div>
 
<script>



let countdownInterval; // Variable to store the interval reference

function startCountdown(a,b) {
  let totalSeconds = a;

  // Clear any existing countdown to prevent multiple intervals
  if (countdownInterval) {
    clearInterval(countdownInterval);
  }

  countdownInterval = setInterval(() => {
    if (totalSeconds < 1) {
      clearInterval(countdownInterval); // Clear the interval when the task completes
      startCountdown(b,a); // Restart the countdown
      return;
    }

    // Calculate minutes and seconds
    const minutes = Math.floor(totalSeconds / 60);
    const seconds = totalSeconds % 60;

    // Break down minutes and seconds into individual digits
    const min_1 = Math.floor(minutes / 10);
    const min_2 = minutes % 10;
    const sec_1 = Math.floor(seconds / 10);
    const sec_2 = seconds % 10;

    document.getElementById("min_1").innerHTML = min_1;
    document.getElementById("min_2").innerHTML = min_2;
    document.getElementById("sec_1").innerHTML = sec_1;
    document.getElementById("sec_2").innerHTML = sec_2;
    document.getElementById("midleDott").innerHTML = ":";
    
    if(totalSeconds < 6){
        document.getElementById("ertyuisdfghjk45678").style.display = "block";
        document.getElementById("setCountdwonTimeForBlock").innerHTML = totalSeconds;
        
    }else{
        document.getElementById("ertyuisdfghjk45678").style.display = "none"; 
    }

    totalSeconds--;
  }, 1000); // Update every second
}

// Start the countdown
// startCountdown(12,36);













///////////////////////-----------------Refresh --------------------////////




////////////////////////-----------------Game time activity-------------////
function getTwoActivity(a){
   gameNumber = a;
   refreshPeriodsData(a);
   
   if(a == 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");
   }
   
   
   if(a == 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");
   }
   
   
   if(a == 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");
   }
   
   
    if(a == 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");
   }
   
   
}



refreshPeriodsData(gameNumber);
function refreshPeriodsData(gameNumber){
        const xhttp = new XMLHttpRequest();
        xhttp.onload = function() {
            var demo_show = this.responseText;
            const myArr = JSON.parse(demo_show);
            
            document.getElementById("periods_data").innerHTML = parseInt(myArr.gameData.periods)+1;
            document.getElementById("walletAmount").innerHTML = "₹"+myArr.wallet;
            startCountdown(myArr.endTime,myArr.resetTime);
            
            document.getElementById("number1").innerHTML = myArr.num1;
            document.getElementById("number2").innerHTML = myArr.num2;
            document.getElementById("number3").innerHTML = myArr.num3;
            document.getElementById("number4").innerHTML = myArr.num4;
            document.getElementById("number5").innerHTML = myArr.num5;
            
            
            if(myArr.popup_status == "success")
            {
                if(myArr.accountHistory.lossorprofit < 1){
                    document.getElementById("changeClass").setAttribute("class", "WinningTip__C-body isL");
                    var cmnt = "Loss";
                }else{
                    document.getElementById("changeClass").setAttribute("class", "WinningTip__C-body");
                    var cmnt = "You Win";
                }
                
                
                document.getElementById("gameClosedPopupZone").style.display = "block";
                document.getElementById("ifwin").innerHTML = cmnt;
                document.getElementById("amountWhenWinn").innerHTML = myArr.accountHistory.lossorprofit;
                document.getElementById("showPeriods").innerHTML = "Periods : "+myArr.accountHistory.periods;
                document.getElementById("isnumber").innerHTML = myArr.accountHistory.result_number;
                document.getElementById("isbigsmall").innerHTML = myArr.accountHistory.bigsmall;
            }
            
        }
        xhttp.open("GET", "getliveDataFromServer.php?gamenumber="+gameNumber);
        xhttp.send();
}



function refreshPageEvery5Seconds() {
  setInterval(() => {
    refreshPeriodsData(gameNumber);
  }, 5000); // 5000 milliseconds = 5 seconds
}

// Call the function
refreshPageEvery5Seconds();

        
</script>                    
                   
    
                    <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="getmultiplybyPopup('1')" id="randumMultiple1" class="Betting__C-multiple-r active"><div class="Betting_multiple_item">X1</div> </div>
                            <div data-v-0aa493a0="" onclick="getmultiplybyPopup('5')" id="randumMultiple2" class="Betting__C-multiple-r"><div class="Betting_multiple_item">X5</div> </div>
                            <div data-v-0aa493a0="" onclick="getmultiplybyPopup('10')" id="randumMultiple3" class="Betting__C-multiple-r"><div class="Betting_multiple_item">X10</div> </div>
                            <div data-v-0aa493a0="" onclick="getmultiplybyPopup('20')" id="randumMultiple4" class="Betting__C-multiple-r"><div class="Betting_multiple_item">X20</div> </div>
                            <div data-v-0aa493a0="" onclick="getmultiplybyPopup('50')" id="randumMultiple5" class="Betting__C-multiple-r"><div class="Betting_multiple_item">X50</div> </div>
                            <div data-v-0aa493a0="" onclick="getmultiplybyPopup('100')" id="randumMultiple6" 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 gotopicData(a){
        document.getElementById("setnumber").innerHTML = a;
        betSelectedNumber = a;
        document.getElementById("outareazone").style.display = "block";
        document.getElementById("orderpopup").style.display = "block";
    }
    
    
    function delay(ms) {
      return new Promise(resolve => setTimeout(resolve, ms));
    }
    
    async function getToClickRandumButton() {
      for (let i = 0; i < 10; i++) {
        document.getElementById("activation_"+i).setAttribute("class", "Betting__C-numC-item"+i+" active");
        await delay(200);
        document.getElementById("activation_"+i).setAttribute("class", "Betting__C-numC-item"+i);
      }
      const randomNumber = Math.floor(Math.random() * 10);
      betSelectedNumber = randomNumber;
      document.getElementById("activation_"+randomNumber).setAttribute("class", "Betting__C-numC-item"+randomNumber+" active");
      document.getElementById("setnumber").innerHTML = randomNumber;
      document.getElementById("outareazone").style.display = "block";
      document.getElementById("orderpopup").style.display = "block";
      
      
    }


    
    



</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>

<script>
    function selecteAmount(a){
        amount = a;
        betBalance = multipleNumber*amount;
        document.getElementById("van-field-9-input").value = betBalance;
        updateBetDetailsonpopup();
        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");
        }
        
        
        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");
        }
        
         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");
        }
        
         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");
        }
    }
</script>

                                    <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()" value="1" 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>
<script>
    function getactivititoAddormin(a){
        if(a == 0){
            if(parseInt(document.getElementById("van-field-9-input").value) <= 1){
                document.getElementById("van-field-9-input").value = 1;
            }else{
                document.getElementById("van-field-9-input").value = parseInt(document.getElementById("van-field-9-input").value)-1;
            }
        }else{
            document.getElementById("van-field-9-input").value = parseInt(document.getElementById("van-field-9-input").value)+1;
        }
        
        betBalance = parseInt(document.getElementById("van-field-9-input").value);
        updateBetDetailsonpopup();
    }
    
    
    
    function cancelPopup(){
        document.getElementById("outareazone").style.display = "none";
        document.getElementById("orderpopup").style.display = "none";
    }
</script>                                   
                                    
                                    
                                    
                                    
                                    <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('5')" class="Betting__Popup-body-line-item"> X5</div>
                                            <div data-v-15f0cefa="" id="popupmultipleColor3"  onclick="getmultiplybyPopup('10')" class="Betting__Popup-body-line-item"> X10</div>
                                            <div data-v-15f0cefa="" id="popupmultipleColor4"  onclick="getmultiplybyPopup('20')" class="Betting__Popup-body-line-item"> X20</div>
                                            <div data-v-15f0cefa="" id="popupmultipleColor5"  onclick="getmultiplybyPopup('50')" class="Betting__Popup-body-line-item"> X50</div>
                                            <div data-v-15f0cefa="" id="popupmultipleColor6"  onclick="getmultiplybyPopup('100')" 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">Total Amount ₹1.00</div>
                                </div>
    
                            </div>
                        </div>
                    </div>
                    
<script>

    function placeAnOrder()
    {
        const xhttp = new XMLHttpRequest();
        xhttp.onload = function() {
            var demo_show = this.responseText;
            const myArr = JSON.parse(demo_show);
            if(myArr.status == "success"){
                alert(myArr.remark);
                document.getElementById("outareazone").style.display = "none";
                document.getElementById("orderpopup").style.display = "none";
            }else{
                alert(myArr.remark);
            }
        }
        xhttp.open("GET", "placeorderTRX.php?gamenumber="+gameNumber+"&betAmount="+betBalance+"&betSelectedNumber="+betSelectedNumber);
        xhttp.send();
    }






    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("randumMultiple1").setAttribute("class", "Betting__C-multiple-r active");
           document.getElementById("randumMultiple2").setAttribute("class", "Betting__C-multiple-r");
           document.getElementById("randumMultiple3").setAttribute("class", "Betting__C-multiple-r");
           document.getElementById("randumMultiple4").setAttribute("class", "Betting__C-multiple-r");
           document.getElementById("randumMultiple5").setAttribute("class", "Betting__C-multiple-r");
           document.getElementById("randumMultiple6").setAttribute("class", "Betting__C-multiple-r");
        }
        
        
         if(a == 5){
           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("randumMultiple1").setAttribute("class", "Betting__C-multiple-r");
           document.getElementById("randumMultiple2").setAttribute("class", "Betting__C-multiple-r active");
           document.getElementById("randumMultiple3").setAttribute("class", "Betting__C-multiple-r");
           document.getElementById("randumMultiple4").setAttribute("class", "Betting__C-multiple-r");
           document.getElementById("randumMultiple5").setAttribute("class", "Betting__C-multiple-r");
           document.getElementById("randumMultiple6").setAttribute("class", "Betting__C-multiple-r");
        }
        
         if(a == 10){
           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("randumMultiple1").setAttribute("class", "Betting__C-multiple-r");
           document.getElementById("randumMultiple2").setAttribute("class", "Betting__C-multiple-r");
           document.getElementById("randumMultiple3").setAttribute("class", "Betting__C-multiple-r active");
           document.getElementById("randumMultiple4").setAttribute("class", "Betting__C-multiple-r");
           document.getElementById("randumMultiple5").setAttribute("class", "Betting__C-multiple-r");
           document.getElementById("randumMultiple6").setAttribute("class", "Betting__C-multiple-r");
        }
        
        
        if(a == 20){
           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("randumMultiple1").setAttribute("class", "Betting__C-multiple-r");
           document.getElementById("randumMultiple2").setAttribute("class", "Betting__C-multiple-r");
           document.getElementById("randumMultiple3").setAttribute("class", "Betting__C-multiple-r");
           document.getElementById("randumMultiple4").setAttribute("class", "Betting__C-multiple-r active");
           document.getElementById("randumMultiple5").setAttribute("class", "Betting__C-multiple-r");
           document.getElementById("randumMultiple6").setAttribute("class", "Betting__C-multiple-r");
        }
        
        
        if(a == 50){
           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("randumMultiple1").setAttribute("class", "Betting__C-multiple-r");
           document.getElementById("randumMultiple2").setAttribute("class", "Betting__C-multiple-r");
           document.getElementById("randumMultiple3").setAttribute("class", "Betting__C-multiple-r");
           document.getElementById("randumMultiple4").setAttribute("class", "Betting__C-multiple-r");
           document.getElementById("randumMultiple5").setAttribute("class", "Betting__C-multiple-r active");
           document.getElementById("randumMultiple6").setAttribute("class", "Betting__C-multiple-r");
        }
        
        if(a == 100){
           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("randumMultiple1").setAttribute("class", "Betting__C-multiple-r");
           document.getElementById("randumMultiple2").setAttribute("class", "Betting__C-multiple-r");
           document.getElementById("randumMultiple3").setAttribute("class", "Betting__C-multiple-r");
           document.getElementById("randumMultiple4").setAttribute("class", "Betting__C-multiple-r");
           document.getElementById("randumMultiple5").setAttribute("class", "Betting__C-multiple-r");
           document.getElementById("randumMultiple6").setAttribute("class", "Betting__C-multiple-r active");
        }
        
        multipleNumber = a;
        betBalance = a*amount;
        document.getElementById("van-field-9-input").value = betBalance;
        updateBetDetailsonpopup();
    }
    
    
    
    
    ///////////////////////-----------------Setamount on bet and innerHTML-----------------///////
    function updateBetDetailsonpopup(){
        document.getElementById("secalculateAmount").innerHTML = "Total Amount ₹"+betBalance.toFixed(2);
    }
</script>    

                    <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="trx-game-history-header">
                                <span>Period</span>
                                <span>Block height</span>
                                <span>Block time</span>
                                <span>Hash value</span>
                                <span>Result</span>
                            </div>
                            
                            <div class="GameRecord__C-body">
                                <div id="game-records">
                                    
                                    
                                    <div id="content-container4"></div>

                                    <script>
                                        // Function to load the content
                                        function loadContent4() {
                                            $('#content-container4').load('getLiveGameHistory.php?game='+gameNumber);
                                            
                                        }
                                
                                        // Initial load
                                        loadContent4();
                                
                                        // Refresh every 10 seconds
                                        setInterval(loadContent4, 1000); // 10000 milliseconds = 10 seconds
                                    </script>
                                    
                                    
                                    
                                    <!--<div class="van-row">-->
                                    <!--    <div class="van-col van-col--8">202411280057</div>-->
                                    <!--    <div class="van-col van-col--5 numcenter">-->
                                    <!--        <div class="GameRecord__C-body-num defaultColor clr4">9</div>-->
                                    <!--    </div>-->
                                    <!--    <div class="van-col van-col--5"><span>Big</span></div>-->
                                    <!--    <div class="van-col van-col--6">-->
                                    <!--        <div class="GameRecord__C-origin">-->
                                                
                                                
                                                
                                    <!--            <div style="border-radius: 50%; width:11px; height:11px; background:#3ECB05;"></div>-->
                                                
                                    <!--        </div>-->
                                    <!--    </div>-->
                                    <!--</div>-->
                                    
                                    
                                    
                                </div>
                            </div>

                            
                            <div id="gameData">
                            </div>
                            
                      </div>
                      
                      <div id="game_chart" class="GameRecord__C">
                          <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="trx_chart">
                                
                                
                                <div id="content-container" class="Trend__C-body2"></div>

                                <script>
                                    // Function to load the content
                                    function loadContent() {
                                        $('#content-container').load('getTRX_myhistory_live.php?game='+gameNumber);
                                        
                                    }
                            
                                    // Initial load
                                    loadContent();
                            
                                    // Refresh every 10 seconds
                                    setInterval(loadContent, 1000); // 10000 milliseconds = 10 seconds
                                </script>
                                
                                
                                
                            
                                
                                
                               
                                
                                
                                
                            </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">
                                    
                                   
                                    
                                    
                                      
                                <div id="content-container2" style="width:100%;"></div>

                                <script>
                                    // Function to load the content
                                    function loadContent2() {
                                        $('#content-container2').load('myhistory_live_game.php?game='+gameNumber);
                                        
                                    }
                            
                                    // Initial load
                                    loadContent2();
                            
                                    // Refresh every 10 seconds
                                    setInterval(loadContent2, 1000); // 10000 milliseconds = 10 seconds
                                </script>
                                
                                 

                                  
                                  
                                </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" style="display:none;" 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">red</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>
            
 <script>
  function congpopupZoneForCloseFunction()
  {
     document.getElementById("gameClosedPopupZone").style.display = "none";
  }
 </script>
            
            
            
            
            

            <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>
    </div>

 

<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>

</body>

</html>

