-
Notifications
You must be signed in to change notification settings - Fork 0
/
orderdetails.php
82 lines (78 loc) · 2.8 KB
/
orderdetails.php
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<?php include 'inc/header.php'; ?>
<?php
$login = Session::get("cuslogin");
if ($login == false) {
header("Location:login.php");
}
?>
<?php
if (isset($_GET['customerId'])) {
$id = $_GET['customerId'];
$time = $_GET['time'];
$price = $_GET['price'];
$confirm = $ct->productShiftConfirm($id, $time, $price);
}
?>
<style type="text/css">
.tblone tr td{text-align: justify;}
</style>
<div class="main">
<div class="content">
<div class="section group">
<div class="order">
<h2>Your Ordered Details</h2>
<table class="tblone">
<tr>
<th>No</th>
<th>Product Name</th>
<th>Image</th>
<th>Quantity</th>
<th>Price</th>
<th>Date</th>
<th>Status</th>
<th>Action</th>
</tr>
<?php
$cmrId = Session::get("cmrId");
$getOrder = $ct->getOrderProduct($cmrId);
if ($getOrder) {
$i=0;
while ($result = $getOrder->fetch_assoc()) {
$i++; ?>
<tr>
<td><?php echo $i; ?></td>
<td><?php echo $result['productName']; ?></td>
<td><img src="admin/<?php echo $result['image']; ?>" alt=""/></td>
<td style="text-align:center;">$<?php echo $result['quantity'].".00"; ?></td>
<td>$<?php echo number_format($result['price']).".00"; ?></td>
<td><?php echo $fm->formatDate($result['date']); ?></td>
<td><?php
if ($result['status'] == '0') {
echo "Pending";
} elseif ($result['status'] == '1') {
echo "Shifted";
} else {
echo "Ok";
} ?></td>
<?php if ($result['status'] == '1') {
?>
<td><a href="?customerId=<?php echo $cmrId; ?>&price=<?php echo $result['price']; ?>&time=<?php echo $result['date']; ?>">Confirm</a></td>
<?php
} elseif ($result['status'] == '2') {
?>
<td>Ok</td>
<?php
} elseif ($result['status'] == '0') {
echo "<td>N/A</td>";
} ?>
</tr>
<?php
}
} ?>
</table>
</div>
</div>
<div class="clear"></div>
</div>
</div>
<?php include 'inc/footer.php'; ?>