-
Notifications
You must be signed in to change notification settings - Fork 0
/
Manage_Shipment.php
81 lines (69 loc) · 2.04 KB
/
Manage_Shipment.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
<!DOCTYPE html>
<head>
<title>Manage Shipment</title>
<link rel="stylesheet" href="./css/TableStyle.css" />
</head>
<body>
<?php
include 'CheckifLogin.php';
include ("connection.php");
include ("navBar.php");
$sql="SELECT * FROM `shipment`";
$result=mysqli_query($connect,$sql);
//sh_id weight category issue_date delievery_date m_id s_id c_id
?>
<div class="dashboard_table" style="overflow-x:auto">
<h1 style="color:black">Manage Shipment</h1>
<table>
<tr>
<th>Shipment ID</th>
<th>Weight</th>
<th>Category</th>
<th>Issue Date</th>
<th>Delievery Date</th>
<th>Status</th>
<th>Shipper ID</th>
<th>Courier ID</th>
<th>Update</th>
<!-- <th>Delete</th> -->
</tr>
<?php
while($row=mysqli_fetch_assoc($result)){
$sh_id=$row['sh_id'];
$weight=$row['weight'];
$category=$row['category'];
$issue_date=$row['issue_date'];
$delievery_date=$row['delivery_date'];//get the status as well
$status=$row['status'];
$m_id=$row['m_id'];
$s_id=$row['s_id'];
$c_id=$row['c_id'];
if($c_id==NULL){
$c_id="Not Assigned";
}
echo '
<tr>
<td>'.$sh_id.'</td>
<td>'.$weight.'</td>
<td>'.$category.'</td>
<td>'.$issue_date.'</td>
<td>'.$delievery_date.'</td>
<td>'.$status.'</td>
<td>'.$s_id.'</td>
<td>'.$c_id.'</td>
<td class="btn-instance">
<a href="updateShipment.php?sh_id='.$row['sh_id'].'&weight='.$row['weight'].'&category='.$row['category'].'&issue_date='.$row['issue_date'].'&delivery_date='.$row['delivery_date'].'&m_id='.$row['m_id'].'&s_id='.$row['s_id'].'&c_id='.$row['c_id'].'&status='.$row['status'].'">Update</a>
</td>
</tr>';
}
?>
</table>
</div>
<?php
$connect->close();
?>
</body>
</html>
<?php
include 'footer.php';
?>