
<?php

require 'user-login.php';
                                        
                                            
                                        

$user = new user($_COOKIE['email'], $link);


if($user->getCurrency() == "USD"){
    $curry = "$";
}elseif($user->getCurrency() == "GBP"){
    $curry = "£";
}elseif($user->getCurrency() == "EUR"){
    $curry = "€";
}elseif($user->getCurrency() == "CAD"){
    $curry = "$";
}
else{
    $curry = "¥";
}

$mar = $user->getEmail();

?>


<style type="text/css">
    ._tx_tile_{
        padding: 10px;
        border-bottom: 1px solid #EEE;
        font-size: 18px;
    }
    ._tName{
        margin-top: 10px;
        font-size: 30px;
        font-weight: 800;
    }
</style>

<!doctype html>
<html class="no-js" lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <title><?php echo $site_name  ?>- Dashboard</title>
    <script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="shortcut icon" type="image/png" href="assets/images/icon/favicon.ico">
    <link rel="stylesheet" href="assets/css/bootstrap.min.css">
    <link rel="stylesheet" href="assets/css/font-awesome.min.css">
    <link rel="stylesheet" href="assets/css/themify-icons.css">
    <link rel="stylesheet" href="assets/css/metisMenu.css">
    <link rel="stylesheet" href="assets/css/owl.carousel.min.css">
    <link rel="stylesheet" href="assets/css/slicknav.min.css">
    <!-- amchart css -->
    <link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all" />
    <!-- others css -->
    <link rel="stylesheet" href="assets/css/typography.css">
    <link rel="stylesheet" href="assets/css/default-css.css">
    <link rel="stylesheet" href="assets/css/styles.css">
    <link rel="stylesheet" href="assets/css/responsive.css">
    <!-- modernizr css -->
    <script src="assets/js/modernizr-2.8.3.min.js"></script>
    <script src="assets/js/jquery.js"></script>
    <script src="assets/js/j.js"></script>
</head>

