-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcustomerstatus.php
More file actions
63 lines (56 loc) · 1.9 KB
/
Copy pathcustomerstatus.php
File metadata and controls
63 lines (56 loc) · 1.9 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
<!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>Document</title>
</head>
<body>
<?php
$servername = "localhost";
$username = "admin";
$password = "admin";
$dbname = "woodysdb";
$conn = new mysqli($servername, $username, $password, $dbname);
$cust_id = $_POST["cust_id"];
echo "<a href=\"customer.php\">Customer Page</a>";
$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 `cust_id` = \"$cust_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 "<h1>Pay for order</h1>";
echo "<form method=\"POST\" action=\"paid.php\">
<label for=\"id\">Invoice Number</label>
<input type=\"text\" name=\"id\"><br>
<input type=\"date\" name=\"date\" id=\"today\" value=\"".date("Y-m-d")."\" readonly><br>
<input type=\"submit\" value=\"Paid\">
</form>";
?>
<script>
document.getElementById('today').value = moment().format('YYYY-MM-DD');
</script>
</body>
</html>