Your IP : 3.137.221.252


Current Path : /home/lentoinv/finationglobal.com/account/
Upload File :
Current File : /home/lentoinv/finationglobal.com/account/manageproperties2.php

<?php
session_start(); ob_start();
?>
<!doctype html>
<html lang="en" dir="ltr">

    <head>

        <!-- META DATA -->
        <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="Fination Global Services">
        <meta name="author" content="Fination Global Services">
        <meta name="keywords" content="">

        <!-- FAVICON -->
        <link rel="shortcut icon" type="image/x-icon" href="../assets/images/brand/favicon.ico" />
        <link rel="shortcut icon" type="image/x-icon" href="../assets/images/brand/favicon.ico" />

        <!-- TITLE -->
        <title>Manage Properties</title>

        <!-- BOOTSTRAP CSS -->
        <link id="style" href="../assets/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" />

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

        <!--- FONT-ICONS CSS -->
        <link href="../assets/css/icons.css" rel="stylesheet" />

    </head>

    <body class="app sidebar-mini ltr light-mode">

        <!-- GLOBAL-LOADER 
        <div id="global-loader">
            <img src="../assets/images/loader.svg" class="loader-img" alt="Loader">
        </div>-->
        <!-- /GLOBAL-LOADER -->

        <!-- PAGE -->
        <div class="page">
            <div class="page-main">

                <!-- app-Header -->
                <?php include('header.php');   $pro->adminAccess();
                //$pro->DeductAutomated(); ?>
                <!--/APP-SIDEBAR-->

                <!--app-content open-->
                <div class="main-content app-content mt-0">
                    <div class="side-app">

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

                            <!-- PAGE-HEADER -->
                            <div class="page-header">
                                <div>
                                    <h1 class="page-title">Manage Properties</h1>
                                    <ol class="breadcrumb">
                                        <li class="breadcrumb-item"><a href="javascript:void(0);">Home</a></li>
                                        <li class="breadcrumb-item active" aria-current="page">Manage Properties</li>
                                    </ol>
                                </div>
                                <?php include('pagebtn.php') ?>
                            </div>
                            <!-- PAGE-HEADER END -->

<?php if(!isset($_GET['ref'])){  ?>
<div class="card">
                        <div class="card-body">
                            <div class="card-title">
                                <h5 class="mb-0">Create New Property</h5>

                            </div>
                            <hr/>

<form method="post">
                          <div class="row">
                             
                              <div class="col-lg-6 mb-2">
                                <input type="text" name="title" placeholder="Title" class="form-control asav" required></div>
                              
                              <div class="col-lg-6 mb-2"><input type="number" min="50000" max="500000000" name="amount" placeholder="Property Price (NGN)" class="form-control asav" required></div>
                              <div class="col-lg-12 mb-2">
                                <textarea rows="10" name="note" placeholder="Description"  class="content asav"  required></textarea></div>
                              
                              <input type="hidden" value="1" name="slot" class="form-control asav" required >
                             

                                            <div class="col-lg-9 mt-3" >
<h3 id="savRes"></h3>
                                            </div>
                                            <div class="col-lg-3 mt-3">
                                                <input type="hidden" name="type" value="5">
<button type="submit" class="btn btn-primary btn-block" name="CreateGroupInvest">Create New Property</button>
                                            </div>
                                            
                               </div>   </form> 

                            </div>
                        </div><!--end row-->
                    </div>
<?php } ?>
                    <div class="card">
                        <div class="card-body">
                            <div class="card-title">
                                <h5 class="mb-0">Properties for Sale</h5>

                            </div>
                            <hr/>

                            <div class="table-responsive mt-3">
                                <table id="example" class="table table-bordered table-striped">
                                    <thead>
                                        <tr>
                                            <th>S/N</th>
                                            
                                            <th>Date</th>
                                            <th>Title</th>
                                            <th>Description</th>
                                           
                                            <th>Price</th>
                                            <th>Remark</th>
                                            <th>Action</th> 
                                            
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php
                                        $i=1;
                                        $sql = $db->query("SELECT * FROM ginvest WHERE type=5 ORDER BY sn DESC LIMIT 200 "); 
                                        while($row = $sql->fetch_assoc()) { $e = $i++;
                                         
                                            ?>
                                            <tr>
                                     <td><?php echo $e; ?></td>
                                    <td><?php echo date('d/m/y', strtotime($row['created'])); ?></td>
                                               <td><?php echo $row['title']; ?></td>
                                               <td><?php echo $row['note']; ?></td>
                                                <td><strike>N</strike><?php echo number_format($row['amount'],2) ?></td>
                                                <td></td>
                                            
                                                <td><form method="get" ><button type="submit" value="<?= $row['ref'] ?>" class="btn btn-primary btn-sm" name="ref">More</button></form></td> 
                                               </tr>
                                            <?php } ?>
                                        </tbody>
                                    </table>
                                </div>
                            </div><!--end row-->
                            
                        </div>
