<?php
session_start();

require_once "../SystemController/DbConnection.php";
if(!isset($_SESSION['id'])){
    header("Location: ../login.php");
}

$id = $_SESSION['id'];

$db_handle = new Dbconnection();

$user = $db_handle->runBaseQuery("SELECT * FROM members WHERE id = $id ");
$firstname = $user[0]['firstname'];
$lastname = $user[0]['surname'];
$fullname = $firstname." ".$lastname;
$currency = $user[0]['currency'];

$ref_bonus = $user[0]['ref_bonus'];


$username = $user[0]['username'];
$photo = ($user[0]['pics'] == "") ? "assets/img/avater.png" : "profile_pics/".$user[0]['pics'];



$balance = $db_handle->runBaseQuery("SELECT * FROM account_balance WHERE userID = $id ");
$balance = ($balance)? number_format($balance[0]['balance']) : "0.00";

$pending_withdrawal = $db_handle->runBaseQuery("SELECT * FROM withdrawals WHERE userID = $id and verified = 0");
$pending_withdrawal = ($pending_withdrawal) ? $pending_withdrawal[0]['amount'] : 0 ;

$pending_withdrawals = $db_handle->runBaseQuery("SELECT count(id) as totalpending FROM withdrawals WHERE userID = $id and verified = 0 ");

$pending_withdrawals = ($pending_withdrawals)? $pending_withdrawals[0]['totalpending'] : 0;

$pending_deposit = $db_handle->runBaseQuery("SELECT * FROM deposits WHERE userID = $id and verified = 0");
$pending_deposit = ($pending_deposit) ? $pending_deposit[0]['amount'] : 0 ;

$pending_deposits = $db_handle->runBaseQuery("SELECT count(id) as totalpending FROM deposits WHERE userID = $id and verified = 0");
$pending_deposits = ($pending_deposits) ? $pending_deposits[0]['totalpending'] : 0 ;

$active_investment =  $db_handle->runBaseQuery("SELECT * FROM investments WHERE userID = $id and trading = 0");
$active_investment =  ($active_investment) ? $active_investment[0]['amount'] : 0 ;

$completed_deposits = $db_handle->runBaseQuery("SELECT count(id) as total FROM deposits WHERE userID = $id and verified = 1 ");
$completed_deposits = ($completed_deposits)? $completed_deposits[0]['total'] : 0;

$completed_withdrawals = $db_handle->runBaseQuery("SELECT count(id) as total FROM withdrawals WHERE userID = $id and verified = 1 ");
$completed_withdrawals = ($completed_withdrawals)? $completed_withdrawals[0]['total'] : 0;

$total_withdrawal = $db_handle->runBaseQuery("SELECT sum(amount) as totalwithdrawal FROM withdrawals WHERE userID = $id and verified = 1");
$total_withdrawal = ($total_withdrawal)? $total_withdrawal[0]['totalwithdrawal'] : 0;

$total_investments = $db_handle->runBaseQuery("SELECT sum(amount) as total FROM investments WHERE userID = $id");
$total_investments = ($total_investments)? $total_investments[0]['total'] : 0;

$earnings = number_format($user[0]['profit'],2);




$totalref = $db_handle->runBaseQuery("SELECT count(id) as totalref FROM members WHERE referrer = '$username' ");
$totalref = ($totalref[0]['totalref'] > 0)? $totalref[0]['totalref'] : 0;

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

<!-- Mirrored from laravel.spruko.com/xino/ltr/ by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 14 Aug 2021 01:53:20 GMT -->
<!-- Added by HTTrack -->
<meta http-equiv="content-type" content="text/html;charset=UTF-8" /><!-- /Added by HTTrack -->

<head>


   <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">

<script src="//code.jivosite.com/widget/pfNW6yUA29" async></script>

   <meta charset="UTF-8">
   <meta name='viewport' content='width=device-width, initial-scale=1.0, user-scalable=0'>
   <meta http-equiv="X-UA-Compatible" content="IE=edge">
   <meta name="Description" content="ValueAssets Investment - Dashboard">
   <meta name="Author" content="ValueAssets - Investment Private Limited">
   <meta name="Keywords" content="cryptocurrency, dashboard, crypto, ico, bootstrap dashboard, crypto dashboard, cryptocurrency dashboard, ico dashboard, crypto dashboard cryptocurrency, cryptocurrency trading dashboard, crypto dashboard" />

   <!-- Title -->
   <title> SpaceX Tesla Investments Trades Investment - Dashboard</title>

   <!-- Favicon -->
   <link href="assets/img/favicon.png" rel="icon" type="image/x-icon">"

   <!-- Icons css -->
   <link href="assets/plugins/icons/icons.css" rel="stylesheet">

   <!--  Right-sidemenu css -->
   <link href="assets/plugins/sidebar/sidebar.css" rel="stylesheet">

   <!--- Animations css-->
   <link href="assets/css/animate.css" rel="stylesheet">

   <!--  Custom Scroll bar-->
   <link href="assets/plugins/custom-scroll/jquery.mCustomScrollbar.css" rel="stylesheet" />

   <!--  Left-Sidebar css -->
   <link href="assets/css/sidemenu.css" rel="stylesheet">


   <!-- Internal Chart-Morris css-->
   <link href="assets/plugins/morris.js/morris.css" rel="stylesheet">

   <!-- Internal Nice-select css  -->
   <link href="assets/plugins/jquery-nice-select/css/nice-select.css" rel="stylesheet" />

   <!-- Internal News-Ticker css-->
   <link href="assets/plugins/flag-icon-css/css/flag-icon.min.css" rel="stylesheet">

   <!-- Jquery-countdown css-->
   <link href="assets/plugins/jquery-countdown/countdown.css" rel="stylesheet">

   <!-- Internal News-Ticker css-->
   <link href="assets/plugins/newsticker/jquery.jConveyorTicker.css" rel="stylesheet" />


   <!-- style css-->
   <link href="assets/css/style.css" rel="stylesheet">

   <!-- skin css-->
   <link href="assets/css/skin-modes.css" rel="stylesheet">

   <!-- dark-theme css-->
   <link href="assets/css/style-dark.css" rel="stylesheet">

   <!-- Switcher css -->
   <link href="assets/switcher/css/switcher.css" rel="stylesheet">

   <link rel="stylesheet" href="assets/switcher/demo.css">

   <!-- recaptcha -->
   <script src="https://www.google.com/recaptcha/api.js" async defer></script>
   <!-- recaptcha -->