<body>
    

    <!--[if lt IE 8]>
            <p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
        <![endif]-->
    <!-- preloader area start -->
    <div id="preloader">
        <div class="loader"></div>
    </div>
    <!-- preloader area end -->
    <!-- page container area start -->
    <div class="page-container">
        <!-- sidebar menu area start -->
        <div class="sidebar-menu">
            <div class="sidebar-header">
                <div class="logo">
                    <a href="index.html"><img src="https://cryptoprofinances.com/assets/uploads/2021/12/logo_headerdark.png" alt="logo" ></a>
                </div>
            </div>
            <div class="main-menu">
                <div class="menu-inner">
                    <nav>
                        <ul class="metismenu" id="menu">
                            <li class="active">
                                <a href="../" aria-expanded="true"><i class="ti-home"></i><span>Home</span></a>
                            </li>
                            <li class="active">
                                <a href="index.php" aria-expanded="true"><i class="ti-dashboard"></i><span>Trade Center</span></a>
                            </li>
                            <li class="active" style="background: unset;">
                                <a href="deposit.php" aria-expanded="true"><i class="ti-credit-card"></i><span>Fund Account</span></a>
                            </li>
                            <li class="active" style="background: unset;">
                                <a href="withdraw.php" aria-expanded="true"><i class="ti-money"></i><span>Withdraw</span></a>
                            </li>
                            <li class="active" style="background: unset;">
                                <a href="signal.php" aria-expanded="true"><i class="ti-money"></i><span>Purchase Signal</span></a>
                            </li>
                            
                            <!--<li class="active" style="background: unset;">
                                <a href="./?verify" aria-expanded="true"><i class="ti-id-badge"></i><span>ID Verification</span></a>-->
                            </li>
                            <li class="active" style="background: unset;">
                                <a href="upgrade.php" aria-expanded="true"><i class="ti-crown"></i><span>Account Upgrade</span></a>
                            </li>
                            <li class="active" style="background: unset;">
                                <a href="history.php" aria-expanded="true"><i class="ti-bar-chart"></i><span>Trade History</span></a>
                            </li>
                            <li class="active" data-toggle="modal" data-target="#profile" style="background: unset;">
                                <a href="#profile" aria-expanded="true"><i class="ti-user"></i><span>Profile</span></a>
                            </li>
                            <li class="active" style="background: unset;">
                                <a href="logout.php" aria-expanded="true"><i class="ti-close"></i><span>Logout</span></a>
                            </li>
                            <!-- <li>
                                <a href="javascript:void(0)" aria-expanded="true"><i class="ti-layout-sidebar-left"></i><span>Sidebar
                                        Types
                                    </span></a>
                                <ul class="collapse">
                                    <li><a href="index.html">Left Sidebar</a></li>
                                    <li><a href="index3-horizontalmenu.html">Horizontal Sidebar</a></li>
                                </ul>
                            </li>
                            <li>
                                <a href="javascript:void(0)" aria-expanded="true"><i class="ti-pie-chart"></i><span>Charts</span></a>
                                <ul class="collapse">
                                    <li><a href="barchart.html">bar chart</a></li>
                                    <li><a href="linechart.html">line Chart</a></li>
                                    <li><a href="piechart.html">pie chart</a></li>
                                </ul>
                            </li>
                            <li>
                                <a href="javascript:void(0)" aria-expanded="true"><i class="ti-palette"></i><span>UI Features</span></a>
                                <ul class="collapse">
                                    <li><a href="accordion.html">Accordion</a></li>
                                    <li><a href="alert.html">Alert</a></li>
                                    <li><a href="badge.html">Badge</a></li>
                                    <li><a href="button.html">Button</a></li>
                                    <li><a href="button-group.html">Button Group</a></li>
                                    <li><a href="cards.html">Cards</a></li>
                                    <li><a href="dropdown.html">Dropdown</a></li>
                                    <li><a href="list-group.html">List Group</a></li>
                                    <li><a href="media-object.html">Media Object</a></li>
                                    <li><a href="modal.html">Modal</a></li>
                                    <li><a href="pagination.html">Pagination</a></li>
                                    <li><a href="popovers.html">Popover</a></li>
                                    <li><a href="progressbar.html">Progressbar</a></li>
                                    <li><a href="tab.html">Tab</a></li>
                                    <li><a href="typography.html">Typography</a></li>
                                    <li><a href="form.html">Form</a></li>
                                    <li><a href="grid.html">grid system</a></li>
                                </ul>
                            </li>
                            <li>
                                <a href="javascript:void(0)" aria-expanded="true"><i class="ti-slice"></i><span>icons</span></a>
                                <ul class="collapse">
                                    <li><a href="fontawesome.html">fontawesome icons</a></li>
                                    <li><a href="themify.html">themify icons</a></li>
                                </ul>
                            </li>
                            <li>
                                <a href="javascript:void(0)" aria-expanded="true"><i class="fa fa-table"></i>
                                    <span>Tables</span></a>
                                <ul class="collapse">
                                    <li><a href="table-basic.html">basic table</a></li>
                                    <li><a href="table-layout.html">table layout</a></li>
                                    <li><a href="datatable.html">datatable</a></li>
                                </ul>
                            </li>
                            <li><a href="maps.html"><i class="ti-map-alt"></i> <span>maps</span></a></li>
                            <li><a href="invoice.html"><i class="ti-receipt"></i> <span>Invoice Summary</span></a></li>
                            <li>
                                <a href="javascript:void(0)" aria-expanded="true"><i class="ti-layers-alt"></i> <span>Pages</span></a>
                                <ul class="collapse">
                                    <li><a href="login.html">Login</a></li>
                                    <li><a href="login2.html">Login 2</a></li>
                                    <li><a href="login3.html">Login 3</a></li>
                                    <li><a href="register.html">Register</a></li>
                                    <li><a href="register2.html">Register 2</a></li>
                                    <li><a href="register3.html">Register 3</a></li>
                                    <li><a href="register4.html">Register 4</a></li>
                                    <li><a href="screenlock.html">Lock Screen</a></li>
                                    <li><a href="screenlock2.html">Lock Screen 2</a></li>
                                    <li><a href="reset-pass.html">reset password</a></li>
                                    <li><a href="pricing.html">Pricing</a></li>
                                </ul>
                            </li>
                            <li>
                                <a href="javascript:void(0)" aria-expanded="true"><i class="fa fa-exclamation-triangle"></i>
                                    <span>Error</span></a>
                                <ul class="collapse">
                                    <li><a href="404.html">Error 404</a></li>
                                    <li><a href="403.html">Error 403</a></li>
                                    <li><a href="500.html">Error 500</a></li>
                                </ul>
                            </li>
                            <li>
                                <a href="javascript:void(0)" aria-expanded="true"><i class="fa fa-align-left"></i> <span>Multi
                                        level menu</span></a>
                                <ul class="collapse">
                                    <li><a href="#">Item level (1)</a></li>
                                    <li><a href="#">Item level (1)</a></li>
                                    <li><a href="#" aria-expanded="true">Item level (1)</a>
                                        <ul class="collapse">
                                            <li><a href="#">Item level (2)</a></li>
                                            <li><a href="#">Item level (2)</a></li>
                                            <li><a href="#">Item level (2)</a></li>
                                        </ul>
                                    </li>
                                    <li><a href="#">Item level (1)</a></li>
                                </ul>
                            </li> -->
                        </ul>
                    </nav>
                </div>
            </div>
        </div>
        <!-- sidebar menu area end -->
        <!-- Modal -->
        <div class="modal fade" id="profile">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <h5 class="modal-title">Account Profile</h5>
                        <button type="button" class="close" data-dismiss="modal"><span>&times;</span></button>
                    </div>
                    <div class="modal-body">
                        
                        <p>Full name: <?php echo $user->getFullname(); ?></p>
                        <p>Invested: <?php echo $user->getInvested(); ?></p>
                        <p>Country: <?php echo $user->getCountry(); ?></p>
                        <p>Phone number: <?php echo $user->getPhone(); ?></p>
                        <p>Balance: <?php echo $user->getBalance(); ?></p>
                        <p>Account ID: <?php echo $user->getUid(); ?></p>
                        <p>Account Type: <?php echo $user->getAccounttype(); ?></p>

                        <br>
                        <br>

                        <div class="alert alert-danger" role="alert">
                            <strong>For more information contact us immediately through our official email address info@10xoptions.com Thank you for using <?php echo $site_name ?></strong>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-primary" data-dismiss="modal">Close</button>
                        <!-- <button type="button" class="btn btn-primary">Save changes</button> -->
                    </div>
                </div>
            </div>
        </div>
        <!-- main content area start -->
        <div class="main-content">
            <!-- header area start -->
            <div class="header-area" style="background: #262b3e;">
                <div class="row align-items-center">
                    <!-- nav and search button -->
                    <div class="col-md-6 col-sm-8 clearfix">
                        <div class="nav-btn pull-left">
                            <span></span>
                            <span></span>
                            <span></span>
                        </div>
                        <div class="search-box pull-left">
                            <div class="logo">
                                <a href="index.html"><img src="https://cryptoprofinances.com/assets/uploads/2021/12/logo_headerdark.png" alt="logo" ></a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!-- header area end -->

            <!-- TradingView Widget BEGIN -->
                        <!-- TradingView Widget END -->

                                    
                        <!-- page title area start -->
                        <div class="page-title-area">
                            <div class="row align-items-center">
                                <div class="col-sm-6">
                                    <div class="breadcrumbs-area clearfix">
                                        <h4 class="page-title pull-left">Trade History</h4>
                                        <ul class="breadcrumbs pull-left">
                                            <li><a href="index.html">Home</a></li>
                                            <li><span>Trade History</span></li>
                                        </ul>
                                    </div>
                                </div>
                                <div class="col-sm-6 clearfix">
                                    <div class="user-profile pull-right">
                                        <img class="avatar user-thumb" src="assets/images/author/avatar.png" alt="avatar">
                                        <h4 class="user-name dropdown-toggle" data-toggle="dropdown"><?php echo $user->getFullname();  ?></h4>
                                        <!-- <div class="dropdown-menu">
                                            <a class="dropdown-item" href="#">Message</a>
                                            <a class="dropdown-item" href="#">Settings</a>
                                            <a class="dropdown-item" href="#">Log Out</a>
                                        </div> -->
                                    </div>
                                </div>
                            </div>
                        </div>
                        
                    <style type="text/css">
                        .tradingview-widget-copyright, .button-1dpg_T2E-, .button--right-2CEhpGhn-{
                        display: none;
                        height: 0px;
                    }
                    </style>
                    <div class="tradingview-widget-container" style="background: #233337;height: 70px !important; overflow: hidden;">
              <div class="tradingview-widget-container__widget"></div>
              <div class="tradingview-widget-copyright"><a href="#" 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": true,
                  "displayMode": "adaptive",
                  "locale": "en"
                }
              </script>
            </div>                        <!-- page title area end -->
                        <div class="main-content-inner">

                            <!-- Progress Table start -->
                            <div class="col-12 mt-5">
                                <div class="card">
                                    <div class="card-body">
                                        <h4 class="header-title">My Trading History</h4>
                                        <div class="single-table">
                                            <div class="table-responsive">
                                                <table class="table table-hover progress-table text-center">
                                                    <thead class="text-uppercase">
                                                        <tr>
                                                            <th scope="col">AMOUNT</th>
                                                            <th scope="col">TYPE</th>
                                                            <th scope="col">STATUS</th>
                                                            <th scope="col">DATE</th>
                                                            <!-- <th scope="col">action</th> -->
                                                        </tr>
                                                    </thead>
                                                    <tbody>
                                                             <?php
                                        //$rs = mysqli_query($link, "SE")
                                        $rs1 = mysqli_query($link, "SELECT * FROM transactions WHERE email = '$mar' ");
                                        $sn=0;
                                        if(mysqli_num_rows($rs1) > 0) {
                                        while ($row = mysqli_fetch_assoc($rs1)) {
                                            $sn++;
                                            if($row['type'] == "Deposit"){
                                                $type = "<p>".$row['type']."</p>";
                                            }elseif($row['type'] == "Profit"){
                                                $type = "<p style='color: green'>".$row['type']."</p>";
                                            }elseif($row['type'] == "Loss"){
                                                $type = "<p style='color: red'>".$row['type']."</p>";
                                            }elseif($row['type'] == "Bonus"){
                                                $type = "<p style='color: green'>".$row['type']."</p>";
                                            }else{
                                                $type = "<p>".$row['type']."</p>";
                                            }
                                            echo "
                                                <tr>
                                                   <td style='text-align: center'>".$row['amount']."</td>
                                                    <td style='text-align: center'>".$type."</td>
                                                    <td style='text-align: center'>".$row['status']."</td>
                                                    <td style='text-align: center'>".$row['date']."</td>
                                                </tr>
                                            ";
                                        }
                                    }else {
                                        echo "<tr><td colspan='4' style='text-align:center'> No recent transactions. </td> </tr>";
                                    }


                                    ?>
                                                                                                            </tbody>
                                                </table>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <!-- Progress Table end -->

                        </div>

                    
        </div>
        <!-- main content area end -->
        <!-- footer area start-->
        <footer>
            <div class="footer-area">
                <p>© Copyright 2022. All right reserved. <?php echo $site_name; ?></p>
            </div>
        </footer>
        <!-- footer area end-->
    </div>
    <!-- page container area end -->
    <!-- offset area start -->
    <div class="offset-area">
        <div class="offset-close"><i class="ti-close"></i></div>
        <ul class="nav offset-menu-tab">
            <li><a class="active" data-toggle="tab" href="#activity">Activity</a></li>
            <li><a data-toggle="tab" href="#settings">Settings</a></li>
        </ul>
        <div class="offset-content tab-content">
            <div id="activity" class="tab-pane fade in show active">
                <div class="recent-activity">
                    <div class="timeline-task">
                        <div class="icon bg1">
                            <i class="fa fa-envelope"></i>
                        </div>
                        <div class="tm-title">
                            <h4>Rashed sent you an email</h4>
                            <span class="time"><i class="ti-time"></i>09:35</span>
                        </div>
                        <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Esse distinctio itaque at.
                        </p>
                    </div>
                    <div class="timeline-task">
                        <div class="icon bg2">
                            <i class="fa fa-check"></i>
                        </div>
                        <div class="tm-title">
                            <h4>Added</h4>
                            <span class="time"><i class="ti-time"></i>7 Minutes Ago</span>
                        </div>
                        <p>Lorem ipsum dolor sit amet consectetur.
                        </p>
                    </div>
                    <div class="timeline-task">
                        <div class="icon bg2">
                            <i class="fa fa-exclamation-triangle"></i>
                        </div>
                        <div class="tm-title">
                            <h4>You missed you Password!</h4>
                            <span class="time"><i class="ti-time"></i>09:20 Am</span>
                        </div>
                    </div>
                    <div class="timeline-task">
                        <div class="icon bg3">
                            <i class="fa fa-bomb"></i>
                        </div>
                        <div class="tm-title">
                            <h4>Member waiting for you Attention</h4>
                            <span class="time"><i class="ti-time"></i>09:35</span>
                        </div>
                        <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Esse distinctio itaque at.
                        </p>
                    </div>
                    <div class="timeline-task">
                        <div class="icon bg3">
                            <i class="ti-signal"></i>
                        </div>
                        <div class="tm-title">
                            <h4>You Added Kaji Patha few minutes ago</h4>
                            <span class="time"><i class="ti-time"></i>01 minutes ago</span>
                        </div>
                        <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Esse distinctio itaque at.
                        </p>
                    </div>
                    <div class="timeline-task">
                        <div class="icon bg1">
                            <i class="fa fa-envelope"></i>
                        </div>
                        <div class="tm-title">
                            <h4>Ratul Hamba sent you an email</h4>
                            <span class="time"><i class="ti-time"></i>09:35</span>
                        </div>
                        <p>Hello sir , where are you, i am egerly waiting for you.
                        </p>
                    </div>
                    <div class="timeline-task">
                        <div class="icon bg2">
                            <i class="fa fa-exclamation-triangle"></i>
                        </div>
                        <div class="tm-title">
                            <h4>Rashed sent you an email</h4>
                            <span class="time"><i class="ti-time"></i>09:35</span>
                        </div>
                        <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Esse distinctio itaque at.
                        </p>
                    </div>
                    <div class="timeline-task">
                        <div class="icon bg2">
                            <i class="fa fa-exclamation-triangle"></i>
                        </div>
                        <div class="tm-title">
                            <h4>Rashed sent you an email</h4>
                            <span class="time"><i class="ti-time"></i>09:35</span>
                        </div>
                    </div>
                    <div class="timeline-task">
                        <div class="icon bg3">
                            <i class="fa fa-bomb"></i>
                        </div>
                        <div class="tm-title">
                            <h4>Rashed sent you an email</h4>
                            <span class="time"><i class="ti-time"></i>09:35</span>
                        </div>
                        <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Esse distinctio itaque at.
                        </p>
                    </div>
                    <div class="timeline-task">
                        <div class="icon bg3">
                            <i class="ti-signal"></i>
                        </div>
                        <div class="tm-title">
                            <h4>Rashed sent you an email</h4>
                            <span class="time"><i class="ti-time"></i>09:35</span>
                        </div>
                        <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Esse distinctio itaque at.
                        </p>
                    </div>
                </div>
            </div>
            <div id="settings" class="tab-pane fade">
                <div class="offset-settings">
                    <h4>General Settings</h4>
                    <div class="settings-list">
                        <div class="s-settings">
                            <div class="s-sw-title">
                                <h5>Notifications</h5>
                                <div class="s-swtich">
                                    <input type="checkbox" id="switch1" />
                                    <label for="switch1">Toggle</label>
                                </div>
                            </div>
                            <p>Keep it 'On' When you want to get all the notification.</p>
                        </div>
                        <div class="s-settings">
                            <div class="s-sw-title">
                                <h5>Show recent activity</h5>
                                <div class="s-swtich">
                                    <input type="checkbox" id="switch2" />
                                    <label for="switch2">Toggle</label>
                                </div>
                            </div>
                            <p>The for attribute is necessary to bind our custom checkbox with the input.</p>
                        </div>
                        <div class="s-settings">
                            <div class="s-sw-title">
                                <h5>Show your emails</h5>
                                <div class="s-swtich">
                                    <input type="checkbox" id="switch3" />
                                    <label for="switch3">Toggle</label>
                                </div>
                            </div>
                            <p>Show email so that easily find you.</p>
                        </div>
                        <div class="s-settings">
                            <div class="s-sw-title">
                                <h5>Show Task statistics</h5>
                                <div class="s-swtich">
                                    <input type="checkbox" id="switch4" />
                                    <label for="switch4">Toggle</label>
                                </div>
                            </div>
                            <p>The for attribute is necessary to bind our custom checkbox with the input.</p>
                        </div>
                        <div class="s-settings">
                            <div class="s-sw-title">
                                <h5>Notifications</h5>
                                <div class="s-swtich">
                                    <input type="checkbox" id="switch5" />
                                    <label for="switch5">Toggle</label>
                                </div>
                            </div>
                            <p>Use checkboxes when looking for yes or no answers.</p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- offset area end -->
    <!-- jquery latest version -->
    <script src="assets/js/vendor/jquery-2.2.4.min.js"></script>
    <!-- bootstrap 4 js -->
    <script src="assets/js/popper.min.js"></script>
    <script src="assets/js/bootstrap.min.js"></script>
    <script src="assets/js/owl.carousel.min.js"></script>
    <script src="assets/js/metisMenu.min.js"></script>
    <script src="assets/js/jquery.slimscroll.min.js"></script>
    <script src="assets/js/jquery.slicknav.min.js"></script>

    <!-- start chart js -->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.2/Chart.min.js"></script>
    <!-- start highcharts js -->
    <script src="https://code.highcharts.com/highcharts.js"></script>
    <!-- start zingchart js -->
    <script src="https://cdn.zingchart.com/zingchart.min.js"></script>
    <?php echo $site_livechat; ?>
    <!-- all line chart activation -->
    <script src="assets/js/line-chart.js"></script>
    <!-- all pie chart -->
    <script src="assets/js/pie-chart.js"></script>
    <!-- others plugins -->
    <script src="assets/js/plugins.js"></script>
    <script src="assets/js/scripts.js"></script>




</body>

</html>