<?php if(isset($_GET['ref'])){ $ref = $_GET['ref']; ?>
                    <div class="card">
                        <div class="card-body">
                            <div class="card-title">
                                <h4 class="mb-0"><?= sqLx('ginvest','ref',$ref,'title') ?></h4>

                            </div>
                            <hr/>

                            <div class="mt-3">
                                 <?php $status=sqLx('ginvest','ref',$ref,'status');
                                 if($status==1){ ?>
                                    <form method="post">
                                    <button type="submit" class="btn btn-warning" value="0" name="ActivatePro">Deactivate Property Listing</button></form>
                                <?php } else{ ?>
<form method="post">
                                    <button type="submit" class="btn btn-primary" value="1" name="ActivatePro">Activate Property Listing</button></form>
                                <?php } ?>
                                <h5>Update Property</h5>
                <form method="post">
                          <div class="row">
                             
                              <div class="col-lg-6 mb-2">
                                <input type="text" name="title" placeholder="Title" class="form-control bsav" value="<?= sqLx('ginvest','ref',$ref,'title') ?>" required></div>
                             
                              
                              <div class="col-lg-6 mb-2"><input type="number" min="50000" max="500000000" name="amount" placeholder="Property Price (NGN)" class="form-control bsav" value="<?= sqLx('ginvest','ref',$ref,'amount') ?>" required ></div> 
                              <div class="col-lg-12 mb-2">
                                <textarea rows="10" name="note" placeholder="Description"  class="content asav" required><?= sqLx('ginvest','ref',$ref,'note') ?></textarea>
                                </div>
                             <input type="hidden" value="1" name="slot" class="form-control bsav" required>
                             

                                            <div class="col-lg-9 mt-3" >

                                            </div>
                                            <div class="col-lg-3 mt-3">
<button type="submit" class="btn btn-primary btn-block" name="UpdateGroupInvest">Update Property Data</button>
                                            </div>
                                            
                               </div>
  </form><form method="post" enctype="multipart/form-data">                              
<h5>UPdate Photograph</h5> 
<img src="uploads/<?= sqLx('ginvest','ref',$ref,'photo')  ?>" width="50%" class="mb-5">    
 <div class="row">
                             
                              <div class="col-lg-6 mb-2">
                                <input type="file" name="photo" placeholder="Property Photo" class="form-control"  required></div>
                             
                                            <div class="col-lg-6 mt-0">
<button type="submit" class="btn btn-primary btn-block" name="UpdateInvestmentPhoto">Update  Property Photo</button>
                                            </div>
                                            
                               </div> 
</form> 
<form method="post">
<br><br>

<hr>

<h4>Update Payment Options</h4>

<table class="table table-bordered">
    <tr>
        <th>Payment Plans</th>
        <th>Initial Deposit</th>
        <th>Monthly Payment</th>
     
    </tr>
    <tr>
        <td>Outright</td><td><input type="number" class="form-control" name="a1" placeholder="Initial Deposit" required value="<?= sqLx('ginvest','ref',$ref,'amount') ?>" disabled></td><td><input type="number" class="form-control" name="a2" placeholder="Monthly Deposit" disabled></td>
    </tr>
     <tr>
        <td>Flexible</td><td><input type="number" class="form-control" name="fl1" placeholder="Initial Deposit"  value="<?= sqLx('ginvest','ref',$ref,'fl1') ?>" ><input type="number" class="form-control" name="fl2" placeholder="Remaining Payment"  value="<?= sqLx('ginvest','ref',$ref,'fl2') ?>" ></td><td><input type="number" class="form-control" name="fl3" placeholder="Number of Months" value="<?= sqLx('ginvest','ref',$ref,'fl3') ?>" min="1" max="24"></td>
    </tr>
    <tr>
        <td>Three (3) Months</td><td><input type="number" class="form-control" name="b1" placeholder="Initial Deposit" value="<?= sqLx('ginvest','ref',$ref,'b1') ?>"></td><td><input type="number" class="form-control" name="b2" placeholder="Monthly Deposit" value="<?= sqLx('ginvest','ref',$ref,'b2') ?>"></td>
    </tr>
    <tr>
        <td>Six (6) Months</td><td><input type="number" class="form-control" name="c1" placeholder="Initial Deposit" value="<?= sqLx('ginvest','ref',$ref,'c1') ?>"></td><td><input type="number" class="form-control" name="c2" placeholder="Monthly Deposit" value="<?= sqLx('ginvest','ref',$ref,'c2') ?>"></td>
    </tr>
    <tr>
        <td>Twelve (12) Months</td><td><input type="number" class="form-control" name="d1" placeholder="Initial Deposit" value="<?= sqLx('ginvest','ref',$ref,'d1') ?>"></td><td><input type="number" class="form-control" name="d2" placeholder="Monthly Deposit" value="<?= sqLx('ginvest','ref',$ref,'d2') ?>"></td>
    </tr>
    <tr>
        <td>Eighteen (18) Months</td><td><input type="number" class="form-control" name="e1" placeholder="Initial Deposit" value="<?= sqLx('ginvest','ref',$ref,'e1') ?>"></td><td><input type="number" class="form-control" name="e2" placeholder="Monthly Deposit" value="<?= sqLx('ginvest','ref',$ref,'e2') ?>"></td>
    </tr>
    <tr>
        <td>Twenty Four (24) Months</td><td><input type="number" class="form-control" name="f1" placeholder="Initial Deposit" value="<?= sqLx('ginvest','ref',$ref,'f1') ?>"></td><td><input type="number" class="form-control" name="f2" placeholder="Monthly Deposit" value="<?= sqLx('ginvest','ref',$ref,'f2') ?>"></td>
    </tr>
  
</table>
<label>Direct Sales Commission (%)</label>
<input type="number" name="com" class="form-control" placeholder="Direct Sales Commission" value="<?= sqLx('ginvest','ref',$ref,'com') ?>"><br>
<label>Indirect Sales Commission (%)</label>
<input type="number" name="com2" class="form-control" placeholder="Indirect Sales Commission" value="<?= sqLx('ginvest','ref',$ref,'com2') ?>"><br>

<button type="submit" class="btn btn-primary btn-block" name="UpdatePropertyPricing">Update  Property Pricing</button>
                                 </form> 
                                
                                </div>
                            </div><!--end row-->
                            
                        </div>


                  <div class="card">
                        <div class="card-body">
                            <div class="card-title">
                                <h5 class="mb-0">Purchases</h5>

                            </div>
                            <hr/>

                            <div class="table-responsive mt-3">
                                <table id="example" class="table table-bordered table-striped">
                                    <thead>
                                        <tr>
                                            <th>S/N</th>
                                            
                                            <th>Date</th>
                                            <th>User</th>
                                            <th>Amount</th>
                                            <th>Remark</th>
                                            
                                        </tr>
                                    </thead>
                                    <tbody>
                                     <?php
                                        $i=1;
                                        $sql = $db->query("SELECT * FROM walletnaira WHERE opt LIKE '%$ref%' ORDER BY sn DESC LIMIT 200 "); 
                                        while($row = $sql->fetch_assoc()) { $e = $i++;
                                         
                                            ?>
                                            <tr>
                                     <td><?php echo $e; ?></td>
                                    <td><?php echo date('d/m/y', strtotime($row['created'])); ?></td>
                                               <td><?php echo userName($row['id']); ?> (<?php echo userName($row['id'],'user'); ?>)</td>
                                               
                                                <td><strike>N</strike><?php echo number_format(abs($row['cos']),2) ?></td>
                                           
                                           <td></td>
                                                 
                                               </tr>
                                            <?php } ?>
                                        </tbody>
                                    </table>
                                </div>
                            </div><!--end row-->
                        </div>

                    <?php } ?>
                    </div>
