<?php
include('php/dbconnect.php');
include('php/security.php');
session_start();
if(logged_in())
{
	header('location:index.php');
}
$username= $_SESSION['username'];


$id= $_GET['id']; 
$results= mysqli_query($connection, "SELECT `date`, `id`, `name`, `email`, `number`, `password`, `phone`, `address`, `country`, `gender`, `image`, `vcode`, `verified`, `verify`, `balance`, `totalbalance`, `investbalance`, `profit`, `totaldeposit`, `totalwithdrawal`, `loanlimit`, `availableloan`, `ongoingloan`, `savings`, `idcard`, `idcardback`, `accountstatus`, `pina`, `pinb`, `pinc`, `pind` FROM users WHERE id ='$id'");
$retrive= mysqli_fetch_array($results);
$date = $retrive['date'];
$id = $retrive['id'];
$name = $retrive['name'];
$email = $retrive['email'];
$number = $retrive['number'];
$password = $retrive['password'];
$phone = $retrive['phone'];
$address = $retrive['address'];
$country = $retrive['country'];
$gender = $retrive['gender'];
$image = $retrive['image'];
$vcode = $retrive['vcode'];
$verified = $retrive['verified'];
$verify = $retrive['verify'];
$balance = $retrive['balance'];
$totalbalance = $retrive['totalbalance'];
$investbalance = $retrive['investbalance'];
$profit = $retrive['profit'];
$totaldeposit = $retrive['totaldeposit'];
$totalwithdrawal = $retrive['totalwithdrawal'];
$loanlimit = $retrive['loanlimit'];
$availableloan = $retrive['availableloan'];
$ongoingloan = $retrive['ongoingloan'];
$savings = $retrive['savings'];
$idcard = $retrive['idcard'];
$idcardback = $retrive['idcardback'];
$accountstatus = $retrive['accountstatus'];
$pina = $retrive['pina'];
$pinb = $retrive['pinb'];
$pinc = $retrive['pinc'];
$pind = $retrive['pind'];
			



?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><link href="favicon.png" rel="shortcut icon" type="image/x-icon" /><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta charset="utf-8"><meta name="title" content="Admin"><meta name="author" content="Admin"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="keywords" content="Forex Company, Trading, Investment Brokerage, Trading Firm"><meta name="description" content="Pathway To Greater Height"><title>Admin | Admin</title><link href="data/assets/css/bootstrap.min.css?v=1" id="bootstrap-style" rel="stylesheet" type="text/css" /><link href="data/assets/css/icons.min.css?v=1" rel="stylesheet" type="text/css" /><link href="data/assets/css/app.min.css?v=1" id="app-style" rel="stylesheet" type="text/css" /><link rel="stylesheet" href="data/assets/css/app.css?v=1" type="text/css" /><link href="data/assets/style/style.css??v=1" rel="stylesheet" type="text/css" /><script src="https://www.google.com/recaptcha/api.js"></script><script src="data/assets/js/jquery-3.5.1.min.js"></script><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.3/font/bootstrap-icons.css"></head>	
<body data-sidebar="dark">

<!-- Loader -->
<div id="preloader">
    <div id="status">
        <div class="spinner"></div>
    </div>
</div>

<!-- Begin page -->
<div id="layout-wrapper">   
   <style>
   body::-webkit-scrollbar-track
{
  -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
  background-color: #F5F5F5;
}

body::-webkit-scrollbar
{
  width: 10px;
  background-color: #F5F5F5;
}

