<?php
session_start();

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

$msg = $_SESSION['msg'];

$_SESSION['msg'] = "";
$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;



$trades = $db_handle->runBaseQuery("SELECT * FROM investments WHERE userID = $id");
 
?>
<!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>


<script src="//code.jivosite.com/widget/pfNW6yUA29" async></script>
   <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">

      
   

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

   <!-- Favicon -->
   <link rel="icon" href="../images/favicon.ico" type="image/x-icon" sizes="144x144" />

   <!-- 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 -->
         <!-- container -->
         <div class="container-fluid">


            <!-- breadcrumb -->
            <div class="breadcrumb-header justify-content-between">
               <div class="left-content">

                  <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">History</p>
                  </div>
               </div>

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



            <!-- 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">Investment History</h4>
                              <i class="mdi mdi-dots-horizontal text-gray"></i>
                           </div>
                           <p class="tx-12 tx-gray-500 mb-2">Investment History shows information about investments only, for your account.</p>
                        </div>
                        <div class="table-responsive market-values">
                           <table class="table table-bordered table-hover table-striped text-nowrap mb-0 tx-13">
                              <thead>
                                 <tr>
                                    <th>S/N</th>
                                    <th>Time of Deposit</th>
                                    <th>Plan</th>
                                    <th>Capital Amount</th>
                                    <th>Return</th>
                                   <!-- <th>Reinvest</th>-->
                                    <th>Start Date</th>
                                    <th>End Date</th>
                                    <th>Status</th>
                                 </tr>
                              </thead>
                              <tbody>


<?php

if($trades){

$i = 1;
	foreach ($trades as $trade) {
$status = ($trade['trading'])? "COMPLETE" : "RUNNING";

echo '<tr class="border-bottom">';
echo  '<td>'.$i.'</td>';
echo '<td>'.$trade['time'].'</td>';

echo '<td>$'.number_format($trade['amount'],2).'</td>';
echo '<td>'.$trade['plan'].'</td>';
echo '<td class="text-right">$'.number_format($trade['profit']).'</td>';
echo '<td>'.$trade['date'].'</td>';
echo '<td>'.$trade['end'].'</td>';
echo '<td>'.$status.'</td>';

$i++;
		}
	}else{

		echo '<tr>
                                       <td colspan=6 align=center><i>No transaction yet</i></td>
                                    </tr>';
	}

?>
                                                                  
                                    
                                    

                                 
                                 <!-- <tr class="border-bottom">
													<td>Bitcoin</td>
													<td><i class="cf cf-btc tx-22 text-orange"></i></td>
													<td>$10513.00</td>
													<td class="text-red">-7%</td>
													<td class="text-right">$179,470,305,923</td>
													<td>8.11% / 57</td>
													<td><a href="#" class="btn btn-sm btn-success">Transfer Now</a></td>
												</tr>
												<tr class="border-bottom">
													<td>NEM</td>
													<td><i class="cf cf-xem tx-20 text-teal"></i></td>
													<td>$1547.00</td>
													<td class="text-red">-11%</td>
													<td class="text-right">$26,720,210,956</td>
													<td>21.30% / 6</td>
													<td><a href="#" class="btn btn-sm btn-success">Transfer Now</a></td>
												</tr>
												<tr class="border-bottom">
													<td>Ripple</td>
													<td><i class="cf cf-xrp tx-22 text-primary"></i></td>
													<td>$1.2029</td>
													<td class="text-red">-11%</td>
													<td class="text-right">$47,649,145,657</td>
													<td>10.85% / 53</td>
													<td><a href="#" class="btn btn-sm btn-success">Transfer Now</a></td>
												</tr>
												<tr class="border-bottom">
													<td>Litecoin</td>
													<td><i class="cf cf-ltc tx-20 text-muted"></i></td>
													<td>$173.86</td>
													<td class="text-red">-7%</td>
													<td class="text-right">$9,670,920,267</td>
													<td>6.87% / 57</td>
													<td><a href="#" class="btn btn-sm btn-success">Transfer Now</a></td>
												</tr>
												<tr class="border-bottom">
													<td>Dash</td>
													<td><i class="cf cf-dash tx-22 text-purple"></i></td>
													<td>$0.935049</td>
													<td class="text-red">-11%</td>
													<td class="text-right">$8,415,440,999</td>
													<td>26.99% / 33</td>
													<td><a href="#" class="btn btn-sm btn-success">Transfer Now</a></td>
												</tr> -->
                              </tbody>
                           </table>
                        </div>
                     </div>
                  </div>
               </div>
            </div>
            <!-- /row -->



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




   <!-- Internal Data tables -->
   <script src="assets/plugins/datatable/js/jquery.dataTables.min.js"></script>
   <script src="assets/plugins/datatable/js/dataTables.dataTables.min.js"></script>
   <script src="assets/plugins/datatable/js/dataTables.responsive.min.js"></script>
   <script src="assets/plugins/datatable/js/responsive.dataTables.min.js"></script>
   <script src="assets/plugins/datatable/js/jquery.dataTables.js"></script>
   <script src="assets/plugins/datatable/js/dataTables.bootstrap4.js"></script>
   <script src="assets/plugins/datatable/js/dataTables.buttons.min.js"></script>
   <script src="assets/plugins/datatable/js/buttons.bootstrap4.min.js"></script>
   <script src="assets/plugins/datatable/js/jszip.min.js"></script>
   <script src="assets/plugins/datatable/js/pdfmake.min.js"></script>
   <script src="assets/plugins/datatable/js/vfs_fonts.js"></script>
   <script src="assets/plugins/datatable/js/buttons.html5.min.js"></script>
   <script src="assets/plugins/datatable/js/buttons.print.min.js"></script>
   <script src="assets/plugins/datatable/js/buttons.colVis.min.js"></script>
   <script src="assets/plugins/datatable/js/dataTables.responsive.min.js"></script>
   <script src="assets/plugins/datatable/js/responsive.bootstrap4.min.js"></script>

   <!-- Internal Datatable js -->
   <script src="assets/js/table-data.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>