-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPrintOrders.php
More file actions
66 lines (63 loc) · 1.97 KB
/
PrintOrders.php
File metadata and controls
66 lines (63 loc) · 1.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?php
require_once "controllers/PrintOrdersController.php";
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
/* Your existing styles here */
</style>
<title>A4 Paper</title>
</head>
<body>
<div class="a4-paper" style="font-size:">
<h1 style="padding-left: 30%; font-size: 50px;">
<u>Invoice</u>
</h1>
<br>
<div style="padding-left: 30%; font-size: 30px;">
<?php
// Check if order ID is set in $_POST
if (isset($_POST['order_id'])) {
$order_id = $_POST['order_id'];
$PrintOrdersController = new PrintOrdersController();
$order = $PrintOrdersController->getOrderById($order_id);
if ($order != null) {
?>
<h1 style="font-size: 30px;">
<u>Order Details</u>
</h1>
<div class="detail">
<span class="label">Order ID</span>:
<?php echo $order['order_id']; ?>
</div>
<div class="detail">
<span class="label">Product ID</span>:
<?php echo $order['product_id']; ?>
</div>
<div class="detail">
<span class="label">Total Price</span>:
RM <?php echo $order['total_price']; ?>
</div>
<div class="detail">
<span class="label">Date</span>:
<?php echo $order['date']; ?>
</div>
<div class="detail">
<span class="label">Email</span>:
<?php echo $order['email']; ?>
</div>
<?php
} else {
echo "<p>Order not found.</p>";
}
} else {
echo "<p>Order ID not set.</p>";
}
?>
</div>
</div>
</body>
</html>