-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmanager.php
More file actions
70 lines (62 loc) · 2.26 KB
/
manager.php
File metadata and controls
70 lines (62 loc) · 2.26 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Manager View</title>
</head>
<body>
<?php
$servername = "localhost";
$username = "admin";
$password = "admin";
$dbname = "woodysdb";
$conn = new mysqli($servername, $username, $password, $dbname);
$requesteddate = $_POST["date"];
$location = $_POST["location"];
$query = "SELECT `invoice_id`, `appt_date`, invoicedetails.price, `loc_address`, `vin`, `vehicle_type`, `svc_type`, `status` FROM `appointment`, `invoicedetails`, `businesslocation`, `servicesoffered` WHERE invoicedetails.service_id = servicesoffered.id AND invoicedetails.appt_id = appointment.id AND appointment.loc_id = businesslocation.id AND `appt_date` = '$requesteddate' ORDER BY `invoice_id`";
$appts = $conn->query($query);
echo "<table>
<tr>
<th>Invoice Number</th>
<th>Date</th>
<th>Location</th>
<th>VIN</th>
<th>Vehicle Type</th>
<th>Service</th>
<th>Status</th>
<th>Price</th>
</tr>";
while($row = $appts->fetch_assoc()) {
echo "<tr>
<td>".$row["invoice_id"]."</td>
<td>".$row["appt_date"]."</td>
<td>".$row["loc_address"]."</td>
<td>".$row["vin"]."</td>
<td>".$row["vehicle_type"]."</td>
<td>".$row["svc_type"]."</td>
<td>".$row["status"]."</td>
<td>$".$row["price"]."</td>
</tr>";
}
echo "</table>";
echo "<br><h1>Change Status</h1>";
echo "
<form method=\"POST\" action=\"statuschanged.php\">
<label for=\"status\">Status</label>
<input type=\"radio\" name=\"status\" value=\"Waiting for parts\">Waiting for parts
<input type=\"radio\" name=\"status\" value=\"In Progress\">In Progress
<input type=\"radio\" name=\"status\" value=\"Completed\">Completed<br>
<label for=\"id\">Invoice Number</label>
<input type=\"number\" name=\"id\"><br>
<label for=\"price\">New Price With Added Parts & Labor</label>
<input type=\"number\" name=\"price\"><br>
<input type=\"submit\" value=\"Submit Changes\">
</form>
";
echo "<a href=\"partinventory.php\">Edit Part Inventory</a><br>";
echo "<a href=\"employee.php\">Go back</a>";
?>
</body>
</html>