</head>

<!-- <body class="main-body app sidebar-mini Light-mode" > -->

<body class="main-body app sidebar-mini dark-theme">

	<!-- Loader -->
	<div id="global-loader" class="dark-loader">
		<img src="assets/img/loaders/loader.svg" class="loader-img" alt="Loader">
	</div>
	<!-- /Loader -->

	
	<!-- Page -->
	<div class="page">

		<!-- main-sidebar opened -->
		<div class="app-sidebar__overlay" data-toggle="sidebar"></div>

<aside class="app-sidebar sidebar-scroll">

	<div class="main-sidebar-header">
		<a class=" desktop-logo logo-light" href="index.php"><img src="../images/pionex_logo.png" class="main-logo" alt="logo"></a>

		<a class="logo-icon mobile-logo icon-light" href="index.php"><img src="../images/pionex_logo.png" class="logo-icon" alt="logo"></a>

		<a class=" desktop-logo logo-dark" href="index.php"><img src="../images/pionex_logo.png" class="main-logo dark-theme" alt="logo"></a>

		<a class="logo-icon mobile-logo icon-dark" href="index.php"><img src="../images/pionex_logo.png" class="logo-icon dark-theme" alt="logo"></a>
	</div>

	<div class="main-sidebar-body circle-animation ">

		<ul class="side-menu circle">
			<li>
				<h3 class="">Dashboard</h3>
			</li>
			<li class="slide">
				<a class="side-menu__item" href="index.php"><i class="side-menu__icon ti-dashboard"></i><span class="side-menu__label">Dashboard</span></a>
			</li>


			<!-- <li class="slide">
						<a class="side-menu__item" data-toggle="slide" href="#"><i
								class="side-menu__icon ti-layout menu-icon"></i><span class="side-menu__label">Layouts</span><i
								class="angle fe fe-chevron-down"></i></a>
						<ul class="slide-menu">
							<li><a class="slide-item" href="vertical.html">Vertical</a></li>
							<li><a class="slide-item" href="horizontal.html">Horizontal</a></li>
						</ul>
					</li> -->

			<li class="slide">
				<a class="side-menu__item" href="add-fund.php?a=page"><i class="side-menu__icon fa fa-dollar"></i><span class="side-menu__label">Deposit</span></a>
			</li>

			<li class="slide">
				<a class="side-menu__item" href="deposit.php?a=page"><i class="side-menu__icon far fa-arrow-alt-circle-down"></i><span class="side-menu__label">Invest Fund</span></a>
			</li>

			<li class="slide">
				<a class="side-menu__item" href="investment-history.php?a=page"><i class="side-menu__icon fa fa-briefcase"></i><span class="side-menu__label">Investment history</span></a>
			</li>


			<li class="slide">
				<a class="side-menu__item" href="withdrawal.php?a=page"><i class="side-menu__icon  fa fa-money"></i><span class="side-menu__label">Withdraw Funds</span></a>
			</li>

			<li class="slide">
				<a class="side-menu__item" href="referral.php?a=page"><i class="side-menu__icon mdi mdi-account-multiple-plus"></i><span class="side-menu__label">Referral</span></a>
			</li>


			<li>
				<!-- <h3>Activity</h3> -->
			</li>
			<li class="slide">
				<a class="side-menu__item" href="history.php?a=page"><i class="side-menu__icon ti-package"></i><span class="side-menu__label">History</span></a>
			</li>
			<!--  -->



			<li>
				<h3>Settings</h3>
			</li>
			<li class="slide">
				<a class="side-menu__item" href="wallet-address.php?a=page"><i class="side-menu__icon ti-pencil"></i><span class="side-menu__label">Payment Update</span></a>
			</li>
			<li class="slide">
				<a class="side-menu__item" href="edit-profile.php?a=page"><i class="side-menu__icon ti-pencil-alt"></i><span class="side-menu__label">Edit Profile</span></a>
			</li>

			<li class="slide">
				<a class="side-menu__item" href="logout.php?a=page"><i class="side-menu__icon si si-logout"></i><span class="side-menu__label">Logout</span></a>
			</li>
		</ul>
	</div>
