File: /home/rtbrisc/public_html/admin/main/payment/pay.php
<?php include("../general/header.php"); ?>
<?php
$tid = $_GET['tid'];
?>
<body class="">
<?php include("../general/navbar.php"); ?>
<!-- BEGIN CONTENT -->
<div class="page-container row-fluid">
<?php include("../general/sidebar.php"); ?>
<!-- BEGIN PAGE CONTAINER-->
<div class="page-content">
<div class="content">
<!-- BEGIN PAGE TITLE -->
<?php include("../general/customer_name.php"); ?>
<!-- END PAGE TITLE -->
<ul class="breadcrumb">
<li>
<p>PAYMENT INFORMATION</p>
</li>
<li><a href="new.php" class="active">NEW PAYMENT</a> </li>
<li><a href="../payment" class="active">MAKE PAYMENT</a> </li>
<li><a href="../dashboard" class="active">DASHBOARD</a> </li>
</ul>
<!-- BEGIN PLACE PAGE CONTENT HERE -->
<div class="row">
<div class="col-md-12 col-vlg-12 col-sm-12">
<div class="grid simple form-grid vertical green">
<div class="grid-title no-border">
<h3>Payment ID: <?php echo $tid; ?></h3>
<span class="text-danger">
<?php
echo @$_SESSION['pay_err'];
?>
</span>
</div>
<div class="grid-body no-border">
<table class="table table-striped table-advance table-hover" id="myTable">
<thead>
<tr>
<th>Item </th>
<th>Item Price (₦)</th>
</tr>
</thead>
<tbody>
<?php
require_once('../worker/workers/server/issues.php');
require_once('../worker/workers/server/utilities.php');
require_once('../worker/workers/server/customer.php');
$pay_tick = mysqli_query($iss, "SELECT * FROM tblpaymentticket WHERE PaymentID = '$tid'");
$pay_tick_row = mysqli_fetch_assoc($pay_tick);
$tickID = $pay_tick_row['TicketID'];
$history = mysqli_query($iss, "SELECT * FROM tblpaymentinfo WHERE TicketID = '$tickID'");
while($his_row = mysqli_fetch_assoc($history)){
?>
<tr>
<td><?php echo $his_row['Item']; ?></td>
<td><?php echo $his_row['ItemPrice']; ?></td>
</tr>
<?php } ?>
<tr>
<td>Service Charge</td>
<td><?php echo $pay_tick_row['ServiceCharge'] ?></td>
</tr>
<?php
$total = $pay_tick_row['ServiceCharge'] + $pay_tick_row['TotalAmount'];
?>
<tr>
<td class="text-right">Total Amount:</td>
<td><?php echo $total; ?></td>
</tr>
</tbody>
</table>
<form method="post" action="pay/" enctype="multipart/form-data" id="form_traditional_validation" name="form_traditional_validation" role="form" autocomplete="off" class="validate">
<input type="hidden" name="txtPaymentID" value="<?php echo $tid; ?>">
<input type="hidden" name="txtCustomerID" value="<?php echo $customerID; ?>">
<input type="hidden" name="txtTicketID" value="<?php echo $pay_tick_row['TicketID']; ?>">
<div class="form-group row">
<label for="need" class="control-label col-lg-3 text-right">Select Payment Method: <span class="text-danger">*</span></label>
<div class="col-lg-9">
<select class="form-control m-bot15" id="txtPaymentMethod" name="txtPaymentMethod" required="required">
<option value=""> Select Payment Method</option>
<?php
$sql=mysqli_query($utl, "SELECT * FROM tblpaymentmethod");
while($row=mysqli_fetch_assoc($sql)){
echo "<option value='" . $row['PaymentMethodID'] . "'>" . $row['PaymentMethodText'] . "</option>";
}
?>
</select>
</div>
</div>
<div class="form-actions">
<div class="row">
<input type="submit" name="submit" class="btn btn-primary btn-cons col-lg-3 col-sm-12 pull-right" style="background-color: #C7100E;" value="Make Payment">
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<!-- END DASHBOARD TILES -->
<!-- END PLACE PAGE CONTENT HERE -->
</div>
</div>
<!-- END PAGE CONTAINER -->
<?php include("../general/chat_bar.php"); ?>
</div>
<!-- END CONTENT -->
<?php include("../general/footer.php"); ?>
<script>
function mySearch() {
// Declare variables
var input, filter, table, tr, td, i;
input = document.getElementById("mySearch");
filter = input.value.toUpperCase();
table = document.getElementById("myTable");
tr = table.getElementsByTagName("tr");
// Loop through all table rows, and hide those who don't match the search query
for (i = 0; i < tr.length; i++) {
td = tr[i].getElementsByTagName("td")[0];
if (td) {
if (td.innerHTML.toUpperCase().indexOf(filter) > -1) {
tr[i].style.display = "";
} else {
tr[i].style.display = "none";
}
}
}
}
</script>
</body>
<?php
unset($_SESSION['pay_err']);
?>
</html>