<?php
session_start();
include_once ('conn/session.php');
require_once 'conn/controller.php';
if(!isset($_SESSION['uname'])){
header("Location: user_login.php");

exit(); 
}
 
$reg_user = new USER();

$stmt = $reg_user->runQuery("SELECT * FROM account WHERE uname=:uname");
$stmt->execute(array(":uname"=>$_SESSION['uname']));
$row = $stmt->fetch(PDO::FETCH_ASSOC);

$email = $row['email'];

$temp = $reg_user->runQuery("SELECT * FROM transfer WHERE email = '$email' ORDER BY id DESC LIMIT 1");
$temp->execute(array(":uname"=>$_SESSION['uname']));
$rows = $temp->fetch(PDO::FETCH_ASSOC);

include_once ('counter.php');
?>


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

<head>
  <!-- Required meta tags -->
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
 <meta name="description" content="Manage your banking and business in one place. Open a business bank account in 5 minutes, built to help 
you succeed. Entrepreneurs ðŸ’œ <?php echo $site_title; ?>"> 
<meta name="ROBOTS" content="NOINDEX, NOFOLLOW">
<title>Dashboard |  Business account for entrepreneurs</title> 
  <!-- plugins:css -->
  <link rel="stylesheet" href="vendors/feather/feather.css">
  <link rel="stylesheet" href="vendors/ti-icons/css/themify-icons.css">
  <link rel="stylesheet" href="vendors/css/vendor.bundle.base.css">
  <!-- endinject -->
  <!-- Plugin css for this page -->
  <link rel="stylesheet" href="vendors/datatables.net-bs4/dataTables.bootstrap4.css">
  <link rel="stylesheet" href="vendors/ti-icons/css/themify-icons.css">
  <link rel="stylesheet" type="text/css" href="js/select.dataTables.min.css">
  <!-- End plugin css for this page -->
  <!-- inject:css -->
  <link rel="stylesheet" href="css/vertical-layout-light/style.css">
  <!-- endinject -->
  <link rel="shortcut icon" href="images/favicon.png" />
  <meta property="og:image" content="images/logo2.png">
  
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">   
  
  
  
  
  
 
    <link rel="stylesheet" href="https://kendo.cdn.telerik.com/2017.1.223/styles/kendo.common.min.css" />
<!--      <link rel="stylesheet" href="https://kendo.cdn.telerik.com/2017.1.223/styles/kendo.black.min.css" />
    <link rel="stylesheet" href="https://kendo.cdn.telerik.com/2017.1.223/styles/kendo.black.mobile.min.css" /> -->

    <script src="https://kendo.cdn.telerik.com/2017.1.223/js/jquery.min.js"></script>
    <script src="https://kendo.cdn.telerik.com/2017.1.223/js/jszip.min.js"></script>
    <script src="https://kendo.cdn.telerik.com/2017.1.223/js/kendo.all.min.js"></script>
  
  
  
  
  
  
  
  
  
  <style>
.alert {
  padding: 20px;
  background-color: #04AA6D;
  color: white;
}

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

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

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<script type="text/javascript">
$(window).load(function () {
    $("#loader").fadeOut(1000);
});
</script>

<style>
 #loader
{
    position: fixed;
    z-index: 9999999;
    left: 0px;
    top: 0px;
    width: 100%;
    height: 100%;
    background: url('images/loader.gif') 50% 50% no-repeat #f9f9f9;
}
</style>

 

<style>
     
 

.stamp {
  transform: rotate(12deg);
	color: #555;
	font-size: 3rem;
	font-weight: 700;
	border: 0.25rem solid #555;
	display: inline-block;
	padding: 0.25rem 1rem;
	text-transform: uppercase;
	border-radius: 1rem;
	font-family: 'Courier';
	-webkit-mask-image: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/8399/grunge.png');
  -webkit-mask-size: 944px 604px;
  mix-blend-mode: multiply;
}

.is-nope {
  color: #D23;
  border: 0.5rem double #D23;
  transform: rotate(3deg);
	-webkit-mask-position: 2rem 3rem;
  font-size: 2rem;  
}

.is-approved {
	color: #0A9928;
	border: 0.5rem solid #0A9928;
	-webkit-mask-position: 13rem 6rem;
	transform: rotate(-14deg);
  border-radius: 0;
} 