body::-webkit-scrollbar-thumb
{
  background-color: #0f355d;
  border: 2px solid #0f355d;
}

   </style>
   
   <header id="page-topbar">
        <div class="navbar-header">
            <div class="d-flex">
                <!-- LOGO -->
                <div class="navbar-brand-box" style="display:flex; align-items-center">
                   
                </div>

                <button type="button" class="btn btn-sm px-3 font-size-24 header-item waves-effect" id="vertical-menu-btn">
                    <i class="bi bi-list"></i>
                </button>

                <div class="d-none d-sm-block ms-2">
                    <h4 class="page-title font-size-18">Dashboard</h4>
                </div>

            </div>

            
        </div>
    </header>
    <!-- ========== Left Sidebar Start ========== -->
    <div class="vertical-menu" >

        <div data-simplebar class="h-100" >

            <!--- Sidemenu -->
            <div id="sidebar-menu">
                <!-- Left Menu Start -->
                <ul class="metismenu list-unstyled" id="side-menu">

                    <li class="mm-active">
                        <a href="members.php" class="waves-effect">
                           <i><img src="data/assets/icons/user.svg" alt=""></i>
                           <span>Users</span>
                        </a>
                    </li>
                    
                                        <li>
                        <a href="deposit.php" class="waves-effect">
                            <i><img src="data/assets/icons/dollar-sign.svg" alt=""></i>
                            <span>All Deposit</span>
                        </a>
                    </li>
                    
					
					
                                     
                    
                    <li>
                        <a href="withdraw.php" class="waves-effect">
                            <i><img src="data/assets/icons/arrow-up-right.svg" alt=""></i>
                            <span>All Withdrawal</span>
                        </a>
                    </li>

                  
                         <li>
                        <a href="transfer.php" class="waves-effect">
                            <i><img src="data/assets/icons/arrow-up-right.svg" alt=""></i>
                            <span>All transfer</span>
                        </a>
                    </li>
                    
                     <li>
                        <a href="loans.php" class="waves-effect">
                            <i><img src="data/assets/icons/arrow-up-right.svg" alt=""></i>
                            <span>All loads</span>
                        </a>
                    </li>
 <li>
                        <a href="card.php" class="waves-effect">
                            <i><img src="data/assets/icons/card.svg" alt=""></i>
                            <span>Card Request</span>
                        </a>
                    </li>


                                    </ul>
            </div>
    </div>
    <!-- Left Sidebar End -->


</div>
<!-- /Right-bar -->
    <div class="main-content">        <div class="page-content">
            <div class="container-fluid">

