-
Notifications
You must be signed in to change notification settings - Fork 0
/
moderationDetail.php
118 lines (114 loc) · 3.39 KB
/
moderationDetail.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<?php
require_once("db.php");
session_start();
//$clientName=$_SESSION['clientName'];
//$clientID=$_SESSION['clientID'];
if (isset($_POST["submit"])) {
if(isset($_POST["listingID"])) $_SESSION['listingID']=$_POST["listingID"];
Header("Location: cancelListing.php");
}
if (isset($_POST["approve"])) {
if(isset($_POST["listingID"])) $_SESSION['listingID']=$_POST["listingID"];
Header("Location: approve.php");
}
?>
<!doctype html>
<html>
<head>
<title>Reynholm Industries</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="stylesheet.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<img src="reynholm.jpg" height=5% width=5% />
<ul class="nav nav-tabs">
<li class="active"><a href="adminLanding.php">Home</a></li>
<li><a href="adminViewListings.php">View Listings</a></li>
<li><a href="moderationNew.php">Moderation</a></li>
<li><a href="adminViewCurrentListings.php">View Current Listings</a></li>
<li><a href="adminAreYouSure.php">Delete your Account</a></li>
</ul>
<?php
//resume the session variable on this page
// session_start();
if (isset($_SESSION['listingID'])) $listingID=$_SESSION['listingID'];
echo $listingID;
require_once("db.php");
$sql="select distinct * from listing where listingID='$listingID'";
$result = $mydb->query($sql);
while($row=mysqli_fetch_array($result)){
$Selection=$row["origin"];
echo "<div><table>
<tr>
<th>Listing Information</th>
<th></th>
</tr>
<tr>
<td>Status</td>";
if ($row['state']=="NA"){echo "<td>Needs Approval</td>";}
elseif($row['state']=="L"){echo "<td>Listed</td>";}
elseif($row['state']=="IT"){echo "<td>In Transit</td>";}
elseif($row['state']=="F"){echo "<td>Fulfilled</td>";}
elseif($row['state']=="R"){echo "<td>Removed</td>";}
echo "</tr>
<tr>
<td>client ID</td>
<td>".$row['clientID']."</td>
</tr>
<tr>
<td>Client Name</td>
<td>".$row['clientName']."</td>
</tr>
<tr>
<td>Starting Location</td>
<td>".$row['origin']."</td>
</tr>
<tr>
<td>Destination</td>
<td>".$row['destination']."</td>
</tr>
<tr>
<td>Total Miles</td>
<td>".$row['miles']."</td>
</tr>
<tr>
<td>Date Listed</td>
<td>".$row['dateListed']."</td>
</tr>
<tr>
<td>Date Fulfilled</td>
<td>".$row['dateFufilled']."</td>
</tr>
<tr>
<td>Rate/Mile ($)</td>
<td>".$row['ratePerMile']."</td>
</tr>
<tr>
<td>Package Weight(tons)</td>
<td>".$row['weight']."</td>
</tr>
<tr>
<td>Driver CDL</td>
<td>".$row['CDL']."</td>
</tr>";
if($row['state']!=="f"||$row['state']!=="IT")
echo
"<tr>
<td><form method='post'
action='".$_SERVER['PHP_SELF']."'>
<input type='submit' name='approve' value='Approve Listing' />
</form>
</td>
<td><form method='post'
action='".$_SERVER['PHP_SELF']."'>
<input type='submit' name='submit' value='Cancel Listing' />
</form>
</td>
</tr>";
echo "</table></div>";
}
?>
</body>
</html>