</aside>		<!-- main-sidebar -->



		<!-- main-content -->
		<div class="main-content app-content">

			<!-- main-header -->
			<div class="main-header sticky side-header nav nav-item">
   <div class="container-fluid">
      <div class="main-header-left ">
         <div class="app-sidebar__toggle mobile-toggle" data-toggle="sidebar">
            <a class="open-toggle" href="#"><i class="header-icons" data-eva="menu-outline"></i></a>
            <a class="close-toggle" href="#"><i class="header-icons" data-eva="close-outline"></i></a>
         </div>
         <div class="main-header-center ml-3 d-sm-none d-md-none d-lg-block">
            <!-- <input type="search" class="form-control" placeholder="Search for anything...">
            <button class="btn"><i class="fas fa-search"></i></button> -->
         </div>
      </div>
      <div class="main-header-center">
         <div class="responsive-logo">
            <a href="index.php">
               <img src="../images/pionex_logo.png" class="mobile-logo" height="35" alt="logo">
               <img src="../images/pionex_logo.png" class="dark-mobile-logo" height="35" alt="logo">
            </a>
         </div>
      </div>
      
            <div id="google_translate_element"></div>
             <script type="text/javascript">
                function googleTranslateElementInit() {
                   new google.translate.TranslateElement({
                      pageLanguage: 'en'
                   }, 'google_translate_element');
                }
             </script>
             <script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>

      <div class="main-header-right">
         <div class="nav nav-item  navbar-nav-right ml-auto">
            <!-- <form class="navbar-form nav-item my-auto d-lg-none" role="search">
               <div class="input-group nav-item my-auto">
                  <input type="text" class="form-control" placeholder="Search">
                  <span class="input-group-btn">
                     <button type="reset" class="btn btn-default">
                        <i class="ti-close"></i>
                     </button>
                     <button type="submit" class="btn btn-default nav-link">
                        <i class="ti-search"></i>
                     </button>
                  </span>
               </div>
            </form> -->
            <div class="nav-item full-screen fullscreen-button">
               <a class="new nav-link full-screen-link" href="#"><i class="ti-fullscreen"></i></span></a>
            </div>


            
            <button class="navbar-toggler navresponsive-toggler d-sm-none" type="button" data-toggle="collapse" data-target="#navbarSupportedContent-4" aria-controls="navbarSupportedContent-4" aria-expanded="false" aria-label="Toggle navigation">
               <span class="navbar-toggler-icon fe fe-more-vertical "></span>
            </button>
            <div class="dropdown main-profile-menu nav nav-item nav-link">
               <a class="profile-user" href="#"><img alt="" src="<?php echo $photo; ?>"></a>
               <div class="dropdown-menu dropdown-menu-arrow animated fadeInUp">
                  <div class="main-header-profile header-img" style="background:#000;">
                     <div class="main-img-user"><img alt="" src="<?php echo $photo; ?>"></div>
                     <h6><?php echo $fullname; ?></h6><span class="badge badge-success">Verified</span>
                  </div>
                  <a class="dropdown-item" href="index.php"><i class="far fa-user"></i> My Profile</a>
                  <a class="dropdown-item" href="edit-profile.php?a=page#edit"><i class="far fa-edit"></i> Edit Profile</a>
                  <a class="dropdown-item" href="history.php?a=page"><i class="far fa-clock"></i> Activity Logs</a>
                  <!-- <a class="dropdown-item" href="#"><i class="fas fa-sliders-h"></i> Account Settings</a> -->
                  <a class="dropdown-item" href="logout.php"><i class="fas fa-sign-out-alt"></i> Sign
                     Out</a>
               </div>
            </div>
            <!-- <div class="dropdown main-header-message right-toggle">
               <a class="nav-link " data-toggle="sidebar-right" data-target=".sidebar-right">
                  <i class="ti-menu tx-20 bg-transparent"></i>
               </a>
            </div> -->
         </div>
      </div>
   </div>
</div>







<!-- mobile-header -->
<div class="responsive main-header collapse" id="navbarSupportedContent-4">
   <div class="mb-1 navbar navbar-expand-lg  nav nav-item  navbar-nav-right responsive-navbar navbar-dark d-sm-none ">
      <div class="navbar-collapse">
         <div class="d-flex order-lg-2 ml-auto">

            <div class="d-md-flex">
               <div class="nav-item full-screen fullscreen-button">
                  <a class="new nav-link full-screen-link" href="#"><i class="ti-fullscreen"></i></span></a>
               </div>
            </div>


            
            <div class="dropdown main-profile-menu nav nav-item nav-link">
               <a class="profile-user" href="#"><img alt="" src="<?php echo $photo; ?>"></a>
               <div class="dropdown-menu dropdown-menu-arrow animated fadeInUp">
                  <div class="main-header-profile header-img" style="background:#000;">
                     <div class="main-img-user"><img alt="" src="<?php echo $photo; ?>"></div>
                     <h6><?php echo $fullname; ?></h6><span class="badge badge-success">Verified</span>
                  </div>
                  <a class="dropdown-item" href="edit-profile.php?a=page"><i class="far fa-user"></i> My Profile</a>
                  <a class="dropdown-item" href="edit-profile.php?a=page#edit"><i class="far fa-edit"></i> Edit Profile</a>
                  <a class="dropdown-item" href="history.php?a=page"><i class="far fa-clock"></i> Activity Logs</a>
                  <!-- <a class="dropdown-item" href="#"><i class="fas fa-sliders-h"></i> Account Settings</a> -->
                  <a class="dropdown-item" href="logout.php"><i class="fas fa-sign-out-alt"></i> Sign
                     Out</a>
               </div>
            </div>
            <!-- <div class="dropdown main-header-message right-toggle">
               <a class="nav-link " data-toggle="sidebar-right" data-target=".sidebar-right">
                  <i class="ti-menu tx-20 bg-transparent"></i>
               </a>
            </div> -->
         </div>
      </div>
   </div>
