
<!----
<?php
if (!isset($_COOKIE["user"])) {
    header("Location: ../login.html");
    exit();
}

if (isset($_GET["action"])) {
    if ($_GET["action"] == "logout") {
        setcookie("user", "logout", time() - (24 * 60 * 60 * 24), "/");
        header("Location: ../login.html");
        exit();
    }
}

$user = $_COOKIE["user"];
$j_data = json_decode(file_get_contents("../u.j"), false);
$admin_text = "";
if (isset($j_data->users->$user)) {

    //if ($j_data->users->$user->idverified != 2) {
      //  header("Location: verify.php");
    //}

    if ($j_data->users->$user->admin) {
        $admin_text = '<li>
                            <a href="admin.php" class="waves-effect">
                                <i class="fas fa-user-lock-cog"></i><span> ADMIN Dashboard </span>
                            </a>
                        </li>';
    }
    $email = $j_data->users->$user->email;
    $interest_rate = $j_data->users->$user->interest_rate;
    $stock = $j_data->users->$user->stock;
    $account_balance = $j_data->users->$user->account_balance;
     $ref = $j_data->users->$user->refs_earnings;
    $investment_profits = $j_data->users->$user->investment_profits;
    $investment_date = $j_data->users->$user->birthday;
    $currency = $j_data->users->currency;

    if (!isset($j_data->users->$user->refs_earnings)) {
        $j_data->users->$user->refs_earnings = 0;
    }
    $refs_earnings = $j_data->users->$user->refs_earnings;
} else {
    setcookie("user", "logout", time() - (24 * 60 * 60 * 24), "/");
    header("Location: ../login.html");
    exit();
}


?>    --->

<!DOCTYPE html>
<html lang="en">


<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
    <title> User Dashboard</title>

    <link rel="shortcut icon" href="ass/images/favicon.png">


    <link href="ass/css/bootstrap.min.css" rel="stylesheet" type="text/css">
    <link href="ass/css/metismenu.min.css" rel="stylesheet" type="text/css">
    <link href="ass/css/icons.css" rel="stylesheet" type="text/css">
    <link href="ass/css/style.css" rel="stylesheet" type="text/css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">

</head>

