File Manager
Viewing File: wiresuccess.php
<?php
session_start();
include_once ('../include/session.php');
require_once '../include/class.user.php';
if(!isset($_SESSION['acc_no'])){
header("Location: login.php");
exit();
}
$url != 'http://secure..com/success.php';
if ($_SERVER['HTTP_REFERER'] == $url) {
header('Location: wire.php'); //redirect to some other page
exit();
}
$reg_user = new USER();
$stmt = $reg_user->runQuery("SELECT * FROM account WHERE acc_no=:acc_no");
$stmt->execute(array(":acc_no"=>$_SESSION['acc_no']));
$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(":acc_no"=>$_SESSION['acc_no']));
$rows = $temp->fetch(PDO::FETCH_ASSOC);
include_once ('counter.php');
?>
<?php include 'mheader.php';
?>
<title>Successful Wire Transfer</title>
<!-- content @s -->
<div class="nk-content nk-content-fluid">
<div class="container-xl wide-lg">
<div class="nk-content-body">
<div class="nk-block-head">
<div class="nk-block-between g-3">
<div class="nk-block-head-content">
<h3 class="nk-block-title page-title">TRANSFER RECEIPT <strong class="text-primary small">#<?php echo $rows['id']?></strong></h3>
<div class="nk-block-des text-soft">
<ul class="list-inline">
<li>Created At: <span class="text-base"><?php
echo " " . date("d/m/Y") ;
?></span></li>
</ul>
</div>
</div>
<div class="nk-block-head-content">
<a href="dashboard/dom.php" class="btn btn-outline-light bg-white d-none d-sm-inline-flex"><em class="icon ni ni-arrow-left"></em><span>Back</span></a>
<a href="dashboard/dom.php" class="btn btn-icon btn-outline-light bg-white d-inline-flex d-sm-none"><em class="icon ni ni-arrow-left"></em></a>
</div>
</div>
</div><!-- .nk-block-head -->
<script>function printtag(tagid) {
var hashid = "#"+ tagid;
var tagname = $(hashid).prop("tagName").toLowerCase() ;
var attributes = "";
var attrs = document.getElementById(tagid).attributes;
$.each(attrs,function(i,elem){
attributes += " "+ elem.name+" ='"+elem.value+"' " ;
})
var divToPrint= $(hashid).html() ;
var head = "<html><head>"+ $("head").html() + "</head>" ;
var allcontent = head + "<body onload='window.print()' >"+ "<" + tagname + attributes + ">" + divToPrint + "</" + tagname + ">" + "</body></html>" ;
var newWin=window.open('','Print-Window');
newWin.document.open();
newWin.document.write(allcontent);
newWin.document.close();
// setTimeout(function(){newWin.close();},10);
}</script>
<div class="nk-block">
<div class="invoice" id='DivIdToPrint'>
<div class="invoice-action">
<a class="btn btn-icon btn-lg btn-white btn-dim btn-outline-primary" id='btn' value='Print Reciept' onclick='printtag("DivIdToPrint");'><em class="icon ni ni-printer-fill"></em></a>
</div><!-- .invoice-actions -->
<div class="invoice-wrap">
<div class="invoice-brand text-center">
<img src="<?php echo $site_url; ?>/dashboard/admin/logo/logo.png" srcset="<?php echo $site_url; ?>/dashboard/admin/logo/logo.png" alt="">
</div>
<div class="invoice-head">
<div class="invoice-contact">
<span class="overline-title">Transfer To</span>
<div class="invoice-contact-info">
<h4 class="title"><?php echo $rows['acc_name']?></h4>
<ul class="list-plain">
<li><em class="icon ni ni-map-pin-fill"></em><span><?php echo $site_address; ?></span></li>
<li><em class="icon ni ni-call-fill"></em><span><?php echo $site_number; ?></span></li>
</ul>
</div>
</div>
<div class="invoice-desc">
<h3 class="title">Transfer Receipt</h3>
<ul class="list-plain">
<li class="invoice-id"><span>Transfer ID</span>:<span>#<?php echo $rows['id']?></span></li>
<li class="invoice-date"><span>Date</span>:<span><?php
echo " " . date("d/m/Y") ;
?></span></li>
</ul>
</div>
</div><!-- .invoice-head -->
<div class="invoice-bills">
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th class="w-150px"> ID</th>
<th class="w-150px"> Country</th>
<th class="w-20">Description</th>
<th class="w-20">Bank Name</th>
<th class="w-20">Account Number</th>
<th>Amount</th>
</tr>
</thead>
<tbody>
<tr>
<td>#<?php echo $rows['id']?></td>
<td><?php echo $rows['cout']?></td>
<td><?php echo $rows['remarks']?></td>
<td><?php echo $rows['bank_name']?></td>
<td><?php echo $rows['acc_no']?></td>
<td><?php echo $row['currency']?><?php echo $rows['amount']?></td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="2"></td>
<td colspan="2">Subtotal</td>
<td><?php echo $row['currency']?><?php echo $rows['amount']?></td>
</tr>
<tr>
<td colspan="2"></td>
<td colspan="2">Grand Total</td>
<td><?php echo $row['currency']?><?php echo $rows['amount']?></td>
</tr>
</tfoot>
</table>
<div class="nk-notes ff-italic fs-12px text-soft"> Invoice was created on a computer and is valid without the signature and seal. </div>
</div>
</div><!-- .invoice-bills -->
</div><!-- .invoice-wrap -->
</div><!-- .invoice -->
</div><!-- .nk-block -->
</div>
</div>
</div>
<!-- content @e -->
<?php include 'mfooter.php';
?>