<?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);
$twithdraw = $getuserdetails['twithdraw'];
$tdeposit = $getuserdetails['tdeposit'];



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

?>


<!DOCTYPE html>
<html lang="en" translate="no">
<head>
    <meta charset="UTF-8">
    <link rel="icon" type="image/svg+xml" href="temp_img/<?= $fevicon; ?>">
    <meta name="google" content="notranslate">
    <meta name="robots" content="noindex,nofollow">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title><?= $getAdminDetails['title']; ?></title>
    <link rel="stylesheet" href="css/slick.css" />
    <link rel="stylesheet" href="css/modules.css" />
    <link rel="stylesheet" href="css/style.css" />
    <script src="js/jquery.min.js" type="text/javascript"></script>
    <script src="js/slick.min.js" type="text/javascript"></script>
    <script src="js/main.js" type="text/javascript"></script>
</head>
<body>
    <div id="app">
        <div class="wallet-container">
            <div class="navbar">
                <div class="navbar-fixed" style="background: linear-gradient(90deg, rgb(206, 2, 4) 0%, rgb(242, 64, 58) 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="navbar__content-title">Wallet</div>
                        </div>
                        <div data-v-905dfe8c="" class="navbar__content-right"></div>
                    </div>
                </div>
            </div>
            <div class="wallet-container-header">
                <div class="wallet-container-header-belly">
                    <img data-v-fe2fea6f="" src="./images/wallets-55b46543.png" alt="wallet">
                    <div data-v-fe2fea6f="">₹<?= round($getuserdetails['wallet'],2); ?></div>
                    <span data-v-fe2fea6f="">Total balance</span>
                </div>
            </div>
            <div class="wallet-container-content">
                <div class="container">
                    <!--div class="progressBars">
                        <div class="progressBarsL">
                            <div class="van-circle">
                                <svg viewBox="0 0 1100 1100"><defs><linearGradient id="van-circle-2" x1="100%" y1="0%" x2="0%" y2="0%"><stop offset="0%" stop-color="#FA5A5A"></stop><stop offset="100%" stop-color="#FF998D"></stop></linearGradient></defs><path class="van-circle__layer" d="M 550 550 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000" style="fill: none; stroke: rgb(216, 216, 216); stroke-width: 100px;"></path><path d="M 550 550 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000" class="van-circle__hover" stroke="url(#van-circle-2)" style="stroke: url(&quot;#van-circle-2&quot;); stroke-width: 101px; stroke-linecap: butt; stroke-dasharray: 0px, 3140px;"></path></svg>
                                <div class="van-circle__text">0%</div>
                            </div>
                            <h3 data-v-fe2fea6f="">₹0.00</h3>
                            <span data-v-fe2fea6f="">Main wallet</span>
                        </div>
                        <div class="progressBarsL">
                            <div class="van-circle">
                            <svg viewBox="0 0 1100 1100"><defs><linearGradient id="van-circle-1" x1="100%" y1="0%" x2="0%" y2="0%"><stop offset="0%" stop-color="#FA5A5A"></stop><stop offset="100%" stop-color="#FF998D"></stop></linearGradient></defs><path class="van-circle__layer" d="M 550 550 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000" style="fill: none; stroke: rgb(216, 216, 216); stroke-width: 100px;"></path><path d="M 550 550 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000" class="van-circle__hover" stroke="url(#van-circle-1)" style="stroke: url(&quot;#van-circle-1&quot;); stroke-width: 101px; stroke-linecap: butt; stroke-dasharray: 3140px, 3140px;"></path></svg>
                            <div class="van-circle__text">100%</div>
                            </div>
                            <h3 data-v-fe2fea6f="">₹0.00</h3>
                            <span data-v-fe2fea6f="">3rd party wallet</span>
                        </div>
                    </div-->
                    
                        <div class="balance m-t-10">
                            <div data-v-7b283485="" class="info c-row">
                                <div data-v-7b283485="" class="item">
                                    <div data-v-7b283485="">Total Recharge</div>
                                    <!---->
                                    <div data-v-7b283485=""><?= $tdeposit; ?> ₹</div>
                                </div>
                                <div data-v-7b283485="" class="item">
                                    <div data-v-7b283485="">Total Withdraw</div>
                                    <!---->
                                    <div data-v-7b283485=""><?= $twithdraw; ?> ₹</div>
                                </div>
                            </div>
                        </div>
                        
                 


                    <div class="userDetail">
                        <div class="userDetail-item"  onclick="getpageChange('1')">
                            <div class="imgD">
                                <img data-v-fe2fea6f="" src="./images/deposit.png" alt="Deposit">
                            </div>
                            <span data-v-fe2fea6f="">Deposit</span>
                        </div>
                        <div class="userDetail-item"  onclick="getpageChange('2')">
                            <div class="imgD">
                                <img data-v-fe2fea6f="" src="./images/widthdrawBlue-dac03272.png" alt="Deposit">
                            </div>
                            <span data-v-fe2fea6f="">Withdraw</span>
                        </div>
                        <div class="userDetail-item"   onclick="getpageChange('3')">
                            <div class="imgD">
                                <img data-v-fe2fea6f="" src="./images/Deposit-history.png" alt="Deposit">
                            </div>
                            <span data-v-fe2fea6f="">Deposit history</span>
                        </div>
                        <div class="userDetail-item"   onclick="getpageChange('4')">
                            <div class="imgD">
                                <img data-v-fe2fea6f="" src="./images/Withdrawal-history.png" alt="Deposit">
                            </div>
                            <span data-v-fe2fea6f="">Withdrawal history</span>
                        </div>
                    </div>
                </div>
                <div class="gameList">
                   
                </div>
            </div>
        </div>
       
      <?php include "footer.php"; ?>


    </div>
</body>

</html>

<script>
    function getpageChange(a)
    {
       if(a == 1)
       {
           window.open('deposit.php','_self');
       }

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


       if(a == 3)
       {
           window.open('RechargeHistory.php','_self');
       }

       if(a == 4)
       {
           window.open('WithdrawHistory.php','_self');
       }
    }
</script>
<script>
  function clicktoBack()
  {
    window.open('index.php','_self');
  }
</script>