<body>

    

    <!-- Begin page -->
    <div id="wrapper">

        <!-- Top Bar Start -->
        <div class="topbar">

            <!-- LOGO -->
            <div class="topbar-left">
                <a href="index.php" class="logo">
                  <img class="block lg:hidden" src="https://www.oanda.com/assets/images/oanda-logo.370e04d3507d.svg" alt="OANDA Logo" height="35" width="125">
                   
                </a>
            </div>

            <nav class="navbar-custom">


                <ul class="list-inline menu-right mb-0">
                    <li class="float-right">
                        <button class="button-menu-mobile open-right waves-effect">
                            <i class="mdi mdi-menu"></i>
                        </button>
                    </li>

                </ul>

            </nav>

        </div>
        <!-- Top Bar End -->

        <!-- ========== Left Sidebar Start ========== -->
        <div class="left side-menu">
            <div class="slimscroll-menu" id="remove-scroll">

                <!--- Sidemenu -->
                <div id="sidebar-menu">
                    <!-- Left Menu Start -->
                    <ul class="metismenu" id="side-menu">
                        <li class="menu-title">Menu</li>
                        <?php echo $admin_text; ?>
                        <li>
                            <a href="index.php" class="waves-effect">
                                <i class="icon-accelerator"></i><span> Dashboard </span>
                            </a>
                        </li>

                        <li>
                            <a href="account.php" class="waves-effect"><i class="fas fa-book"></i><span> Account Overview</span></a>

                        </li>

                        <li>
                            <a href="profile.php" class="waves-effect"><i class="fas fa-user-lock"></i><span> Profile</span></a>

                        </li>

                        <li>
                            <a href="deposit.php" class="waves-effect"><i class="fab  fa-dropbox"></i><span> Deposit</span></a>

                        </li>

                   

                        <li>
                            <a href="withdraw.php" class="waves-effect"><i class="fas fa-donate"></i><span> Withdraw</span></a>

                        </li>

                        <li>
                            <a href="support.php" class="waves-effect"><i class="fas fa-mail-bulk"></i><span> Customer Support</span></a>

                        </li>

                        <li>
                            <a href="index.php?action=logout" class="waves-effect"><i class="fas fa-sign-out-alt"></i><span> Logout</span></a>

                        </li>



                    </ul>

                </div>
                <!-- Sidebar -->
                <div class="clearfix"></div>

            </div>
            <!-- Sidebar -left -->

        </div>
        <!-- Left Sidebar End -->

        <!-- ============================================================== -->
        <!-- Start right Content here -->
        <!-- ============================================================== -->
        <div class="content-page">
            <!-- Start content -->
            <div class="col-sm-12">
                <h2 class="page-title">

                    <br>
                    <br>
                    Dashboard</h2>
            </div>

   <!-- TradingView Widget BEGIN -->
   <div class="tradingview-widget-container">
                <div class="tradingview-widget-container__widget"></div>
                <div class="tradingview-widget-copyright"><a href="https://www.tradingview.com" rel="noopener" target="_blank"><span class="blue-text">Ticker Tape</span></a> by TradingView</div>
                <script type="text/javascript" src="https://s3.tradingview.com/external-embedding/embed-widget-ticker-tape.js" async>
                    {
                        "symbols": [{
                                "title": "S&P 500",
                                "proName": "OANDA:SPX500USD"
                            },
                            {
                                "title": "Nasdaq 100",
                                "proName": "OANDA:NAS100USD"
                            },
                            {
                                "title": "EUR/USD",
                                "proName": "FX_IDC:EURUSD"
                            },
                            {
                                "title": "BTC/USD",
                                "proName": "BITSTAMP:BTCUSD"
                            },
                            {
                                "title": "ETH/USD",
                                "proName": "BITSTAMP:ETHUSD"
                            }
                        ],
                        "colorTheme": "dark",
                        "isTransparent": false,
                        "displayMode": "adaptive",
                        "locale": "en"
                    }
                </script>
            </div>
            <!-- TradingView Widget END -->
            <hr style="border-color:white">


            <!-- Start content -->

            <div class="content">

                <div class="container-fluid">


                    <?php

                    if (strlen($j_data->users->$user->notification) > 0) {
                        echo '<div class="card p-3">' . $j_data->users->$user->notification . '</div>';
                    }

                    ?>

                    <div class="row">


                        <div class=" col-sm-6 col-xl-3-6">
                            <div class="card">
                                <div class="card-heading p-4">
                                    <div class="mini-stat-icon float-right">
                                         <i class="fas fa-dollar-sign" style="color:#50c878;"></i>
                                    </div>
                                    <div>
                                        <h5 class="font-16" style="color: #50c878;">INVESTED</h5>
                                    </div>
                                    <h3 class="mt-4" style="color: #50c878;"><? echo $currency ?> <?php echo $account_balance; ?></h3>
                                    


                                </div>
                            </div>
                        </div>

                        <div class=" col-sm-6 col-xl-3-6">
                            <div class="card">
                                <div class="card-heading p-4">
                                    <div class="mini-stat-icon float-right">
                                      <i class='far fa-money-bill-alt' style="color:#E1C16E;"></i>
   
                                                                     </div>
                                    <div>
                                        <h5 class="font-16" style="color:#E1C16E;">PROFIT</h5>
                                    </div>
                                    <h3 class="mt-4" style="color:#E1C16E;"><? echo $currency ?> <?php 
                                      $investment_profits;
                              echo number_format(  $investment_profits,00)   ?>
                          </h3>

                                </div>
                            </div>
                        </div>


                        <div class=" col-sm-6 col-xl-3-6">
                            <div class="card">
                                <div class="card-heading p-4">
                                    <div class="mini-stat-icon float-right">
                                      <i class="fas fa-line-chart " style="color: #FF3131;"></i>
                                    </div>
                                    <div>
                                        <h5 class="font-16" style="color: #FF3131;">Balance</h5>
                                    </div>
                                    <h3 class="mt-4" style="color:#FF3131;">
                                    <? echo $currency ?>
                                    <?php
 
          $profit= $investment_profits + $account_balance + $ref;
          echo number_format(  $profit,00);
          ?></h3>

                                </div>
                            </div>
                        </div>


                        <div class="col-sm-3 col-xl-3-3">
                            <div class="card">
                                <div class="card-heading p-4">
                                    <div class="mini-stat-icon float-right">
                                    </div>
                                    <div>
                                        <h5 class="font-16" style="color:#fffdd0;">Trading</h5>
                                    </div>
                                    <h3 class="mt-4" style="color:#fffdd0;"> <?php
                                                      echo  $stock 

                                               ?></h3>

                                </div>
                            </div>
                        </div>



                        <div class="col-sm-6 col-xl-3-6">
                          <div class="card">
                              <div class="card-heading p-4">
                                  <div class="mini-stat-icon float-right">
                                      <i class="fa fa-calendar bg-danger  text-white"></i>
                                  </div>
                                  <div>
                                      <h5 class="font-16">Withdrawal Date</h5>
                                  </div>
                                  <h3 class="mt-4"><?php echo $investment_date; ?></h3>


                              </div>
                          </div>
                      </div>



