<?php
ini_set('display_errors', 1);
error_reporting(E_ALL);


session_start();

require_once("../config.php");





// Check if user is logged in
if (!isset($_SESSION['SESS_LOGGEDIN']) || $_SESSION['SESS_LOGGEDIN'] !== true) {
    header("Location: " . $config_basedir . "logout.php");
    exit();
}


 

?>



 
  <!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1">

 <title><?php echo $title ?></title>
  <meta charset="utf-8">

     <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<style>
.flex-container {
  display: flex;
  flex-direction: column;
  background-color: #fff;
}

.flex-container > div {
  background-color: #f1f1f1;
  width: 75;
  margin: 50px;
  text-align: center;
  line-height: 100px;
  font-size: 30px;
}
</style>
 
      <style>
.loader {
  border: 16px solid black;
  border-radius: 50%;
  border-top: 16px solid #3399ff;
  width: 125px;
  height: 125px;
  -webkit-animation: spin 2s linear infinite; /* Safari */
  animation: spin 2s linear infinite;
}

/* Safari */
@-webkit-keyframes spin {
  0% { -webkit-transform: rotate(0deg); }
  100% { -webkit-transform: rotate(360deg); }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
</style>
 <style>
.alert {
  padding: 25px;
  background-color: #3399ff;
  color: white;
}

.closebtn {
  margin-left: 10px;
  color: white;
  font-weight: bold;
  float: right;
  font-size: 45px;
  line-height: 20px;
  cursor: pointer;
  transition: 50s;
}

.closebtn:hover {
  color: black;
}
</style>
  
</head>










<?php
$seller = $_SESSION['SESS_USERID'];

$stmt = $pdo->prepare("SELECT * FROM logins WHERE id = ?");
$stmt->execute([$seller]);
$serow = $stmt->fetch(PDO::FETCH_ASSOC);

$forename = $serow['firstname'];
$surname  = $serow['lastname'];
$add1     = $serow['country'];
$add3     = $serow['state'];
$city     = $serow['city'];
$currency = $serow['currency'];
$curr     = $serow['currency'];
$phone    = $serow['phone'];
$email    = $serow['email'];
$acc_no   = $serow['acc_no'];
?>

   
<?php

$id = $_SESSION['SESS_USERID'];

$stmt = $pdo->prepare("SELECT * FROM transactions WHERE log_id = ? ORDER BY id DESC LIMIT 1");
$stmt->execute([$id]);
$serow = $stmt->fetch(PDO::FETCH_ASSOC);

$trans_amount = $serow['trans_amount'];
?>

<body onpageshow="myFunction()">

<body>



<div class="flex-container">
  <div>
  
  
   <div style="min-height:100px;">
       
      
      <div id="errorMsgNa" style="margin:10px 10px 10px 10px; font-style:normal; color:green; font-weight:bold; text-align:center; font-size:11px; font-style:italic;">
          
              <td style="padding:1px 1px; background:#014E72; color:#fff; text-align:center; font-style:italic;" colspan="0.5">
        Your Fund Transfer of <?php echo  $trans_amount ?> <?php echo  $cur ?> from Account (<span style="color:grey; font-weight:bold;"><?php echo  $acc_no ?></span>) was successful. 
        
     <center>
         
          
            <div class='loader'> </div><br>
    <strong> Completed...  </strong> :  You will be redirected shortly to see your account summary... 
    
     </center>
    
    <meta http-equiv='refresh' content='5; url=account-summary.php' />
       </td>
                              
      </div>
  
        
        
        
          
      </div>
      
       
          </div>
          </td>
        </tr>
        
        
        
        
        
          </table>
        
        </form>
      
     
    
        </div> </div> </div> </div>
              
              
        
                    </div><!-- /.post -->

  
  </div>
 
</div>

</body>
</html>

<script>
function myFunction() {
  alert("Transaction Completed!");
}
</script>