<?php 
session_start();
include('conn_auth.php');
include('customInfo.php');
include 'outputfunction.php';
?>

<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="author" content="PWB">
    <meta name="keyword" content="Investment, Pacific Western, Finance, Co-operate world, Bank"> 
    <meta name="description" content="Pacific Western">
    <meta property="og:title" content="PWB">
    <meta property="og:description" content="Pacific Western">
    

<title><?php echo $rowUser['cust_name']; ?> | Account Statement </title>

 <link href="img/favicon.png" rel="icon">
    <!-- Bootstrap Core CSS -->
    <link href="mz/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">

    <!-- MetisMenu CSS -->
    <link href="mz/metisMenu/metisMenu.min.css" rel="stylesheet">

    <!-- Custom CSS -->
    <link href="mz/dist/css/sb-admin-2.css" rel="stylesheet" type="text/css">

    <link href="mz/dist/css/main_page.css" rel="stylesheet">

    <!-- Morris Charts CSS -->
    <link href="mz/vendor/morrisjs/morris.css" rel="stylesheet">

    <!-- Custom Fonts -->
    <link href="lib/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">

      
     
     <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

</head>

<body style="font-size: 14px;">

    <div id="wrapper">
       <!-- first tpp div for main page-->
            <?php include('m_header.php'); ?>

            <!-- /.navbar-header -->
           <?php  include('sidbar.php'); ?>
            <!--Navbar is here incase there will  be navigator <?php  include('sidebar.php'); ?> bar -->
            <!-- /.navbar-static-side -->
        </nav>

        <div id="page-wrapper" >
          
  <!-- /.row -->
           <div class="row" style="margin-top: 30px;">
              <!-- /.col-lg-8 -->
            <div class="col-lg-12">
                 <!-- /.col-lg-4 -->
          <div class="col-lg-12">
             <div class="panel panel-default">
                <div class="panel-heading">
                <!-- /.panel-heading -->
                  <div class="pInfo">
                       <div>
    
    <h2>Transaction History</h2>
    
    <div class="portfolio-page">
                 <?php
         $selPrevtransfer = $conn->query("select * from  transfer_info where acct_nmb = '" . $rowUser['acct_nmb'] . "' order by trans_id DESC limit 0, 10") or die($conn->error);
         if(!$selPrevtransfer->num_rows){
          ?>
       <div class="n-prev-tr">You do not have any history of previous transactions 
       
       <span> Click <a href="?transID=0">here to start</a> a new transfer </span>
     </div>
          <?php

             }else{
         ?> 
  <div class="" style="margin-bottom:30px;">
  <div class="pInfo">
   <div class="">
 <div class="">
  <?php 
   while ($rowTransfer = $selPrevtransfer->fetch_array()) {
    
   switch ($rowTransfer['trans_stat']) {
      case "Enter code 1":
        $mtrans_stat="Pending";
        break;
        case "Enter code 2":
        $mtrans_stat="Pending";
        break;
        case "Enter code 3":
        $mtrans_stat="Pending";
        break;
      case "Stage 1 confirmed":
        $mtrans_stat="Pending";
        break;
        case "Stage 2 confirmed":
        $mtrans_stat="Pending";
        break;
        case "Stage 3 confirmed":
        $mtrans_stat="Pending";
        break;
      default:
        $mtrans_stat="Completed";
        break;
    } 
    if($mtrans_stat != "Completed"){
        $mcolor = "#ff0000";
    }else{
        $mcolor = "#449464";
    }
  ?>
  
  <a href="trasactions-details?id=<?php echo $rowTransfer['trans_id']; ?>" class="list-group-item list-group-item-action list-drop-grp flex-column align-items-start">
    <div class="d-flex w-100 justify-content-between list-content-grp">
      <h5 class="mb-1"><?php echo $rowTransfer['ben_name']; ?></h5>
      <span style="color: <?php echo $mcolor; ?>"><small><?php echo $mtrans_stat; ?></small></span>
    </div>
    <div class="btm-lstgroup-cover">
    <p><b><?php echo getCurrency($rowcurr['curr_type']). number_format($rowTransfer['amt_trans'], 2, '.', ','); ?> </b></p>
    <small><?php echo $rowTransfer['date_trans']; ?></small>
    </div>
  </a>
  <?php
  }
  ?>
</div>
<?php
}
?>
   </div>
   </div>
   </div>
   </div>
   
                               
                                   
            </div>
                        </div>
                <!-- /.panel-body -->
              </div>
          </div>
          </div>    

        </div>
        <!-- /#page-wrapper -->  

    </div>
    <!-- /#wrapper -->

    <!-- jQuery -->
    <script src="mz/vendor/jquery/jquery.min.js"></script>

    <!-- Bootstrap Core JavaScript -->
    <script src="mz/vendor/bootstrap/js/bootstrap.min.js"></script>

    <!-- Metis Menu Plugin JavaScript -->
    <script src="mz/vendor/metisMenu/metisMenu.min.js"></script>

    <!-- Morris Charts JavaScript -->
    <script src="mz/vendor/raphael/raphael.min.js"></script>
    <script src="mz/vendor/morrisjs/morris.min.js"></script>
    <script src="mz/data/morris-data.js"></script>

    <!-- Custom Theme JavaScript -->
    <script src="mz/dist/js/sb-admin-2.js"></script>
   <script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
   <script src="https://bitcoinaverage.com/js/widgetGenerator/widgetUserScript.js"></script>
</body>

</html>
