<?php require_once('head.php'); ?>

  <body>
  <!-- container section start -->
  <section id="container" class="">
      
	<?php require_once('header.php'); ?>	

	<?php require_once('sidebar.php'); ?>
      
      <!--main content start-->
      <section id="main-content">
          <section class="wrapper">

			  <div class="row">
                  <div class="col-lg-12">
                      <!--breadcrumbs start -->
                      <ul class="breadcrumb">
                          <li><a href="dashboard.php"><i class="icon_house_alt"></i> Home</a></li>
                          <li class="active"> Transfers</li>
						  <li class="pull-right"> <i class="icon_calendar"></i>
							 <?php echo date('l jS F Y'); ?></li>
                      </ul>
                      <!--breadcrumbs end -->
                  </div>
              </div>		  
			  
			  <div class="row">
					<div class="col-lg-12">
					<section class="panel panel-body">
					<h3><?php echo WEB_NAME ?></h3>
					<h4>TRANSFERS</h4>
					<p>List of all transfer attempts by clients.</p>
					</section>
					</div>
              </div>
			  
			  <!-- Recent Transactions Starts -->
			  <div class="row">
                  <div class="col-lg-12">
                      <section class="panel">
                          <header class="panel-heading">
                              Accounts
                          </header>
						  
						  <div class="panel-body">
						  
                          <table class="table table-striped border-top" id="sample_1">
  <thead>
    <tr>     
      <th>Date</th>
											<th>User ID</th>
											<th>Details</th>
											<th>Amount</th>
											<th>Status</th>
    </tr>
  </thead>
  <tbody>
	<?php
										dbconnect();
										$sql = "SELECT * FROM `".TRANF_TABLE_NAME."` ORDER BY atmpt_date DESC";
										$stmt = $pdo->query($sql);
										while($row = $stmt->fetch(PDO::FETCH_ASSOC)){ 
									?>  
    <tr class="odd gradeX">
        <td><?php echo date('jS F Y', strtotime($row['atmpt_date'])); ?></td>
											<td><?php echo $row['user_name']; ?></td>
											<td>Transfer to (<?php echo $row['rcv_acc']; ?>) <?php echo $row['rcv_name']; ?> in <?php echo $row['rcv_bk']; ?> - Code:<?php echo $row['rcv_code']; ?> </td>
											<td><?php echo number_format($row['atmpt_amt'],2); ?></td>
											<td><?php if ($row['status'] == "1"){ echo '<span class="label label-success">Completed</span>';}
											else{ echo '<span class="label label-danger">Pending</span>';} ?></td>
    </tr>
    <?php } ?>
  </tbody>
</table>
						</div>
                      </section>
                  </div>
              </div>
			  <!-- Recent Transactions end -->

              

          </section>
      </section>
      <!--main content end-->
  </section>
  <!-- container section start -->

    <!-- javascripts -->
    <script src="../js/jquery.js"></script>
    <script src="../js/bootstrap.min.js"></script>
    <!-- nice scroll -->
    <script src="../js/jquery.scrollTo.min.js"></script>
    <script src="../js/jquery.nicescroll.js" type="text/javascript"></script>
    <!-- data tables js -->
    <script type="text/javascript" src="../assets/data-tables/jquery.dataTables.js"></script>
    <script type="text/javascript" src="../assets/data-tables/DT_bootstrap.js"></script>
    <!-- dynamic table cuatom script for this page only-->
    <script src="../js/dynamic-table.js"></script>
    <!--custome script for all page-->
    <script src="../js/scripts.js"></script>

  </body>
</html>