<!-- ROW -->

                </div>
                <!--app-content end-->
            </div>


            <!-- FOOTER -->
<?php include('footer.php'); ?>
            <!-- FOOTER END -->
        </div>

        <!-- BACK-TO-TOP -->
        <a href="#top" id="back-to-top"><i class="fa fa-angle-up"></i></a>

        <!-- JQUERY JS -->
        <script src="../assets/js/jquery.min.js"></script>

        <!-- BOOTSTRAP JS -->
        <script src="../assets/plugins/bootstrap/js/popper.min.js"></script>
        <script src="../assets/plugins/bootstrap/js/bootstrap.min.js"></script>

        <!-- SPARKLINE JS-->
        <script src="../assets/js/jquery.sparkline.min.js"></script>

        <!-- CHART-CIRCLE JS-->
        <script src="../assets/js/circle-progress.min.js"></script>

        <!-- CHARTJS CHART JS-->
        <script src="../assets/plugins/chart/Chart.bundle.js"></script>
        <script src="../assets/plugins/chart/utils.js"></script>

        <!-- PIETY CHART JS-->
        <script src="../assets/plugins/peitychart/jquery.peity.min.js"></script>
        <script src="../assets/plugins/peitychart/peitychart.init.js"></script>

        <!-- INTERNAL SELECT2 JS -->
        <script src="../assets/plugins/select2/select2.full.min.js"></script>

        <!-- INTERNAL Data tables js-->
        <script src="../assets/plugins/datatable/js/jquery.dataTables.min.js"></script>
        <script src="../assets/plugins/datatable/js/dataTables.bootstrap5.js"></script>
        <script src="../assets/plugins/datatable/dataTables.responsive.min.js"></script>

        <!-- ECHART JS-->
        <script src="../assets/plugins/echarts/echarts.js"></script>

        <!-- SIDE-MENU JS-->
        <script src="../assets/plugins/sidemenu/sidemenu.js"></script>

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

        <!-- SIDEBAR JS -->
        <script src="../assets/plugins/sidebar/sidebar.js"></script>

        <!-- Perfect SCROLLBAR JS-->
        <script src="../assets/plugins/p-scroll/perfect-scrollbar.js"></script>
        <script src="../assets/plugins/p-scroll/pscroll.js"></script>
        <script src="../assets/plugins/p-scroll/pscroll-1.js"></script>

        <!-- APEXCHART JS -->
        <script src="../assets/js/apexcharts.js"></script>

        <!-- INDEX JS -->
        <script src="../assets/js/index1.js"></script>

        <!-- Color Theme js -->
        <script src="../assets/js/themeColors.js"></script>

        <!-- swither styles js -->
        <script src="../assets/js/swither-styles.js"></script>

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

             <!-- WYSIWYG Editor JS -->
        <script src="../assets/plugins/wysiwyag/jquery.richtext.js"></script>
        <script src="../assets/plugins/wysiwyag/wysiwyag.js"></script>

        <!-- FORMEDITOR JS -->
        <script src="../assets/plugins/quill/quill.min.js"></script>
        <script src="../assets/js/form-editor2.js"></script>
          <script>
        

        function getSav(){
        var v = document.getElementsByClassName('asav');
     
        var a = v[1].value;
        var b = v[2].value;
        var c = v[3].value;
        if(a=='' || b=='' || c==''){return; }

        var d = b/c;
       $('#savRes').html('NGN'+com(d)+' Per Slots');
         
        }
        function getSav2(){
        var v = document.getElementsByClassName('bsav');
     
        var a = v[1].value;
        var b = v[2].value;
        var c = v[3].value;
        if(a=='' || b=='' || c==''){return; }

        var d = b/c;
       $('#savRes2').html('NGN'+com(d)+' Per Slots');
         
        }


function com(v){
    return (v).toFixed(2).replace(/\d(?=(\d{3})+\.)/g, '$&,');
}

    </script>

    </body>

</html>

?>