.is-draft {
	color: #C4C4C4;
	border: 1rem double #C4C4C4;
	transform: rotate(-5deg);
  font-size: 6rem;
  font-family: "Open sans", Helvetica, Arial, sans-serif;
  border-radius: 0;
  padding: 0.5rem;
} 
 </style>



</head>

<body  >
    <div id="loader"></div>
  <div class="container-scroller">
    <!-- partial:partials/_navbar.html -->
    <nav class="navbar col-lg-12 col-12 p-0 fixed-top"  >
      <div class="text-center navbar-brand-wrapper d-flex align-items-center justify-content-center" style="background-color:#686e95; color:white;">
        <a href=""><img src="images/logo.png" height="40px" alt="logo"/></a>
      </div>
      <div class="navbar-menu-wrapper d-flex align-items-center justify-content-end" style="background-color:#686e95; color:white">
        <button class="navbar-toggler navbar-toggler align-self-center" type="button" data-toggle="minimize">
          <span >||||</span>
        </button>
        <ul class="navbar-nav mr-lg-2">
          <li class="nav-item nav-search d-none d-lg-block">
            <h5 style="color:white; font-weight:700;">LOGIN IP/TCP: <?php echo $_SERVER['REMOTE_ADDR']; ?> &nbsp; Access/Time: <?php echo date("d M Y"); ?></h5>
          </li>
        </ul>
        <ul class="navbar-nav navbar-nav-right">
          
          <li class="nav-item nav-profile dropdown">
            <a class="nav-link dropdown-toggle" href="#" data-toggle="dropdown" id="profileDropdown">
              Secured Enviroment
            </a>
            <div class="dropdown-menu dropdown-menu-right navbar-dropdown" aria-labelledby="profileDropdown">
              <a class="dropdown-item" href="user_password.php">
                <i class="ti-settings text-primary"></i>
                Settings
              </a>
              <a class="dropdown-item" href="logout.php">
                <i class="ti-power-off text-primary"></i>
                Logout
              </a>
            </div>
          </li>
       
        </ul>
        <button class="navbar-toggler navbar-toggler-right d-lg-none align-self-center" type="button" data-toggle="offcanvas">
          <span class="icon-menu"></span>
        </button>
      </div>
    </nav>
    <!-- partial -->
    <div class="container-fluid page-body-wrapper">
      <!-- partial:partials/_settings-panel.html -->
 
 
      <!-- partial -->
      <!-- partial:partials/_sidebar.html -->
      <nav class="sidebar sidebar-offcanvas" id="sidebar">
        <ul class="nav">
          <li class="nav-item">
            <a class="nav-link" href="user_home.php">
             <i class="fa fa-bank" style="font-size:22px;color:black"></i>&nbsp;
              <span class="menu-title">Dashboard</span>
            </a>
          </li>
          <li class="nav-item">
            <a class="nav-link" data-toggle="collapse" href="#ui-basic" aria-expanded="false" aria-controls="ui-basic">
           <i class="fa fa-address-card" style="font-size:22px;color:black"></i>&nbsp;
              <span class="menu-title">Manage Account</span>
              <i class="menu-arrow"></i>
            </a>
            <div class="collapse" id="ui-basic">
              <ul class="nav flex-column sub-menu">
                <li class="nav-item"> <a class="nav-link" href="user_profile.php">My Profile</a></li> 
              </ul>
            </div>
          </li>
          <li class="nav-item">
            <a class="nav-link" data-toggle="collapse" href="#form-elements" aria-expanded="false" aria-controls="form-elements">
            <i class="fa fa-money" style="font-size:22px;color:black"></i>&nbsp;
              <span class="menu-title"> Money Transfer</span>
              <i class="menu-arrow"></i>
            </a>
            <div class="collapse" id="form-elements">
              <ul class="nav flex-column sub-menu">
                <li class="nav-item"><a class="nav-link" href="user_wirebank.php">Wire Transfer</a></li>
				 <li class="nav-item"><a class="nav-link" href="user_samebank.php">Same Bank Transfer</a></li>
				  <li class="nav-item"><a class="nav-link" href="user_interbank.php">Inter Bank Transfer</a></li>
				   <li class="nav-item"><a class="nav-link" href="user_beneficiary.php">Send to Beneficiary</a></li>
              </ul>
            </div>
          </li>
          <li class="nav-item">
            <a class="nav-link" data-toggle="collapse" href="#charts" aria-expanded="false" aria-controls="charts">
              <i class="fa fa-credit-card" style="font-size:22px;color:black"></i>&nbsp;
              <span class="menu-title">Virtual Cards</span>
              <i class="menu-arrow"></i>
            </a>
            <div class="collapse" id="charts">
              <ul class="nav flex-column sub-menu">
                <li class="nav-item"> <a class="nav-link" href="user_virtualcard.php">Check/Fund Cards</a></li>
              </ul>
            </div>
          </li>
          <li class="nav-item">
            <a class="nav-link" data-toggle="collapse" href="#tables" aria-expanded="false" aria-controls="tables">
                <i class="fa fa-address-card" style="font-size:22px;color:black"></i>&nbsp;
              <span class="menu-title">Loan/Investment</span>
              <i class="menu-arrow"></i>
            </a>
            <div class="collapse" id="tables">
              <ul class="nav flex-column sub-menu">
                <li class="nav-item"> <a class="nav-link" href="user_loans.php">Loan/Investment</a></li>
                <li class="nav-item"> <a class="nav-link" href="user_loanstatus.php">Check Status</a></li>
              </ul>
            </div>
          </li>
          <li class="nav-item">
            <a class="nav-link" data-toggle="collapse" href="#icons" aria-expanded="false" aria-controls="icons">
           <i class="fa fa-bar-chart" style="font-size:22px;color:black"></i> &nbsp;
              <span class="menu-title">E-Statement</span>
              <i class="menu-arrow"></i>
            </a>
            <div class="collapse" id="icons">
              <ul class="nav flex-column sub-menu">
                <li class="nav-item"> <a class="nav-link" href="user_debitstatement.php">Debit Statement</a></li>
				<li class="nav-item"> <a class="nav-link" href="user_creditstatement.php">Credit Statement</a></li>
              </ul>
            </div>
          </li>
          <li class="nav-item">
            <a class="nav-link" data-toggle="collapse" href="#auth" aria-expanded="false" aria-controls="auth">
              <i class="fa fa-commenting" style="font-size:22px;color:black"></i>&nbsp;
              <span class="menu-title">Support</span>
              <i class="menu-arrow"></i>
            </a>
            <div class="collapse" id="auth">
              <ul class="nav flex-column sub-menu">
                <li class="nav-item"> <a class="nav-link" href="user_support.php"> Contact Support </a></li>
                <li class="nav-item"> <a class="nav-link" href="user_notice.php"> Check Notifications </a></li>
              </ul>
            </div>
          </li>
          <li class="nav-item">
            <a class="nav-link" data-toggle="collapse" href="#error" aria-expanded="false" aria-controls="error">
               <i class="fa fa-key" style="font-size:22px;color:black"></i>&nbsp;
              <span class="menu-title">Settings</span>
              <i class="menu-arrow"></i>
            </a>
            <div class="collapse" id="error">
              <ul class="nav flex-column sub-menu">
                <li class="nav-item"> <a class="nav-link" href="user_password.php"> Change Password </a></li>
                <li class="nav-item"> <a class="nav-link" href="user_2factor.php"> Off 2Factor Login  </a></li>
              </ul>
            </div>
          </li>
          <li class="nav-item">
            <a class="nav-link" href="logout.php">
                  <i class="fa fa-power-off" style="font-size:22px;color:black"></i>&nbsp;
              <span class="menu-title">Logout</span>
            </a>
          </li>
        </ul>
      </nav>
      <!-- partial -->


  
  
  
  
  
  
  
  
 
   <div id="example">
     

        <div class="page-container hidden-on-narrow">
        <div class="pdf-page size-a4">
             
                         <div class="container__wrapper">
                        <!-- The watermark -->
                        <div class="container__watermark">
                        E-CHANNEL BANKING
                        </div>
                        </div>
            
            <div class="pdf-body">
                
                <p style="text-align:left"><img src="images/logo2.png" width="250px"  height="90px" /></p>
                
            
                
                <center> <h1><u><strong>Transaction Receipt</strong></u></h1> </center>
                
                <h4><strong style="color:brown;">Transaction Date:</strong>  <strong><?php echo $row['routing']?></strong></h4>
                
                <h4><strong style="color:brown;">Reference Number:</strong>  <strong><?php echo(rand()); ?>830<?php echo(rand()); ?></strong></h4>
                
               <h4><strong style="color:brown;">Sender:</strong>  <strong><?php echo $row['fname']; ?>  <?php echo $row['mname']; ?>  <?php echo $row['lname']; ?> </strong></h4>
                
                <h4><strong style="color:brown;">Transaction Amount:</strong>  <strong><?php echo $row['currency']?><?php echo $rows['amount']?>.00</strong></h4>
                
                <h4><strong style="color:brown;">Transaction Type:</strong>  <strong>E-Channel</strong></h4>
                
                <h4><strong style="color:brown;">Receiver:</strong>  <strong><?php echo $rows['acc_name']?></strong></h4>
                
            
                <h4><strong style="color:brown;">Account Number:</strong>  <strong><?php echo $rows['acc_no']?></strong></h4>
                
                <h4><strong style="color:brown;">Receiving Bank:</strong>  <strong><?php echo $rows['bank_name']; ?></strong></h4>
                
                <h4><strong style="color:brown;">Remarks:</strong>  <strong><?php echo $rows['remarks']; ?></strong></h4>
                <br>
                
           
