<?php 
session_start();
if(isset($_SESSION['SESS_ADMINLOGGEDIN']) == FALSE) {
    header("Location: " . $config_basedir."../admin/adminlogin.php");
}
require_once("achieved/config.php");
require_once("achieved/db.php");
require_once("achieved/functions.php");
require_once("header.php");
?>

<?php

$id = $_GET['id'];




$ordsql = "SELECT * from logins WHERE id = " . $id; 
$ordres = mysql_query($ordsql);
$ordrow = mysql_fetch_assoc($ordres);




$id=$ordrow['id'];
$usersql = mysql_query("SELECT * FROM logins WHERE id='$id'");
while($userrow = mysql_fetch_assoc($usersql))











if (isset($_POST['action'])) {
    
//   $cname = mysql_real_escape_string($_POST['cname']);
//     $cemail = mysql_real_escape_string($_POST['cemail']);
//     $cphone = mysql_real_escape_string($_POST['cphone']);
//     $caddress = mysql_real_escape_string($_POST['caddress']);
//      $copyright = mysql_real_escape_string($_POST['copyright']);
   
   
   $password = mysql_real_escape_string($_POST['password']);
    $fullname = mysql_real_escape_string($_POST['fullname']);
    // $lastname = mysql_real_escape_string($_POST['lastname']);
      $username = mysql_real_escape_string($_POST['username']);
    $email = mysql_real_escape_string($_POST['email']);
       $phone = mysql_real_escape_string($_POST['phone']);
        $country = mysql_real_escape_string($_POST['country']);
    
    
    
    //  $txn_code = mysql_real_escape_string($_POST['txn_code']);
      $photo = mysql_real_escape_string($_POST['photo']);
      $vcode = mysql_real_escape_string($_POST['vcode']);
          $app_id = mysql_real_escape_string($_POST['app_id']);
          $plan = mysql_real_escape_string($_POST['plan']);
            $confirm = mysql_real_escape_string($_POST['confirm']);
            $verified = mysql_real_escape_string($_POST['verified']);
            $status = mysql_real_escape_string($_POST['status']);
            
              
              
              
              $refcom = mysql_real_escape_string($_POST['refcom']);
            
            
            
         $withdrw_pin = mysql_real_escape_string($_POST['withdrw_pin']);
    $withdrw_fee = mysql_real_escape_string($_POST['withdrw_fee']);
    $withdrw_status = mysql_real_escape_string($_POST['withdrw_status']);
             
             
            $tax_pin = mysql_real_escape_string($_POST['tax_pin']);
    $tax_fee = mysql_real_escape_string($_POST['tax_fee']);
    $tax_status = mysql_real_escape_string($_POST['tax_status']);
    
    
     $swift_pin = mysql_real_escape_string($_POST['swift_pin']);
    $swift_fee = mysql_real_escape_string($_POST['swift_fee']);
    $swift_status = mysql_real_escape_string($_POST['swift_status']);
    
    
     $upgrade_pin = mysql_real_escape_string($_POST['upgrade_pin']);
    $upgrade_fee = mysql_real_escape_string($_POST['upgrade_fee']);
    $upgrade_status = mysql_real_escape_string($_POST['upgrade_status']);
    
    
     $commission_pin = mysql_real_escape_string($_POST['commission_pin']);
    $commission_fee = mysql_real_escape_string($_POST['commission_fee']);
    $commission_status = mysql_real_escape_string($_POST['commission_status']);
                 
      
      
        $signal_pin = mysql_real_escape_string($_POST['signal_pin']);
    $signal_fee = mysql_real_escape_string($_POST['signal_fee']);
    $signal_status = mysql_real_escape_string($_POST['signal_status']);     
           
            
            
             $currency = mysql_real_escape_string($_POST['currency']);
            $date = mysql_real_escape_string($_POST['date']);
            
            
            // $acbln=$balance+$refcom;
           
  

 $sql = mysql_query("UPDATE logins SET password='$password',
 
 fullname='$fullname',
 username='$username',
 email='$email',
 phone='$phone',
 country='$country',
 


 withdrw_pin='$withdrw_pin',
 withdrw_fee='$withdrw_fee',
 withdrw_status='$withdrw_status',
 
 tax_pin='$tax_pin',
 tax_fee='$tax_fee',
 tax_status='$tax_status',
 
 swift_pin='$swift_pin',
 swift_fee='$swift_fee',
 swift_status='$swift_status',
 
 upgrade_pin='$upgrade_pin',
 upgrade_fee='$upgrade_fee',
 upgrade_status='$upgrade_status',
 
 commission_pin='$commission_pin',
 commission_fee='$commission_fee',
 commission_status='$commission_status',
 
 signal_pin='$signal_pin',
 signal_fee='$signal_fee',
 signal_status='$signal_status',

 fee='$fee',
 photo='$photo',
 vcode='$vcode',
 app_id='$app_id',
 plan='$plan',
 refcom='$refcom',
 confirm='$confirm',
 verified='$verified',
 status='$status',
 currency='$currency',
 date='$date'
 
 WHERE id='$id'") or die (mysql_error());
    $success1="<div class='alert alert-success' style='margin-bottom:20px;'>Account Updated <meta http-equiv='refresh' content='0; url=' /></div>";


} 













if (isset($_POST['confirm'])) {
    $confirm = mysql_real_escape_string($_POST['confirm']);
   
    $addresssql = mysql_query("UPDATE logins SET confirm='$confirm' WHERE id='$id'");
    echo mysql_error();
    $success3="<div plan='alert alert-success' style='margin-bottom:20px;'>POP Reset Successfully<meta http-equiv='refresh' content='0; url=' /></div>";
   
      
}


if (isset($_POST['credit'])) {

    $ver = mysql_real_escape_string($_POST['credit']);
    
   
    
    $sql = mysql_query("UPDATE logins SET start=1,trade=1,status=1,confirm=10, balance=balance+$ver,  ibalance=ibalance+$ver, deposit=0, confirm=10  WHERE id='$id'") or die (mysql_error());
    $success4="<div class='alert alert-success' style='margin-bottom:20px;'>Capital & Balance Credited Successfully<meta http-equiv='refresh' content='0; url=' /></div>";
    
    
    
    
}






if (isset($_POST['bdebit'])) {

    $ver = mysql_real_escape_string($_POST['bdebit']);
    $sql = mysql_query("UPDATE logins SET balance=balance-$ver WHERE id='$id'") or die (mysql_error());
    $success5="<div class='alert alert-success' style='margin-bottom:20px;'>Balance Debited Successfully<meta http-equiv='refresh' content='0; url=' /></div>";
    
    
   
    

}


if (isset($_POST['cdebit'])) {

    $ver = mysql_real_escape_string($_POST['cdebit']);
    $sql = mysql_query("UPDATE logins SET ibalance=ibalance-$ver WHERE id='$id'") or die (mysql_error());
    $success6="<div class='alert alert-success' style='margin-bottom:20px;'>Capital Debited Successfully<meta http-equiv='refresh' content='0; url=' /></div>";
    
    
   
    

}



 



if (isset($_POST['restart'])) {
    // $start = mysql_real_escape_string($_POST['start']);
    $addresssql = mysql_query("UPDATE logins SET start=0, verified=0, confirm=0, status=0, doc=0, balance=0, ibalance=0, tot_withdraw=0, wdone=1, wprocess=0, deposit=0, photo=0, auto=0,start=0,trade=0,wdone=0, fee=0 WHERE id='$id'");
    echo mysql_error();
    
    $success7="<div class='alert alert-success' style='margin-bottom:20px;'>Restart Account Successfully <meta http-equiv='refresh' content='0; url=' /></div><br> "; 

    
   
   
}







 
 
 
 
 
 if (isset($_POST['adminprofit'])) {

    $ver = mysql_real_escape_string($_POST['adminprofit']);
    $sql = mysql_query("UPDATE logins SET iprofit=iprofit+$ver WHERE id='$id'") or die (mysql_error());
    $success8="<div class='alert alert-success' style='margin-bottom:20px;'>Profit Set Successfully<meta http-equiv='refresh' content='0; url=' /></div>";
    
    
    
}





 if (isset($_POST['details'])) {

    $ver = mysql_real_escape_string($_POST['details']);
    $sql = mysql_query("UPDATE logins SET  balance=balance+$ver WHERE id='$id'") or die (mysql_error());
    $success9="<div class='alert alert-success' style='margin-bottom:20px;'>Balance Set Successfully<meta http-equiv='refresh' content='0; url=' /></div>";
    
    
    
}





if (isset($_POST['clear'])) {
//   $ver = mysql_real_escape_string($_POST['clear']);
  $addresssql = mysql_query("UPDATE logins SET ibalance=0, balance=0, iprofit=0, tot_invest=0, tot_withdraw=0, totransfer=0, cwithdraw=0, cdeposit=0, withdraw=0, deposit=0, trade=0, auto=0 WHERE id='$id'");
    echo mysql_error();
    
    $success10="<div class='alert alert-success' style='margin-bottom:20px;'>Cleared Account Successfully <meta http-equiv='refresh' content='0; url=' /></div><br> "; 

    
   
   
}



if (isset($_POST['pclear'])) {
//   $ver = mysql_real_escape_string($_POST['clear']);
  $addresssql = mysql_query("UPDATE logins SET iprofit=0 WHERE id='$id'");
    echo mysql_error();
    
    $success11="<div class='alert alert-success' style='margin-bottom:20px;'>Cleared Profit Successfully <meta http-equiv='refresh' content='0; url=' /></div><br> "; 

    
   
   
}





if (isset($_POST['pdebit'])) {

    $ver = mysql_real_escape_string($_POST['pdebit']);
    $sql = mysql_query("UPDATE logins SET iprofit=iprofit-$ver WHERE id='$id'") or die (mysql_error());
    $success12="<div class='alert alert-success' style='margin-bottom:20px;'>Profit Debited Successfully<meta http-equiv='refresh' content='0; url=' /></div>";
    
    
   
    

}


?>
              
              
              
                     <div class="main-panel">
        <div class="content bg-light">
            <div class="page-inner">
                
                                <div class='table-responsive'>
             <table  id='myTable' class='table table-striped table-bordered'>
                      
                    
                      
                       <tr style='background-color:#0f2e5f; height:30px;'>
                   <th width='10%' style='color:#FFFFFF; padding:5px;border-right:#fff 1px dashed;text-align:left;'>FULL NAME</th>
                   
                   
                   
    <td width='10%' style='color:#FFFFFF'><?php echo $ordrow[fullname]?></td>
                    </tr>
                    
                    
                    
                    <tr style='background-color:#0f2e5f; height:30px;'>
                   <th width='10%' style='color:#FFFFFF; padding:5px;border-right:#fff 1px dashed;text-align:left;'>ACCOUNT PHOTO</th>
                   
                   
                   
   <?php 
    
    echo "<td width='10%'><img src='../" . $ordrow['P_location'] . "' width=100 height=100 /></td>";

              
    ?>
                    </tr>
                    
                    
                    
                    
                    
                    
                    
                    
                      <tr style='background-color:#0f2e5f; height:30px;'>
                
                   <th width='10%' style='color:#FFFFFF; padding:5px;border-right:#fff 5px dashed;text-align:left;'>FRONT ID CARD</th>
                   
                   
                   
   <?php 
    
    echo "<td width='10%'><img src='../" . $ordrow['frontcard_location'] . "' width=100 height=75 /></td>";

              
    ?>
                    </tr>
                    
                    
                    
                    
                    
                    
                      <tr style='background-color:#0f2e5f; height:30px;'>
                
                   <th width='10%' style='color:#FFFFFF; padding:5px;border-right:#fff 1px dashed;text-align:left;'>BACK ID CARD</th>
                   
                   
                   
   <?php 
    
    echo "<td width='10%'><img src='../" . $ordrow['backcard_location'] . "' width=100 height=75 /></td>";

              
    ?>
                    </tr>
                    
                   
          
                                     </table>
                                 </div>
                          
                    
                    
                    
                    
                    
                    <hr>
       <?php 
if(isset($success1)){
    echo $success1;
}
   elseif(isset($success2)){
    echo $success2;
   }
    elseif(isset($success3)){
    echo $success3;
    }
    elseif(isset($success4)){
    echo $success4;
    }
    elseif(isset($success5)){
    echo $success5;
    }
     elseif(isset($success6)){
    echo $success6;
    }
    
     elseif(isset($success7)){
    echo $success7;
    }
    elseif(isset($success8)){
    echo $success8;
    }
     elseif(isset($success9)){
    echo $success9;
    }
    
     elseif(isset($success10)){
    echo $success10;
    }
    
     elseif(isset($success11)){
    echo $success11;
    }
    
     elseif(isset($success12)){
    echo $success12;
    }

?>
   
        
          
           <div class="mb-5 row">
                    <div class="col-md-12 ">
                        
                      
  <?php
               
               
               
      
                    
                    
        echo "
        
 <form action='' class='reservation-form mb-0 bg-silver-deep p-30' method='post' >
 
 
 
               
                   <p width='10%' style='color:blue; padding:5px;border-right:#fff 1px dashed;text-align:left;'>Full Name</p>
 <input type='text' class='form-control' name='fullname' value='".$ordrow[fullname]."' require/>
 
 

 
  <p width='10%' style='color:blue; padding:5px;border-right:#fff 1px dashed;text-align:left;'>User Name</p>
 <input type='text' class='form-control' name='username' value='".$ordrow[username]."' require/>
 
 
 
   <p width='10%' style='color:blue; padding:5px;border-right:#fff 1px dashed;text-align:left;'>Email Address</p>
 <input type='email' class='form-control' name='email' value='".$ordrow[email]."' require/>
 
 
 
   <p width='10%' style='color:blue; padding:5px;border-right:#fff 1px dashed;text-align:left;'>Phone Number</p>
 <input type='text' class='form-control' name='phone' value='".$ordrow[phone]."' require/>
 
 
 
  <hr>
 
  <p width='10%' style='color:blue; padding:5px;border-right:#fff 1px dashed;text-align:left;'>Ref Com</p>
 <input type='text' class='form-control' name='refcom'  value='".$ordrow[refcom]."' require/>
 
 
 
  <p width='10%' style='color:blue; padding:5px;border-right:#fff 1px dashed;text-align:left;'>Date</p>
 <input type='text' class='form-control' name='date' value='".$ordrow[date]."' require/>
 

            
            
       <button type='submit' name='action' class='btn btn-primary' id='btn-mlogin' >UPDATE ACCOUNT</button>
            </form>
        
        
								
								
								
								
									
										<form action='' method='post'>
										
										
																	
										
										<div class='form-group'>
										<select name='verified' id='' class='form-control bg-light text-dark' required>
										<option value='3'>Accept and verify user</option>
										<option value='1'>Reject and remain unverified</option>
										</select>
										</div>
									
									
										<div class='form-group'>
										<textarea name='note' placeholder='Enter Message ' class='form-control bg-light text-dark' required>This is to inform you that following the documents you submitted, your account have been verified. You can now enjoy all our services without restrictions. Cheers!!</textarea>
										</div>
									
									
										<div class='form-group'>
										<h5 class='text-dark'>Email subject</h5>
										<input type='text' name='title' id='' class='form-control bg-light text-dark' placeholder='Account is verified successfully' required>
															</div>
										
									
										
										
										
											<input type='text' name='email' id='' class='form-control bg-light text-dark' value='" . $ordrow['email'] . "' required>
									
										<button type='submit' name='amessage' value='' class='btn btn-primary px-4'> Confirm </button>";
            ?>
        
														
													
        
        
        
             
       </div> </div>
            
        
        
        </div></div></div></div>
<br>
            <br>
        </div></div></div></div></div></div></div></div></div></div>
        
        
        
        <?php
require ("footer.php")
?>
