<?php ob_start(); include "../connect/db.php"; ?>
<!DOCTYPE html>
<html lang="en">

<head>
    <!-- Required meta tags-->
    <meta name="robots" content="noindex,nofollow">
<meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="au theme template">
    <meta name="author" content="Hau Nguyen">
    <meta name="keywords" content="au theme template">

    <!-- Title Page-->
    <title>Edit Investment | Admin</title>

    <!-- Fontfaces CSS-->
    <link href="css/font-face.css" rel="stylesheet" media="all">
    <link href="vendor/font-awesome-4.7/css/font-awesome.min.css" rel="stylesheet" media="all">
    <link href="vendor/font-awesome-5/css/fontawesome-all.min.css" rel="stylesheet" media="all">
    <link href="vendor/mdi-font/css/material-design-iconic-font.min.css" rel="stylesheet" media="all">

    <!-- Bootstrap CSS-->
    <link href="vendor/bootstrap-4.1/bootstrap.min.css" rel="stylesheet" media="all">

    <!-- Vendor CSS-->
    <link href="vendor/animsition/animsition.min.css" rel="stylesheet" media="all">
    <link href="vendor/bootstrap-progressbar/bootstrap-progressbar-3.3.4.min.css" rel="stylesheet" media="all">
    <link href="vendor/wow/animate.css" rel="stylesheet" media="all">
    <link href="vendor/css-hamburgers/hamburgers.min.css" rel="stylesheet" media="all">
    <link href="vendor/slick/slick.css" rel="stylesheet" media="all">
    <link href="vendor/select2/select2.min.css" rel="stylesheet" media="all">
    <link href="vendor/perfect-scrollbar/perfect-scrollbar.css" rel="stylesheet" media="all">

    <!-- Main CSS-->
    <link href="css/theme.css" rel="stylesheet" media="all">

</head>

<body class="animsition">
    <div class="page-wrapper">

   
        <?php include"includes/header.php" ?>   

        <?php           

            $maga = $_GET['id'];
            $vanila = mysqli_query($con,"SELECT * FROM investments WHERE trans_id = '$maga' ");
            $crow = mysqli_fetch_assoc($vanila);

        ?>             

        <!-- PAGE CONTAINER-->
        <div class="page-container"> 

            <!-- MAIN CONTENT-->
            <div class="main-content">
                <div class="section__content section__content--p30">
                    <div class="container-fluid">
                        <div class="row">
                            <div class="col-lg-1"></div>
                            <div class="col-lg-10"><br><br>
                                <div class="card">
                                    <div class="card-body" style="border-radius: 5px;box-shadow: 0 0 10px 5px #cecece;">
                                        <ul class="nav nav-tabs nav-tabs-warning top-icon nav-justified">
                                            <li class="nav-item">
                                                <a href="javascript:void();" data-target="#profile" data-toggle="pill" class="nav-link active"><i class="icon-user"></i> <span class="hidden-xs"> <?php echo $crow['trans_id'] ?>  Details</span></a>
                                            </li>        
                                        </ul>
                                        <div class="tab-content p-3">
                                            <div class="tab-pane active" id="profile"> 
                                                <div class="row">
                                                    <div class="col-lg-1"></div>
                                                    <div class="col-lg-10">
                                                          <br>
                                                            <div class="form-group row">
                                                                <label class="col-lg-3 col-form-label form-control-label">Transaction Id</label>
                                                                <div class="col-lg-9">
                                                                    <input class="form-control" readonly name="trans_id" value="<?php echo $crow['id'] ?>"  type="hidden">
                                                                </div>
                                                            </div>
                                                            
                                                            <div class="form-group row">
                                                                <label class="col-lg-3 col-form-label form-control-label">Amount</label>
                                                                <div class="col-lg-9">
                                                                    <input class="form-control" name="amount" type="text"  value="<?php echo $crow['amount'] ?>" >
                                                                </div>
                                                            </div>

                                                            <div class="form-group row">
                                                                <label class="col-lg-3 col-form-label form-control-label">Investment Type</label>
                                                                <div class="col-lg-9">
                                                                    <input class="form-control" name="investment_type" type="text"  value="<?php echo $crow['investment_type'] ?>" placeholder="Country">
                                                                </div>
                                                            </div>
                                                           
                                                            <div class="form-group row">
                                                                <label class="col-lg-3 col-form-label form-control-label">Investor</label>
                                                                <div class="col-lg-9">
                                                                    <input class="form-control" name="investor" type="text"  value="<?php echo $crow['investor'] ?>">
                                                                </div>
                                                            </div>

                                                            <div class="form-group row">
                                                                <label class="col-lg-3 col-form-label form-control-label">Status</label>
                                                                <div class="col-lg-9">
                                                                    <input class="form-control" name="status" type="text"  value="<?php echo $crow['status'] ?>">
                                                                </div>
                                                            </div>

                                                            <div class="form-group row">
                                                                <label class="col-lg-3 col-form-label form-control-label">Date Of Investment</label>
                                                                <div class="col-lg-9">
                                                                    <input class="form-control" name="d_o_inv" type="wallet"  value="<?php echo $crow['d_o_inv'] ?>">
                                                                </div>
                                                            </div>                                                                                                         
                                                            <div class="form-group row">
                                                                <div clas="col-12">
                                                                    <span onclick="updateInvest()" class="btn btn-warning pull-right" >Submit Update</span>                                                        
                                                                </div>
                                                            </div>
                                                    </div>
                                                    <div class="col-lg-1"></div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>                                               
                            </div>
                            <div class="col-lg-1"></div>
                        </div>
                        <?php include"includes/footer.php"; ?>
                    </div>
                </div>
            </div>
            <!-- END MAIN CONTENT-->
            <!-- END PAGE CONTAINER-->
        </div>

    </div>

    <!-- Jquery JS-->
    <script src="vendor/jquery-3.2.1.min.js"></script>
    <!-- Bootstrap JS-->
    <script src="vendor/bootstrap-4.1/popper.min.js"></script>
    <script src="vendor/bootstrap-4.1/bootstrap.min.js"></script>
    <!-- Vendor JS       -->
    <script src="vendor/slick/slick.min.js">
    </script>
    <script src="vendor/wow/wow.min.js"></script>
    <script src="vendor/animsition/animsition.min.js"></script>
    <script src="vendor/bootstrap-progressbar/bootstrap-progressbar.min.js">
    </script>
    <script src="vendor/counter-up/jquery.waypoints.min.js"></script>
    <script src="vendor/counter-up/jquery.counterup.min.js">
    </script>
    <script src="vendor/circle-progress/circle-progress.min.js"></script>
    <script src="vendor/perfect-scrollbar/perfect-scrollbar.js"></script>
    <script src="vendor/chartjs/Chart.bundle.min.js"></script>
    <script src="vendor/select2/select2.min.js">
    </script>

    <script src="js/sweetalert2.all.min.js"></script>
    <!-- Main JS-->
    <script src="js/main.js"></script>
    <script src="js/custom.js"></script>

</body>

</html>
<!-- end document-->