</div>
<!-- mobile-header -->			<!-- /main-header -->


			<!-- container -->
			<div class="container-fluid">


				<!-- breadcrumb -->
				<div class="breadcrumb-header justify-content-between">
					<div class="left-content">
						<h3 class="content-title mb-2">Welcome, <?php echo $fullname; ?></h3>
						<div class="d-flex">
							<i class="mdi mdi-home text-muted hover-cursor"></i>
							<p class="text-muted mb-0 hover-cursor">&nbsp;/&nbsp;Dashboard&nbsp;/&nbsp;</p>
							<p class="text-primary mb-0 hover-cursor">Home</p>
						</div>
					</div>

				</div>
				<!-- /breadcrumb -->

				<!-- row  -->
				<div class="row">
					<div class="col-xl-12 col-md-12 col-lg-12">
						<div class=" overflow-hidden bg-transparent card-crypto-scroll shadow-none">
							<div class="js-conveyor-example">
								<ul class="news-crypto">
									<li>
										<div class="crypto-card">
											<div class="row">
												<div class="d-flex">
													<div class="my-auto">
														<img src="assets/img/crypto-currencies/round-outline/Augur.svg" class="w-6 h-6 mt-0" alt="">
													</div>
													<div class="ml-3">
														<p class="mb-1 tx-13">REP / INR</p>
														<div class="m-0 tx-13 text-warning">$0.0215<span class="text-danger ml-2"><i class="ion-arrow-down-c mr-1"></i>-0.78%</span></div>
													</div>
												</div>
											</div>
										</div>
									</li>
									<li>
										<div class="crypto-card">
											<div class="row">
												<div class="d-flex">
													<div class="">
														<img src="assets/img/crypto-currencies/round-outline/AquariusCoin.svg" class="w-6 h-6 mt-0" alt="">
													</div>
													<div class="ml-3">
														<p class="mb-1 tx-13">ARCO / INR</p>
														<div class="m-0 tx-13 text-warning">$425.25<span class="text-success ml-2"><i class="ion-arrow-up-c mr-1"></i>+12.85%</span></div>
													</div>
												</div>
											</div>
										</div>
									</li>
									<li>
										<div class="crypto-card">
											<div class="row">
												<div class="d-flex">
													<div class="">
														<img src="assets/img/crypto-currencies/round-outline/BitShares.svg" class="w-6 h-6 mt-0" alt="">
													</div>
													<div class="ml-3">
														<p class="mb-1 tx-13">BTS / INR</p>
														<div class="m-0 tx-13 text-warning">$2.786<span class="text-success ml-2"><i class="ion-arrow-up-c mr-1"></i>-02.25%</span></div>
													</div>
												</div>
											</div>
										</div>
									</li>
									<li>
										<div class="crypto-card">
											<div class="row">
												<div class="d-flex">
													<div class="">
														<img src="assets/img/crypto-currencies/round-outline/Bytecoin.svg" class="w-6 h-6 mt-0" alt="">
													</div>
													<div class="ml-3">
														<p class="mb-1 tx-13">BCN / INR</p>
														<div class="m-0 tx-13 text-warning">$15.425<span class="text-danger ml-2"><i class="ion-arrow-down-c mr-1"></i>-0.78%</span></div>
													</div>
												</div>

											</div>
										</div>
									</li>
									<li>
										<div class="crypto-card">
											<div class="row">
												<div class=" d-flex">
													<div class="my-auto">
														<img src="assets/img/crypto-currencies/round-outline/Dash.svg" class="w-6 h-6 mt-0" alt="">
													</div>
													<div class="ml-3">
														<p class="mb-1 tx-13">Dash / INR</p>
														<div class="m-0 tx-13 text-warning">$5.125<span class="text-success ml-2"><i class="ion-arrow-up-c mr-1"></i>-11.85%%</span></div>
													</div>
												</div>

											</div>
										</div>
									</li>
									<li>
										<div class="crypto-card">
											<div class="row">
												<div class=" d-flex">
													<div class="">
														<img src="assets/img/crypto-currencies/round-outline/EOS.svg" class="w-6 h-6 mt-0" alt="">
													</div>
													<div class="ml-3">
														<p class="mb-1 tx-13">EUR / INR</p>
														<div class="m-0 tx-13 text-warning">$135.425<span class="text-danger ml-2"><i class="ion-arrow-down-c mr-1"></i>-0.78%</span></div>
													</div>
												</div>

											</div>
										</div>
									</li>
									<li>
										<div class="crypto-card">
											<div class="row">
												<div class=" d-flex">
													<div class="">
														<img src="assets/img/crypto-currencies/round-outline/Decred.svg" class="w-6 h-6 mt-0" alt="">
													</div>
													<div class="ml-3">
														<p class="mb-1 tx-13">ETH / USDT</p>
														<div class="m-0 tx-13 text-warning">$34.625<span class="text-success ml-2"><i class="ion-arrow-up-c mr-1"></i>-0.32%</span></div>
													</div>
												</div>

											</div>
										</div>
									</li>
									<li>
										<div class="crypto-card">
											<div class="row">
												<div class=" d-flex">
													<div class="">
														<img src="assets/img/crypto-currencies/round-outline/IOTA.svg" class="w-6 h-6 mt-0" alt="">
													</div>
													<div class="ml-3">
														<p class="mb-1 tx-13">IOTA / USD</p>
														<div class="m-0 tx-13 text-warning">$67.325<span class="text-danger ml-2"><i class="ion-arrow-down-c mr-1"></i>-0.78%</span></div>
													</div>
												</div>

											</div>
										</div>
									</li>
									<li>
										<div class="crypto-card">
											<div class="row">
												<div class=" d-flex">
													<div class="">
														<img src="assets/img/crypto-currencies/round-outline/Litecoin.svg" class="w-6 h-6 mt-0" alt="">
													</div>
													<div class="ml-3">
														<p class="mb-1 tx-13">LTC / USD</p>
														<div class="m-0 tx-13 text-warning">$7.525<span class="text-success ml-2"><i class="ion-arrow-up-c mr-1"></i>-1.42%</span></div>
													</div>
												</div>
											</div>
										</div>
									</li>
									<li>
										<div class="crypto-card">
											<div class="row">
												<div class=" d-flex">
													<div class="">
														<img src="assets/img/crypto-currencies/round-outline/Monero.svg" class="w-6 h-6 mt-0" alt="">
													</div>
													<div class="ml-3">
														<p class="mb-1 tx-13">XMR / EUR</p>
														<div class="m-0 tx-13 text-warning">$4.325<span class="text-danger ml-2"><i class="ion-arrow-down-c mr-1"></i>-0.78%</span></div>
													</div>
												</div>
											</div>
										</div>
									</li>
									<li>
										<div class="crypto-card">
											<div class="row">
												<div class=" d-flex">
													<div class="">
														<img src="assets/img/crypto-currencies/round-outline/NEM.svg" class="w-6 h-6 mt-0" alt="">
													</div>
													<div class="ml-3">
														<p class="mb-1 tx-13">ETH / USDT</p>
														<div class="m-0 tx-13 text-warning">$5.525<span class="text-success ml-2"><i class="ion-arrow-up-c mr-1"></i>-1.32%</span></div>
													</div>
												</div>
											</div>
										</div>
									</li>
									<li>
										<div class="crypto-card">
											<div class="row">
												<div class=" d-flex">
													<div class="">
														<img src="assets/img/crypto-currencies/round-outline/Netko-coin.svg" class="w-6 h-6 mt-0" alt="">
													</div>
													<div class="ml-3">
														<p class="mb-1 tx-13">NEO / USD</p>
														<div class="m-0 tx-13 text-warning">$6.025<span class="text-danger ml-2"><i class="ion-arrow-down-c mr-1"></i>-0.78%</span></div>
													</div>
												</div>

											</div>
										</div>
									</li>
								</ul>
							</div>
						</div>
					</div>
				</div>
				<!-- /row -->



				<!-- row -->
				<div class="row row-sm">

   <div class="col-xl-4 col-lg-6 col-md-12">
      <div class="card crypto crypt-primary overflow-hidden">
         <div class="card-body iconfont text-left">
            <div class="media">
               <div class="coin-logo bg-primary-transparent">
                  <!-- <i class="cf cf-eth text-primary"></i> -->
                  <i class="si si-wallet icons"></i>
               </div>
               <div class="media-body">
                  <h6>Balance</h6>
                  <p>Bal  = <span class="text-white"><?php echo $currency.$balance; ?></span> (<span class="text-success">+<?php echo $currency;?>0</span>)</p>
               </div>
               <div class="card-body-top mb-3">
                  <div>
                     Total balance
                  </div>
                  <div>
                     <h4><?php echo $currency.$balance; ?></h4>
                  </div>
               </div>
            </div>
            <div class="flot-wrapper">
               <div class="flot-chart ht-150 mt-4" id="flotChart3"></div>
            </div>
         </div>
         <div class="card-footer">
            <nav class="nav">
               <!-- <a class="nav-link active" href="#"><span>1D</span><span>-12.24%</span></a> <a class="nav-link" href="#"><span>1W</span><span>-16.48%</span></a> <a class="nav-link" href="#"><span>1M</span><span>-15.21%</span></a> <a class="nav-link" href="#"><span>1Y</span><span>-40.17%</span></a> -->
            </nav>
         </div>
      </div>
   </div>
   <div class="col-xl-4 col-lg-6 col-md-12">
      <div class="card crypto crypt-success overflow-hidden">
         <div class="card-body iconfont text-left">
            <div class="media">
               <div class="coin-logo bg-success-transparent">

                                       <i class="fas fa-chart-line text-success"></i>
                                 </div>


                                 <div class="media-body">
                     <h6>Active Investment</h6>
                     <p><?php echo $currency.number_format($active_investment,2); ?></p>
                  </div>

               

            </div>
            <div class="flot-wrapper">
               <div class="flot-chart ht-150  mt-4" id="flotChart1"></div>
            </div>
         </div>
         <div class="card-footer">
            <nav class="nav">
               <!-- <a class="nav-link active" href="#"><span>1D</span><span>-15.24%</span></a> <a class="nav-link" href="#"><span>1W</span><span>-24.68%</span></a> <a class="nav-link" href="#"><span>1M</span><span>-17.15%</span></a> <a class="nav-link" href="#"><span>1Y</span><span>-30.23%</span></a> -->
            </nav>
         </div>
      </div>
   </div>
   
   <div class="col-xl-4 col-lg-6 col-md-12">
      <div class="card crypto crypt-success overflow-hidden">
         <div class="card-body iconfont text-left">
            <div class="media">
               <div class="coin-logo bg-success-transparent">
                  <i class="cf cf-ltc tx-18 text-success"></i>
               </div>
               <div class="media-body">
                  <h6>Overall Earned</h6>
                  <p><?php echo $currency.$earnings; ?></p>
               </div>
               <div class="card-body-top">
                  <!-- <div>
											<a href="#">21</a> USD Markets
										</div>
										<div>
											<a href="#">56</a> BTC Markets
										</div> -->
               </div>
            </div>
            <div class="flot-wrapper">
               <div class="flot-chart ht-150 mt-4" id="flotChart5" style="height: 100px;"></div>
            </div>
         </div>
         <div class="card-footer">
            <nav class="nav">
               <a class="nav-link active" href="#"><span>1D</span><span>82.38%</span></a> <a class="nav-link" href="#"><span>1W</span><span>68.83%</span></a> <a class="nav-link" href="#"><span>1M</span><span>80.42%</span></a> <a class="nav-link" href="#"><span>1Y</span><span>52.23%</span></a>
            </nav>
         </div>
      </div>
   </div>