</div>

                        

                    </div>
                </div>
            </div>

            
            <hr style="border-color:white">

<div class="content-page">

            <div class="content" style= "style= display: flex;
  align-items: center; justify-content: center;" >

                <div class="container-fluid">

                <!--- container fluid start --->
                
                <div class="cryptofeed">
                    
                    <!-- TradingView Widget BEGIN -->
<div class="tradingview-widget-container">
    <div class="tradingview-widget-container__widget"></div>
    <div class="tradingview-widget-copyright"><a href="https://www.tradingview.com/symbols/BTCUSDT/?exchange=BINANCE" rel="noopener" target="_blank"><span class="blue-text">BTCUSDT Rates</span></a> by TradingView</div>
    <script type="text/javascript" src="https://s3.tradingview.com/external-embedding/embed-widget-mini-symbol-overview.js" async>
    {
    "symbol": "BINANCE:BTCUSDT",
    "width": 350,
    "height": 220,
    "locale": "en",
    "dateRange": "12M",
    "colorTheme": "light",
    "trendLineColor": "rgba(41, 98, 255, 1)",
    "underLineColor": "rgba(41, 98, 255, 0.3)",
    "underLineBottomColor": "rgba(41, 98, 255, 0)",
    "isTransparent": false,
    "autosize": false,
    "largeChartUrl": ""
  }
    </script>
  </div>
  <!-- TradingView Widget END -->

                        </div>
                        
                        
                        
                                               <!-- TradingView Widget BEGIN -->
<div class="tradingview-widget-container">
  <div class="tradingview-widget-container__widget"></div>
  <div class="tradingview-widget-copyright"><a href="https://www.tradingview.com/symbols/ETHUSD/?exchange=COINBASE" rel="noopener" target="_blank"><span class="blue-text">ETHUSD Rates</span></a> by TradingView</div>
  <script type="text/javascript" src="https://s3.tradingview.com/external-embedding/embed-widget-mini-symbol-overview.js" async>
  {
  "symbol": "COINBASE:ETHUSD",
  "width": 350,
  "height": 220,
  "locale": "en",
  "dateRange": "12M",
  "colorTheme": "light",
  "trendLineColor": "rgba(41, 98, 255, 1)",
  "underLineColor": "rgba(41, 98, 255, 0.3)",
  "underLineBottomColor": "rgba(41, 98, 255, 0)",
  "isTransparent": false,
  "autosize": false,
  "largeChartUrl": ""
}
  </script>
</div>
<!-- TradingView Widget END -->
                        </div>   
                        

</div>
   <!---cpfeed--->
                                
                </div>
                
                
                            
                       <div class="livechart">
                           <!-- TradingView Widget BEGIN -->
<div class="tradingview-widget-container">
<div id="tradingview_8f093"></div>
<div class="tradingview-widget-copyright"><a href="https://www.tradingview.com/symbols/BINANCE:BTCUSDT/" rel="noopener" target="_blank"><span class="blue-text">BTCUSDT Chart</span></a> by TradingView</div>
<script type="text/javascript" src="https://s3.tradingview.com/tv.js"></script>
<script type="text/javascript">
  new TradingView.widget({
      "width": "100%",
      "height": 610,
      "symbol": "BINANCE:BTCUSDT",
      "interval": "D",
      "timezone": "Etc/UTC",
      "theme": "Light",
      "style": "1",
      "locale": "en",
      "toolbar_bg": "#f1f3f6",
      "enable_publishing": false,
      "allow_symbol_change": true,
      "container_id": "tradingview_8f093"
  });