<div class="row">
                    <div class="col-lg-6">
                        <div class="card">
                            <div class="card-body">

                                <h4 class="card-title">Edit User</h4>
                                
                                <form  action="php/updatemembers.php" method="post">
                                
                                    <div class="form-group mb-3">
                                        <label class="col-md-2 col-form-label">Balance</label>
                                        <input class="form-control" type="text" name="balance" value="<?php echo $balance ?>" >
                                    </div>
                                    
                                     
                                    <div class="mb-3 position-relative">
                                        <label class="form-label">Total Balance</label>
                                        <input class="form-control" type="text" value="<?php echo $totalbalance ?>" name="totalbalance">
                                    </div>
                                    
                                    <div class="mb-3 position-relative">
                                        <label class="form-label">Investment Balance</label>
                                            <input class="form-control" type="text" ="" name="investbalance" value="<?php echo $investbalance ?>" id="example-phone-input" autocomplete="off">
                                                                                </div>
																				
												<div class="mb-3 position-relative">
                                        <label class="form-label">Profit</label>
                                            <input class="form-control" type="text" ="" name="profit" value="<?php echo $profit ?>" id="example-phone-input" autocomplete="off">
                                                                                </div>								

                                    <div class="form-group mb-3">
                                        <label for="example-email-input" class="col-md-2 col-form-label">Total Deposit</label>
                                        <input class="form-control" type="text"  name="totaldeposit" value="<?php echo $totaldeposit ?>" >
                                    </div>
                                    <div class="form-group mb-3">
                                        <label for="example-email-input" class="col-md-2 col-form-label">Target Withdrawal</label>
                                        <input type="text" class="form-control" name="totalwithdrawal" value="<?php echo $totalwithdrawal ?>" >
                                    </div>
                                    <div class="form-group mb-3">
                                        <label for="example-email-input" class="col-md-2 col-form-label">loan Limit</label>
                                        <input type="text" class="form-control"  name="loanlimit" value="<?php echo $loanlimit ?>" >
                                    </div>
                                     <div class="form-group mb-3">
                                        <label for="example-email-input" class="col-md-2 col-form-label">Available loan</label>
                                        <input type="text" class="form-control" name="availableloan" value="<?php echo $availableloan ?>" >
                                    </div>
                                    <div class="col-12">
                                        <input type="hidden" name="id" value="<?php echo $id ?>" />
                                        <div class="notifier"></div>
                                    </div>

                                    <div class="mb-0">
                                        <div>
                                            <button type="submit" name="submit" data-scroll="no" class="btn btn-pink waves-effect waves-light">Submit</button>
                                        </div>
                                    </div>
                                </form>

                            </div>
                        </div>
                    </div>
                    <!-- end col -->

            </div>
            <!-- container-fluid -->
			
			
			
        </div>
        <!-- End Page-content --><div class="side_notifier" style="display:none;"></div><script>$(document).ready(function(){ $(document).on('click', '.form-switch .input_switch', function(e) { $(this).parents('.post_with_ajax').submit(); }); $(document).on('click', '.tab_click', function(e) { var clicked = $(this), qRequest = clicked.data('req'), postID = clicked.data('id'), bInit = clicked.data('init'), bTag = clicked.data('tag'), bPost = clicked.data('pos'), output2 = $('#' + clicked.data('output2')), output3 = $('#' + clicked.data('output3')); if(clicked.data('output') == 'parent') var output = clicked.parents('td'); else var output = $('#' + clicked.data('output')); clicked.html(bInit + '...'); $.post('data/action/post_processor.php', {'source':'tab_requests','request':qRequest,'post_id':postID}, function(data) { var resp = JSON.parse(data); if(resp.status == 'success') { clicked.html(bPost + ' &check;').fadeIn(); if(clicked.data('output').indexOf('val:') > -1) output.val(resp.message); else output.html(resp.message); if(typeof clicked.data('output2') !== 'undefined') { if(clicked.data('output2').indexOf('val:') > -1) $('#' + clicked.data('output2').replace('val:', '')).val(resp.message2); else output2.html(resp.message2); } if(typeof clicked.data('output3') !== 'undefined') { if(clicked.data('output3').indexOf('val:') > -1) $('#' + clicked.data('output3').replace('val:', '')).val(resp.message3); else output3.html(resp.message3); } $('.clear_dataid').data('id', 0); } else if(resp.status == 'goto') $('.side_notifier').html(resp.message); else { clicked.html(bTag).fadeIn(); sideNotifier(resp.message, '', 5000); } }); }); $("body").on("input", ".form-control-range.power", function() { var activeRequest = $(this), amount = parseInt(activeRequest.val()), parentFrame = activeRequest.parents("#accordion"), dollarRate = parentFrame.find("#rangePrimary"), powerIn = parentFrame.find("#rangeSecondary"), timer = activeRequest.data("timer"), duration = activeRequest.data("duration"), rate = activeRequest.data("rate"); if(amount < 1) { dollarRate.val(0); powerIn.val(0); } else if(amount <= parseInt(activeRequest.attr("max"))) { var droper = (amount * rate / 100); if(timer == 'hourly') var tReturn = (droper * duration * 24); else if(timer == 'daily') var tReturn = (droper * duration); else if(timer == 'weekly') var tReturn = (droper * (duration / 7)); else if(timer == 'monthly') var tReturn = (droper * (duration / 30)); else if(timer == 'yearly') var tReturn = (droper * (duration / 365)); dollarRate.val(amount); powerIn.val(tReturn); } else sideNotifier("You don't have such amount in your hashpower/bonus wallets.", "", 5000); }); $(document).on('click', '.buy_crypto_hashrate', function(e) { var clicked = $(this), postid = clicked.data('packageid'), postGroup = clicked.data('group'), qRequest = typeof clicked.data('source') !== 'undefined' ? clicked.data('source') : 'auto', invType = clicked.data('type'), amount = clicked.data('amount'); clicked.html('Processing...'); $.post('data/action/post_processor.php', {'source':'transfers','request':qRequest,'type':invType,'package_id':postid,'package_group':postGroup,'amount':amount}, function(data) { if(data.indexOf('<script type=') > -1) { $('.side_notifier').html(data); } else { sideNotifier(data, '', 5000); clicked.html('Process'); } }); }); $(document).on('click', '.delete_item', function(e) { var clicked = $(this), postid = clicked.data('id'), postkey = clicked.data('key'), qRequest = clicked.data('source'); $.post('data/action/post_processor.php', {'source':'delete_list','request':qRequest,'post_id':postid,'post_key':postkey}, function(data) { var resp = JSON.parse(data); if(resp.status == 'success') { var tokn = fetchUniqueKey(15); clicked.parents('.tr').attr('id', tokn).fadeOut(); setTimeout(function() { document.getElementById(tokn).outerHTML = ''}, 1000); } else if(resp.status == 'goto') $('.side_notifier').html(resp.message); else { sideNotifier(resp.message, '', 5000); } }); }); $(document).on('click', '.fetch_list_info', function(e) { var clicked = $(this); if(typeof clicked.data('button') !== 'undefined') $('.modal_list_info button').html(clicked.data('button')); else $('.modal_list_info button').html('Save changes'); $('.modal_list_info #list_a').val(clicked.data('list_a')); $('.modal_list_info #list_b').val(clicked.data('list_b')); $('.modal_list_info #list_c').val(clicked.data('list_c')); $('.modal_list_info #list_d').val(clicked.data('list_d')); $('.modal_list_info #list_e').val(clicked.data('list_e')); $('.modal_list_info #list_f').val(clicked.data('list_f')); $('.modal_list_info #list_g').val(clicked.data('list_g')); $('.modal_list_info #list_h').val(clicked.data('list_h')); $('.modal_list_info #list_i').val(clicked.data('list_i')); $('.modal_list_info #list_j').val(clicked.data('list_j')); $('.modal_list_info #list_k').val(clicked.data('list_k')); $('.modal_list_info #list_l').val(clicked.data('list_l')); $('.modal_list_info #list_m').val(clicked.data('list_m')); $('.modal_list_info #list_n').val(clicked.data('list_n')); $('.modal_list_info #list_o').val(clicked.data('list_o')); $('.modal_list_info #list_p').val(clicked.data('list_p')); $('.modal_list_info #list_q').val(clicked.data('list_q')); $('.modal_list_info #list_r').val(clicked.data('list_r')); $('.modal_list_info #list_s').val(clicked.data('list_s')); $('.modal_list_info #list_t').val(clicked.data('list_t')); $('.modal_list_info #list_u').val(clicked.data('list_u')); $('.modal_list_info #list_v').val(clicked.data('list_v')); $('.modal_list_info #list_w').val(clicked.data('list_w')); $('.modal_list_info #list_x').val(clicked.data('list_x')); $('.modal_list_info #list_y').val(clicked.data('list_y')); $('.modal_list_info #list_z').val(clicked.data('list_z')); $('.modal_list_info #lister_a').html(clicked.data('lister_a')); }); $(document).on('submit','.reg.post_with_ajax', function(e) { e.preventDefault(); var form = $(this), submit = form.find('button[type="submit"]'), output = form.find('.notifier'), bInit = submit.data('init'), bTag = submit.data('tag'), bPost = submit.data('pos'), fReset = submit.data('reset'), pScroll = submit.data('scroll'), pAlert = submit.data('alert'); $.ajax({ url: 'data/action/post_processor.php', type: 'POST', data: new FormData( this ), processData: false, contentType: false, beforeSend: function() { if(typeof bInit !== 'undefined') submit.html(bInit + '...'); else submit.html('Saving...'); output.empty().fadeOut(); }, success: function(data) { if(data.trim() == 'completed') { typeof bPost !== 'undefined' ? submit.html(bPost + ' &check;') : submit.html('Saved &check;'); if(typeof fReset !== 'undefined' && fReset == 'yes') form.trigger('reset'); setTimeout(function(){ output.fadeOut() }, 3000); } else { typeof bTag !== 'undefined' ? submit.html(bTag) : submit.html('Save'); var resMessage = data, erTimeout = true, changeClass = '', stripedMessage = stripHTML(resMessage.trim()); if(stripedMessage.length <= 30) var sTimeout = 5000; else if(stripedMessage.length <= 60) var sTimeout = 8000; else if(stripedMessage.length <= 100) var sTimeout = 15000; else if(stripedMessage.length <= 150) var sTimeout = 22000; else if(stripedMessage.length <= 230) var sTimeout = 28000; else var sTimeout = 30000; if(pAlert == "modal") sideNotifier(stripedMessage, "", sTimeout); else {if(resMessage.indexOf('offTimout=true') > -1) var erTimeout = false, resMessage = resMessage.replace('offTimout=true', ''); if(resMessage.indexOf('warning=true') > -1) var changeClass = 'warning', resMessage = resMessage.replace('warning=true', ''); output.html(resMessage).addClass(changeClass).fadeIn(); if(erTimeout) setTimeout(function(){ output.fadeOut() }, sTimeout); if(pScroll != 'no') $('html, body').animate({scrollTop : output.offset().top},800); } } }, }); }); $(document).on('submit','#authenticationForm', function(e) { e.preventDefault(); var form = $(this), submit = $('button.btn.btn-primary'), output = $('#authenticationForm .output'); $.ajax({ url: 'data/request/auth.php', type: 'POST', dataType: 'html', data: form.serialize(), beforeSend: function() {if(form.hasClass('reg')) submit.html('Registering...'); else if(form.hasClass('rec')) submit.html('Sending Password...'); else if(form.hasClass('chng_pss')) submit.html('Updating Password...'); else submit.html('Login...'); }, success: function(data) { output.html(data); if(form.hasClass('reg')) submit.html('Register'); else if(form.hasClass('rec')) submit.html('Reset'); else if(form.hasClass('chng_pss')) submit.html('Update Password'); else submit.html('Login'); }, }); });}); function copyToClipboard(t, e) { var copyText = document.getElementById(e); copyText.select(); copyText.setSelectionRange(0, 99999); document.execCommand("copy"); t.html(t.data("aft")); var tokn = fetchUniqueKey(15); t.parents(".tr").attr("id", tokn); setTimeout(function() { document.getElementById(tokn).outerHTML = t.html(t.data("bef"))}, 5000); } function fetchUniqueKey(length) { var result = '', characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789', charactersLength = characters.length; for ( var i = 0; i < length; i++ ) { result += characters.charAt(Math.floor(Math.random() * charactersLength)); } return result; } function stripHTML(html){ var tmp = document.createElement("DIV"); tmp.innerHTML = html; return tmp.textContent || tmp.innerText || ""; } function sideNotifier(message, mType="", timer=4000) { $(".side_notifier").removeClass("error").removeClass("alert").removeClass("success"); var tokn = fetchUniqueKey(12); $(".side_notifier").attr("id", tokn).addClass(mType).html(message).fadeIn(); setTimeout( function() { $(".side_notifier#" + tokn).addClass("sw"); }, 100); setTimeout( function() { $(".side_notifier#" + tokn).removeClass("sw").fadeOut(); }, timer); setTimeout( function() { $(".side_notifier#" + tokn).empty().removeAttr("id"); }, (timer + 500)); } setInterval('$.post("data/request/crone_job.php");', 10000); function loginUser() { window.location.href = ''; } </script>

<!-- JAVASCRIPT -->

<script src="data/assets/libs/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="data/assets/libs/metismenu/metisMenu.min.js"></script>
<script src="data/assets/libs/simplebar/simplebar.min.js"></script>
<script src="data/assets/libs/node-waves/waves.min.js"></script>
<script src="data/assets/libs/datatables.net/js/jquery.dataTables.min.js"></script>
<script src="data/assets/libs/datatables.net-bs4/js/dataTables.bootstrap4.min.js"></script>
<script src="data/assets/libs/datatables.net-buttons/js/dataTables.buttons.min.js"></script>
<script src="data/assets/libs/datatables.net-buttons-bs4/js/buttons.bootstrap4.min.js"></script>
<script src="data/assets/libs/jszip/jszip.min.js"></script>
<script src="data/assets/libs/pdfmake/build/pdfmake.min.js"></script>
<script src="data/assets/libs/pdfmake/build/vfs_fonts.js"></script>
<script src="data/assets/libs/datatables.net-buttons/js/buttons.php5.min.js"></script>
<script src="data/assets/libs/datatables.net-buttons/js/buttons.print.min.js"></script>
<script src="data/assets/libs/datatables.net-buttons/js/buttons.colVis.min.js"></script>
<script src="data/assets/libs/datatables.net-responsive/js/dataTables.responsive.min.js"></script>
<script src="data/assets/libs/datatables.net-responsive-bs4/js/responsive.bootstrap4.min.js"></script>
<script src="data/assets/js/pages/datatables.init.js"></script>
<script src="data/assets/js/app.js"></script>
        
    </div>
    <!-- end main content-->

</div>
<!-- END layout-wrapper -->


<!-- Right bar overlay-->
<div class="rightbar-overlay"></div>


</body></html>