</div>				<!-- /row -->

				<!-- row -->
				<div class="row">
					<div class="col-sm-12 col-lg-6 col-xl-3">
						<div class="card">
							<div class="card-body">
								<div class="clearfix">
									<div class="float-right">

																					<i class="far fa-arrow-alt-circle-down text-warning icon-size"></i>
																			</div>
									<div class="float-left">
										<p class="mb-0 text-left">Pending Deposit</p>
										<div class="">
											<h3 class="font-weight-semibold text-left mb-0 text-warning"><?php echo $currency.number_format($pending_deposit); ?>												<span style="font-size: 11px; color:aliceblue;">
													()												</span>
											</h3>
										</div>
									</div>
								</div>
								<p class="text-muted mb-0">
									<i class="mdi mdi-arrow-down-drop-circle mr-1 text-warning" aria-hidden="true">
										<?php echo $pending_deposits; ?>								</i>
									Pending Deposits								</p>
							</div>
						</div>
					</div>
					<div class="col-sm-12 col-lg-6 col-xl-3">
						<div class="card">
							<div class="card-body">
								<div class="clearfix">
									<div class="float-right">
										<i class="far fa-arrow-alt-circle-down text-success icon-size"></i>
									</div>
									<div class="float-left">
										<p class="mb-0 text-left">Total Investment</p>
										<div class="">
											<h3 class="font-weight-semibold text-left mb-0 text-success"><?php echo $currency.number_format($total_investments,2); ?></h3>
										</div>
									</div>
								</div>
								<p class="text-muted mb-0">
									<i class="mdi mdi-arrow-down-drop-circle mr-1 text-success" aria-hidden="true"> <?php echo $completed_deposits; ?></i> Completed Deposits
								</p>
							</div>
						</div>
					</div>

					<div class="col-sm-12 col-lg-6 col-xl-3">
						<div class="card">
							<div class="card-body">
								<div class="clearfix">
									<div class="float-right">

																					<i class="far fa-arrow-alt-circle-up text-warning icon-size"></i>
										
									</div>
									<div class=" float-left">
										<p class="mb-0 text-left">Pending Withdrawal</p>
										<div class="">
											<h3 class="font-weight-semibold text-left mb-0 text-warning"><?php echo $currency.number_format($pending_withdrawal); ?></h3>
										</div>
									</div>
								</div>
								<p class="text-muted mb-0">
									<i class="mdi mdi-arrow-up-drop-circle mr-1 text-warning" aria-hidden="true"> <?php echo $pending_withdrawals; ?></i> Pending Withdrawal
								</p>
							</div>
						</div>
					</div>
					<div class="col-sm-12 col-lg-6 col-xl-3">
						<div class="card">
							<div class="card-body">
								<div class="clearfix">
									<div class="float-right">
										<i class="far fa-arrow-alt-circle-up text-info icon-size"></i>
									</div>
									<div class="float-left">
										<p class="mb-0 text-left">Total Withdrawal</p>
										<div class="">
											<h3 class="font-weight-semibold text-left mb-0 text-info"><?php echo $currency.number_format($total_withdrawal,2); ?></h3>
										</div>
									</div>
								</div>
								<p class="text-muted mb-0">
									<i class="mdi mdi-arrow-up-drop-circle mr-1 text-info" aria-hidden="true"> <?php echo $completed_withdrawals; ?></i> Completed Withdrawal
								</p>
							</div>
						</div>
					</div>

				</div>
				<!-- row -->

				<div class="row row-sm">

					<div class="col-sm-12 col-md-6 col-lg-6 col-xl-6">
						<div class="card widgets-cards">
							<div class="card-body d-flex justify-content-center align-items-center">
								<div class="col-2 p-0">
									<div class="float-left">
										<i class="mdi mdi-account-multiple-plus icons text-primary icon-size"></i>
									</div>
								</div>
								<div class="col-10 p-0">
									<div class="wrp text-wrapper">
										<p></p>
										<p class="mb-0 text-left">Referral Link</p>
										<br>
										<div class="input-group">
											<input type="text" class="form-control" id='copy' value="https://spcxinvs.com/signup?ref=<?php echo $username; ?>" readonly>
											<div class="input-group-append">
												<button type="button" class="btn btn-light btn-block" onclick='myFunction()'><i class="fas fa-copy"></i> Copy</button>
											</div>
											<script type="text/javascript">
												function myFunction() {
													/* Get the text field */
													var copyText = document.getElementById("copy");

													/* Select the text field */
													copyText.select();
													copyText.setSelectionRange(0, 99999); /*For mobile devices*/

													/* Copy the text inside the text field */
													document.execCommand("copy");

													/* Alert the copied text */
													alert("Copied the text: " + copyText.value);
												}
											</script>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>

					<div class="col-sm-12 col-lg-6 col-xl-3">
						<div class="card">
							<div class="card-body">
								<div class="clearfix">
									<div class="float-right">
										<i class="si si-people text-info icon-size"></i>
									</div>
									<div class="float-left">
										<p class="mb-0 text-left">Total Referral</p>
										<div class="">
											<h3 class="font-weight-semibold text-left mb-2 mt-4"><?php echo $totalref; ?></h3>
										</div>
									</div>
								</div>
								<!--<p class="text-muted mb-1 mt-2">
									 <i class="mdi mdi-arrow-up-drop-circle mr-1 text-info" aria-hidden="true"> 5</i> No.of Referral
								</p> -->
							</div>
						</div>
					</div>

					<div class="col-sm-12 col-lg-6 col-xl-3">
						<div class="card">
							<div class="card-body">
								<div class="clearfix">
									<div class="float-right">
										<i class="mdi mdi-account-multiple-plus text-info icon-size"></i>
									</div>
									<div class="float-left">
										<p class="mb-0 text-left">Referral Earnings</p>
										<div class="">
											<h3 class="font-weight-semibold text-left mb-2 mt-4"><?php echo $currency.number_format($ref_bonus,2); ?></h3>
										</div>
									</div>
								</div>
								<!--<p class="text-muted mb-1 mt-2">
									 <i class="mdi mdi-arrow-up-drop-circle mr-1 text-info" aria-hidden="true"> 5</i> No. Referral 
								</p>-->
							</div>
						</div>
					</div>

				</div>


				<!-- row -->

				
				<script type="text/javascript">
					function calculate() {
						// var input = document.getElementById("searchTxt");
						var plan = $('#calc_p').val();
						var amount = $('#inv_amt').val();
						var percent;

						switch (plan) {
							case '1':
								switch (true) {
									case (amount < 100):
										percent = 0;
										break;
									case (amount > 1000):
										percent = 0;
										break;
									case ((amount >= 100) || (amount <= 1000)):
										percent = 3;

										break;

									default:
										percent = 0;
								}
								break;
							case '2':
								switch (true) {
									case (amount < 1000):
										percent = 0;
										break;
									case (amount > 10000):
										percent = 0;
										break;
									case ((amount >= 1000) || (amount <= 10000)):
										percent = 5;

										break;

									default:
										percent = 0;
								}
								break;

								// case '3':
								// 	switch (true) {
								// 		case (amount < 10000):
								// 			percent = 0;
								// 			break;
								// 		case (amount > 19000):
								// 			percent = 0;
								// 			break;
								// 		case ((amount >= 10000) || (amount <= 19000)):
								// 			percent = 75;

								// 			break;

								// 		default:
								// 			percent = 0;
								// 	}
								// 	break;

							case '3':
								switch (true) {
									case (amount < 10000):
										percent = 0;
										break;

									case ((amount >= 10000)):
										percent = 15;

										break;

									default:
										percent = 0;
								}
								break;





						}
						var total = amount * percent / 100;
						$('#total_net').val('$' + total.toFixed(2));

						if (total > 0) {
							var ttotal = parseFloat(total) + parseFloat(amount);
							$('#total_ret').val('$' + ttotal.toFixed(2));

						} else {
							$('#total_ret').val('$' + "0.00");
						}



					}
				</script>

				<!-- row -->



				<!-- row -->
				<div class="row">
					<div class="col-md-12">
						<div class="card overflow-hidden">
							<div class="card-body">
								<div class="">
									<div class="d-flex justify-content-between">
										<h4 class="card-title mg-b-10">Crypto currencies marketing values</h4>
										<i class="mdi mdi-dots-horizontal text-gray"></i>
									</div>
									<p class="tx-12 tx-gray-500 mb-2">A cryptocurrency is a new form of digital asset based on a
										network that is distributed across a large number of computers. This decentralized
										structure allows them to exist outside the control of governments and central
										authorities.<a href="https://www.tradingview.com/markets/cryptocurrencies/prices-all/" rel="noopener" target="_blank">Learn more</a></p>
								</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/markets/cryptocurrencies/prices-all/" rel="noopener" target="_blank"><span class="blue-text">Cryptocurrency Markets</span></a> by ValueAssets Investment</div>
									<script type="text/javascript" src="https://s3.tradingview.com/external-embedding/embed-widget-screener.js" async>
										{
											"width": "100%",
											"height": "490",
											"defaultColumn": "overview",
											"screener_type": "crypto_mkt",
											"displayCurrency": "USD",
											"colorTheme": "dark",
											"locale": "en"
										}
									</script>
								</div>
								<!-- TradingView Widget END -->
							</div>
						</div>
					</div>
				</div>
				<!-- /row  -->
			</div>


		</div>
		<!-- Container closed -->

	</div>
	<!-- main-content closed -->


	<!-- Footer opened -->
	<div class="main-footer ht-40">
		<div class="container-fluid pd-t-0-f ht-100p">
			<span>Copyright © 2025 <a href="#">SpaceX Tesla Investments Trades</a> All
				rights reserved.</span>
		</div>
	</div>
	<!-- Footer closed -->
	</div>
	<!--End Page -->

	<!-- Back-to-top -->
	<a href="#top" id="back-to-top"><i class="la la-chevron-up"></i></a>

	<!-- Jquery js-->
	<script src="assets/plugins/jquery/jquery.min.js"></script>

	<!-- Bootstrap js-->
	<script src="assets/plugins/bootstrap/js/bootstrap.bundle.min.js"></script>

	<!-- Ionicons js-->
	<script src="assets/plugins/ionicons/ionicons.js"></script>

	<!-- Moment js -->
	<script src="assets/plugins/moment/moment.js"></script>

	<!-- P-scroll js -->
	<script src="assets/plugins/perfect-scrollbar/perfect-scrollbar.min.js"></script>
	<script src="assets/plugins/perfect-scrollbar/p-scroll.js"></script>

	<!-- Rating js-->
	<script src="assets/plugins/rating/jquery.rating-stars.js"></script>
	<script src="assets/plugins/rating/jquery.barrating.js"></script>

	<!-- Custom Scroll bar Js-->
	<script src="assets/plugins/mscrollbar/jquery.mCustomScrollbar.concat.min.js"></script>

	<!-- eva-icons js -->
	<script src="assets/js/eva-icons.min.js"></script>

	<!-- Sidebar js -->
	<script src="assets/plugins/side-menu/sidemenu.js"></script>

	<!-- Right-sidebar js -->
	<script src="assets/plugins/sidebar/sidebar.js"></script>
	<script src="assets/plugins/sidebar/sidebar-custom.js"></script>

	<!-- Sticky js-->
	<script src="assets/js/sticky.js"></script>


	<!-- Datepicker js -->
	<script src="assets/plugins/jquery-ui/ui/widgets/datepicker.js"></script>

	<!--Chart bundle min js -->
	<script src="assets/plugins/chart.js/Chart.bundle.min.js"></script>
	<script src="assets/plugins/raphael/raphael.min.js"></script>
	<script src="assets/plugins/peity/jquery.peity.min.js"></script>

	<!-- JQuery sparkline js -->
	<script src="assets/plugins/jquery-sparkline/jquery.sparkline.min.js"></script>

	<!-- Sampledata js -->
	<script src="assets/js/chart.flot.sampledata.js"></script>

	<!-- Perfect-scrollbar js -->
	<script src="assets/plugins/perfect-scrollbar/perfect-scrollbar.min.js"></script>
	<script src="assets/plugins/perfect-scrollbar/p-scroll.js"></script>

	<!-- Internal  Flot js-->
	<script src="assets/plugins/jquery.flot/jquery.flot.js"></script>
	<script src="assets/plugins/jquery.flot/jquery.flot.pie.js"></script>
	<script src="assets/plugins/jquery.flot/jquery.flot.categories.js"></script>
	<script src="assets/js/dashboard.sampledata.js"></script>
	<script src="assets/js/chart.flot.sampledata.js"></script>

	<!-- Internal Newsticker js-->
	<script src="assets/plugins/newsticker/jquery.jConveyorTicker.js"></script>
	<script src="assets/js/newsticker.js"></script>

	<!-- Internal Nice-select js-->
	<script src="assets/plugins/jquery-nice-select/js/jquery.nice-select.js"></script>
	<script src="assets/plugins/jquery-nice-select/js/nice-select.js"></script>

	<!-- index js -->
	<script src="assets/js/dashboard.js"></script>


	<!-- Custom js-->
	<script src="assets/js/custom.js"></script>

	<!-- Switcher js -->
	<script src="assets/switcher/js/switcher.js"></script>

</body>


<!-- Mirrored from laravel.spruko.com/xino/ltr/ by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 14 Aug 2021 01:54:59 GMT -->

</html>