287 lines
8.4 KiB
PHP
287 lines
8.4 KiB
PHP
<?php
|
|
include("connection.php");
|
|
|
|
session_start();
|
|
$AccID = $_SESSION['AccID'];
|
|
if (!isset($_SESSION['AccID'])) {
|
|
header('Location: login.html');
|
|
exit();
|
|
}
|
|
|
|
$OrderID = $_POST['OrderID'];
|
|
$Renter_ID = $_POST['Renter_ID'];
|
|
$Place_Num = $_POST['Place_Num'];
|
|
$License = $_POST['License'];
|
|
$Dates = $_POST['Dates'];
|
|
$Pay_Date = $_POST['Pay_Date'];
|
|
$Pay_AmountTotal = $_POST['Pay_AmountTotal'];
|
|
$payment_type = $_POST['Pay_Type'];
|
|
$Transaction_No = $_POST['Transaction_No'];
|
|
|
|
|
|
// Fetching the user's name for display
|
|
$sql = "SELECT Renter_Name FROM renter WHERE Renter_ID = '$Renter_ID'";
|
|
$result = mysqli_query($conn, $sql);
|
|
$user = mysqli_fetch_assoc($result);
|
|
$userName = $user['Renter_Name'];
|
|
|
|
$conn->close();
|
|
?>
|
|
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<link rel="stylesheet" href="style.css" type="text/css">
|
|
<link rel="stylesheet" href="style2.css">
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
|
<title>Receipt | UITM BAZAAR</title>
|
|
<style>
|
|
body {
|
|
font-family: Arial, sans-serif;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
.container {
|
|
width: 80%;
|
|
margin: 200px auto;
|
|
background-color: #fff;
|
|
padding: 20px;
|
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
|
}
|
|
img{
|
|
margin-left: 20%;
|
|
}
|
|
h1 {
|
|
text-align: left;
|
|
}
|
|
.invoice-details {
|
|
margin: 20px 0;
|
|
}
|
|
.invoice-details div {
|
|
margin-bottom: 10px;
|
|
}
|
|
.invoice-details label {
|
|
color: black;
|
|
font-size: 20px;
|
|
font-weight: bold;
|
|
display: inline-block;
|
|
width: 200px;
|
|
}
|
|
.invoice-details span {
|
|
color: black;
|
|
font-size: 20px;
|
|
font-weight: bold;
|
|
width: 150px;
|
|
}
|
|
.buttons {
|
|
text-align: center;
|
|
margin-top: 20px;
|
|
}
|
|
.buttons button {
|
|
margin: 5px;
|
|
padding: 20px 25px;
|
|
font-size: 2em;
|
|
cursor: pointer;
|
|
}
|
|
.invoice-footer {
|
|
text-align: center;
|
|
margin-top: 20px;
|
|
font-size: 1.5em;
|
|
color: #555;
|
|
}
|
|
table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
margin-top: 20px;
|
|
}
|
|
th, td {
|
|
color: black;
|
|
font-size: 27px;
|
|
padding: 10px;
|
|
border: 1px solid #ddd;
|
|
}
|
|
th {
|
|
background-color: #f2f2f2;
|
|
font-weight: bold;
|
|
}
|
|
tr:nth-child(even) {
|
|
background-color: #f2f2f2;
|
|
}
|
|
.invoice-header {
|
|
display: flex;
|
|
margin-bottom: 20px;
|
|
}
|
|
.container-logo {
|
|
height: 200px;
|
|
margin-right: 50px;
|
|
}
|
|
.invoice-title {
|
|
font-size: 2em;
|
|
margin: 0;
|
|
}
|
|
</style>
|
|
<script>
|
|
function printInvoice() {
|
|
window.print();
|
|
}
|
|
|
|
function goToNext() {
|
|
window.location.href = "rentermenu.php";
|
|
}
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<aside class="sidebar">
|
|
<div class="logo">
|
|
<img src="pic/profiles.png" alt="logo">
|
|
<h2><?php echo $userName; ?>'s</h2>
|
|
</div>
|
|
<ul class="links">
|
|
<h4>Main Menu</h4>
|
|
<li>
|
|
<span class="material-symbols-outlined"><img src="pic/home.png"></span>
|
|
<a href="rentermenu.php">Main Menu</a>
|
|
</li>
|
|
<hr>
|
|
<h4>Advanced</h4>
|
|
<li>
|
|
<span class="material-symbols-outlined"><img src="pic/receipt.png"></span>
|
|
<a href="selectReceipt.php">Receipt</a>
|
|
</li>
|
|
<hr>
|
|
<h4>Account</h4>
|
|
<li>
|
|
<span class="material-symbols-outlined"><img src="pic/profile2.png"></span>
|
|
<a href="renterProfile.php">Profile</a>
|
|
</li>
|
|
<hr>
|
|
<h4>Sign Out</h4>
|
|
<li class="logout-link">
|
|
<span class="material-symbols-outlined"><i class="fa-solid fa-right-from-bracket"></i></span>
|
|
<a href="logout.php">Logout</a>
|
|
</li>
|
|
</ul>
|
|
</aside>
|
|
<header class = "header">
|
|
<a href= "rentermenu.php" class = "logo">Welcome
|
|
<span><?php echo $userName; ?>'s</span></a>
|
|
|
|
<i class="fa-solid fa-bars" id="menu-icon"></i>
|
|
|
|
<nav class="navbar">
|
|
<a href="rentPlace.php">Rent Place</a>
|
|
<a href="sawEvents.php">Event</a>
|
|
<a href="payment.php">Payment</a>
|
|
<a href="sentFeedback.php">Sent Feedback</a>
|
|
</nav>
|
|
</header>
|
|
<div class="container">
|
|
<div class="invoice-header">
|
|
<table class="table-1" align="left" width="924" height="145" border="0">
|
|
<tr>
|
|
<td width="150" align="left"><img src="pic/uitm.png" width="100" height="100" alt=""/></td>
|
|
<td width="500" align="left"><h1>Invoice</h1></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="invoice-details">
|
|
<div>
|
|
<label>Transaction No:</label>
|
|
<span id="transactionNo"><?php echo $Transaction_No; ?></span>
|
|
</div>
|
|
<div>
|
|
<label>Renter ID:</label>
|
|
<span id="renterId"><?php echo $Renter_ID; ?></span>
|
|
</div>
|
|
<div>
|
|
<label>Order ID:</label>
|
|
<span id="OrderID"><?php echo $OrderID; ?></span>
|
|
</div>
|
|
<div>
|
|
<label>Pay Type:</label>
|
|
<span id="Pay_Type"><?php echo $payment_type; ?></span>
|
|
</div>
|
|
<div>
|
|
<label>Rent Date:</label>
|
|
<span id="Dates"><?php echo $Dates; ?></span>
|
|
</div>
|
|
<div>
|
|
<label>Pay Date:</label>
|
|
<span id="Pay_Date"><?php echo $Pay_Date; ?></span>
|
|
</div>
|
|
<div>
|
|
<label>Place Number:</label>
|
|
<span id="placeNumber"><?php echo $Place_Num; ?></span>
|
|
</div>
|
|
</div>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Item</th>
|
|
<th>Description</th>
|
|
<th>Quantity</th>
|
|
<th>Price</th>
|
|
<th>Total</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>Place Rental</td>
|
|
<td>Rental of place number <?php echo $Place_Num; ?></td>
|
|
<td>1</td>
|
|
<td>RM<?php echo $Pay_AmountTotal; ?></td>
|
|
<td>RM<?php echo $Pay_AmountTotal; ?></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="buttons">
|
|
<button onclick="printInvoice()">Print</button>
|
|
<button onclick="goToNext()">Next</button>
|
|
</div>
|
|
<div class="invoice-footer">
|
|
<p>Thank you for your business!</p>
|
|
<p>If you have any questions about this invoice, please contact us.</p>
|
|
</div>
|
|
</div>
|
|
<footer class="footer" id="footer">
|
|
<div class="social">
|
|
<a onclick="showPopup()"><i class="fa-solid fa-phone"></i></a>
|
|
<a onclick="showPopup2()"><i class="fa-solid fa-envelope"></i></a>
|
|
</div>
|
|
<div id="popup" class="popup">
|
|
<h2>This is Our No Phone!</h2><br>
|
|
<p>016-430 6562</p>
|
|
<button class = btns onclick="closePopup()">Close</button>
|
|
</div>
|
|
|
|
<div id="popup2" class="popup">
|
|
<h2>This is Our Email!</h2><br>
|
|
<p>uitm@student.uitm.edu.my</p>
|
|
<button class = btns onclick="closePopup2()">Close</button>
|
|
</div>
|
|
<ul class="list">
|
|
<li>
|
|
<a href="sentFeedback.php">Rate Us</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="sawEvents.php">Event</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="renterProfile.php">Profile</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="https://bendahari.uitm.edu.my/index.php/component/contact/category/55-cawangan-negeri-perak-kampus-tapah">Website</a>
|
|
</li>
|
|
</ul>
|
|
<p class="copyright">
|
|
© NextGen Techne | All Rights Reserved
|
|
</p>
|
|
</footer>
|
|
<script src="script.js"></script>
|
|
</body>
|
|
</html>
|