<span class="stamp is-approved"><img src="images/logo2.png" width="200px"  height="60px" /></span>  




                <center><strong>DISCLAIMER</strong></center>
                <center><p style="color:brown; font-size: 10px; text-align:center;">Your transfer has been successful and the beneficiary's account will be credited. However, this does not serve as 
confirmation of credit into the beneficiary's account. Due to the nature of the Internet, transactions may be subject to 
interruption, transmission blackout, delayed transmission and incorrect data transmission.The Bank is not liable for 
malfunctions in communications facilities not within its control that may affect the accuracy or timeliness of 
messages and transactions you send.All transactions are subject to verification and normal fraud checks</p></center>

                <p>
                    <strong>Generated from <strong style="color:brown"><?php
// Program to display current page URL.
  
$link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ?
                "https" : "http") . "://" . $_SERVER['HTTP_HOST'] . 
                $_SERVER['REQUEST_URI'];
  
echo $link;
?></strong></strong>

<p>&nbsp;  <br><br><br><br></p>
                </p>
                
                
            </div>
        </div>
    </div>
    
    <div class="responsive-message"></div>

    <style>
        /*
            Use the DejaVu Sans font for display and embedding in the PDF file.
            The standard PDF fonts have no support for Unicode characters.
        */
        .pdf-page {
            font-family: "DejaVu Sans", "Arial", sans-serif;
        }
    </style>

    <script>
        // Import DejaVu Sans font for embedding

        // NOTE: Only required if the Kendo UI stylesheets are loaded
        // from a different origin, e.g. cdn.kendostatic.com
        kendo.pdf.defineFont({
            "DejaVu Sans"             : "https://kendo.cdn.telerik.com/2016.2.607/styles/fonts/DejaVu/DejaVuSans.ttf",
            "DejaVu Sans|Bold"        : "https://kendo.cdn.telerik.com/2016.2.607/styles/fonts/DejaVu/DejaVuSans-Bold.ttf",
            "DejaVu Sans|Bold|Italic" : "https://kendo.cdn.telerik.com/2016.2.607/styles/fonts/DejaVu/DejaVuSans-Oblique.ttf",
            "DejaVu Sans|Italic"      : "https://kendo.cdn.telerik.com/2016.2.607/styles/fonts/DejaVu/DejaVuSans-Oblique.ttf"
        });
    </script>

    <!-- Load Pako ZLIB library to enable PDF compression -->
    <script src="../content/shared/js/pako.min.js"></script>

    <script>
      function getPDF(selector) {
        kendo.drawing.drawDOM($(selector)).then(function(group){
          kendo.drawing.pdf.saveAs(group, "E-Channel_bank_Transaction_Receipt.pdf");
        });
      }

    $(document).ready(function() {
     
        var schema = {
          model: {
            productName: { type: "string" },
            unitPrice: { type: "number", editable: false },
            qty: { type: "number" }
          },
          parse: function (data) {
                $.each(data, function(){
                    this.total = this.qty * this.unitPrice;
                });
                return data;
          }
        };
     
   
        var grid = $("#grid").kendoGrid({
          editable: false,
          sortable: true,
          dataSource: {
            data: data,
            aggregate: aggregate,
            schema: schema,
          },
          columns: columns
        });

        $("#paper").kendoDropDownList({
          change: function() {
            $(".pdf-page")
              .removeClass("size-a4")
              .removeClass("size-letter")
              .removeClass("size-executive")
              .addClass(this.value());
          }
        });
    });
    </script>
    
  
        
        
        
    <style>
    
    
    .container__wrapper {
    /* Center the content */
    align-items: center;
    display: flex;
    justify-content: center;

    /* Absolute position */
    left: 0px;
    position: absolute;
    top: 0px;

    /* Take full size */
    height: 100%;
    width: 100%;
}
    
    .container__watermark {
    /* Text color */
    color: rgba(0, 0, 0, 0.2);

    /* Text styles */
    font-size: 3rem;
    font-weight: bold;
    text-transform: uppercase;

    /* Rotate the text */
    transform: rotate(-45deg);

    /* Disable the selection */
    user-select: none;
}



        .pdf-page {
            margin: 0 auto;
            box-sizing: border-box;
            box-shadow: 0 5px 10px 0 rgba(0,0,0,.3);
            background-color: white;
            color: #333;
            position: relative;
        }
       
        .pdf-body {
            position: absolute;
            top: 1in;
            bottom: 1.2in;
            left: .5in;
            right: .5in;
        }

        .size-a4 { width: 8.3in; height: 8.7in; }
        .size-letter { width: 8.5in; height: 11in; }
        .size-executive { width: 7.25in; height: 10.5in; }

    
   
        .signature {
            padding-top: .1in;
        }
    </style>