</script>
</div>
<!-- TradingView Widget END -->
      <!-- TradingView Widget END -->
  </div>
  </div>

                       </div>

                <!-- container-fluid -->

            </div>
            </div>
           
<!-- Wrapper Ends -->
<div class="mgm" style="display: block;">
<div class="txt" style="color:black;">Someone from <b></b> just earned <a href="javascript:void(0);" onclick="javascript:void(0);"></a></div>
</div>

<style>
.mgm {
border-radius: 10px;
position: fixed;
z-index: 90;
bottom: 80px;
right: 50px;
background: #42af98;
padding: 40px;
box-shadow: 0px 5px 13px 0px rgba(0,0,0,.3);
}
.mgm a {
font-weight: 700;
display: block;
color:#f2d516;
}
.mgm a, .mgm a:active {
transition: all .2s ease;
color:#f2d516;
}
</style>

<script data-cfasync="false" src="cdn-cgi/scripts/5c5dd728/cloudflare-static/email-decode.min.html"></script><script type="text/javascript">
var listCountries = ['Argentina', 'USA', 'Germany', 'France', 'Italy', 'South Korea', 'Australia', 'Norway', 'Canada', 'Argentina', 'Saudi Arabia', 'Mexico', 'Spain', 'Austria', 'Venezuela', 'South Africa', 'Sweden', 'South Korea', 'China', 'Italy', 'Germany', 'United Kingdom', 'Bahrain', 'Greece', 'Cuba', 'Bulgaria', 'Portugal', 'Austria', 'Cyprus', 'Panama', 'Asia', 'Norway', 'Netherlands', 'Switzerland', 'Belgium', 'Israel', 'Cyprus','Spain','Norway'];
var listPlans = ['$1032.34','$3223.29','$545600.34','$15600','$10700.34','$108600.37','$24500.12','$1500.72','$30340.90','$40300.91','$1200.23','$60220.78','$3400.11', '$71030.02', '$25400.34', '$25450.98', '$35300.83', '$50340.23','$7230.48','$42400.12','$35002.32','$5000.09','$12500.00','$9500.23'];
interval = Math.floor(Math.random() * (10400 - 80 + 1) + 800);
var run = setInterval(request, interval);

function request() {
clearInterval(run);
interval = Math.floor(Math.random() * (10400 - 80 + 1) + 800);
var country = listCountries[Math.floor(Math.random() * listCountries.length)];
var plan = listPlans[Math.floor(Math.random() * listPlans.length)];
var msg = 'Someone from <b>' + country + '</b> just earned  <a href="javascript:void(0);" onclick="javascript:void(0);">' + plan + ' </a>';
$(".mgm .txt").html(msg);
$(".mgm").stop(true).fadeIn(300);
window.setTimeout(function() {
    $(".mgm").stop(true).fadeOut(300);
}, 2000);
run = setInterval(request, interval);
}
</script>
<script type="text/javascript">
    (function () {
        var options = {
        
    })();
</script>
            <!-- content -->

            <footer class="footer">
                © 2020 All Rights Reserved
            </footer>

        </div>
        <!-- ============================================================== -->
        <!-- End Right content here -->
        <!-- ============================================================== -->

    </div>
    <!-- END wrapper -->

    <!-- jQuery  -->
    <script src="ass/js/jquery.min.js"></script>
    <script src="ass/js/bootstrap.bundle.min.js"></script>
    <script src="ass/js/metismenu.min.js"></script>
    <script src="ass/js/jquery.slimscroll.js"></script>
    <script src="ass/js/waves.min.js"></script>

    <script src="ass/pages/dashboard.init.js"></script>
     
<!-- GetButton.io widget -->

<!-- /GetButton.io widget -->


    <!-- App js -->
    <script src="ass/js/app.js"></script>
    




</body>

</html>
