-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathShippingInterface.php
More file actions
71 lines (62 loc) · 2.33 KB
/
ShippingInterface.php
File metadata and controls
71 lines (62 loc) · 2.33 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
67
68
69
70
71
<?php
/*Boundary class for shipping workers
*@author: Undergraduate group one
*/
class ShippingInterface
{
public function displayPendingOrders($rows)
{
echo "<body style='background-color: IndianRed; color:LightYellow;'>";
echo '<h1 align="center">Pending Orders</h1>';
echo '<table align="center" border=2>';
echo '<th>Order Number</th><th>Order Status</th><th>Order Date</th><th>Total Price</th>
<th>First Name</th><th>Last Name</th><th>Address</th><th>Email</th><th>Select</th>';
foreach($rows as $row)
{
echo '<form method="post" action="completeorder.php">';
echo '<tr align = "center">';
echo '<td>' . $row[0] . "</td>";
echo "<td>" . $row[1] . "</td>";
echo "<td>" . $row[2] . "</td>";
echo "<td>" . $row[3] . "</td>";
echo "<td>" . $row[4] . "</td>";
echo "<td>" . $row[5] . "</td>";
echo "<td>" . $row[6] . "</td>";
echo "<td>" . $row[7] . "</td>";
echo '<td><input type="submit" name="ship[]" value="print order information" /></td>';
echo '<input type="hidden" name="orderNumber" value="'.$row[0].'"/>';
echo "</tr>";
echo '</form>';
}
echo '</table>';
}
public function displayOrderDetails($rows)
{
echo "<body style='background-color: IndianRed; color:LightYellow;'>";
echo '<h1 align="center">Order details</h1>';
echo '<table align="center" border=2>';
/*
p.partNum,p.quantity,o.orderStatus,o.firstName,o.lastName,o.address,o.email
*/
echo '<th>Part Number</th><th>Description</th><th>Quantity</th><th>Status</th><th>Total Price</th><th>First name</th>
<th>Last Name</th><th>Address</th><th>Email</th>';
$count = 0;
foreach($rows as $row)
{
echo '<tr>';
echo '<td>'.$row[0].'</td>';
echo '<td>'.$_SESSION["partDescriptions"][$count][0].'</td>';
echo '<td>'.$row[1].'</td>';
echo '<td>'.$row[2].'</td>';
echo '<td>'.$row[3].'</td>';
echo '<td>'.$row[4].'</td>';
echo '<td>'.$row[5].'</td>';
echo '<td>'.$row[6].'</td>';
echo '<td>'.$row[7].'</td>';
echo '</tr>';
$count++;
}
echo '</table>';
}
}
?>