</div>
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css">
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js"></script>

  <script>
$(document).ready(function(){
$("#myModal").modal({
show:true,
backdrop:'static'
});
});
</script>
 
    <script>
    $(document).ready(function() {
      $('#mybutton').hide().delay(10000).fadeIn(2200);
});
    </script>

 
  
  
<style>
    .bs-example{
    	margin: 20px;
    }
    
   main {

    display: flex;

    flex-direction: column;

    align-items: center;

    padding: 2em;

}


.success-message {

    background-color: #f0f0f0;

    padding: 2em;

    border: 1px solid #ddd;

    border-radius: 10px;

    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);

}


.success-message h1 {

    font-size: 24px;

    margin-bottom: 10px;

}


.success-message p {

    font-size: 16px;

    margin-bottom: 20px;

}


.success-message button {

    background-color: #4CAF50;

    color: #fff;

    padding: 10px 20px;

    border: none;

    border-radius: 5px;

    cursor: pointer;

}


.transfer-details {

    background-color: #f0f0f0;

    padding: 2em;

    border: 1px solid #ddd;

    border-radius: 10px;

    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);

}


.transfer-details h2 {

    font-size: 18px;

    margin-bottom: 10px;

}


.transfer-details ul {

    list-style: none;

    margin: 0;

    padding: 0;

}


.transfer-details li {

    margin-bottom: 10px;

}


.transfer-details span {

    font-weight: bold;

} 
 
</style>

    
    
    
<div class="bs-example">
   
    
    
    <!-- Modal HTML -->
    <div id="myModal" class="modal fade">
        <div class="modal-dialog" style="width: 345px;">
            <div class="modal-content">
                <div class="modal-header">
                    <center><h4 class="modal-title" style="color:green; font-weight:700; text-align:center;">Transfer completed
</h4></center> 
                </div>
                <div class="modal-body">
                    <center><img src='images/success.gif' width='200px'  /></center>
               </div>
               
               
               
               <section class="success-message">

            <h1>Transfer Successful!</h1>

            <p>Transaction Successfully Completed ✅,  Thanks for your patronage, we promise to serve you with the best banking services. Your fund is expected to be in your bank account within 24 working hours.</p>
<button class="btn " onclick="getPDF('.pdf-page')">Print Receipt</button>
           

        </section>

        <section class="transfer-details">

            <h2>Transfer Details:</h2>

            <ul>

                <li><span>Transfer Amount:</span> <?php echo $row['currency']?><?php echo $english_format_number = number_format( $rows['amount'] ); ?>.00</li>

                <li><span>Recipient's Account:</span> <?php echo $rows['acc_name']?>/li>

                <li><span>Transfer Date:</span> <?php
echo date("d M Y H:i:s"); // Output: 26 Oct 2024 14:30:00
?>
</li>

            </ul>

        </section>
               
               
               
               
              
                             
                             <br><br>
                             
                             
                             
                             
                             <a  href="user_home.php">BACK TO HOME</a></center>
                        <br><br>
                </div>
                
                
            </div> 
        </div>
    </div>
</div>
</body>
</html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
  
 
 
 
 
 
 
 
 
 
	