-
Notifications
You must be signed in to change notification settings - Fork 0
/
admin.php
69 lines (65 loc) · 2.09 KB
/
admin.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
<html>
<head>
<title>Car Purchasing</title>
<link rel="stylesheet" type="text/css" href="style/reset.css">
<link rel="stylesheet" type="text/css" href="style/responsive.css">
<style>
table, th, td,tr {
padding: 15px;
border: 1px solid black;
text-align:center;
}
table {
width:80%;
margin-left:10%;
margin-right:10%;
}
</style>
</head>
<body>
<section class="">
<?php
include 'menu.php';
?>
</section>
<h1><center> PRIME EXOTICS </center></h1>
<h3><center><i> WHERE CAR DREAMS BECOME REALITY <i></center></h3>
<table align="center">
<tr>
<th>Order No.</th>
<th>Name</th>
<th>Phone Number</th>
<th>Car Booked</th>
<th>Transaction ID</th>
<th>Quantity</th>
<th>Price</th>
<th>Delivery Date</th>
<th>Supplier ID</th>
<th>EDIT</th>
<th>DELETE</th>
</tr>
<?php
include 'connection.php';
$select = "SELECT cu.Name,cu.Phone_number,ca.Car_name,pu.Supplier_id,pu.Transaction_id,sa.Quantity,sa.Price,pu.Supplier_Delivery_Date,sa.Order_No from cars ca,customers cu,purchase_order pu,sales_order sa where ca.Car_id=sa.Car_id and cu.Customer_id=sa.Customer_id and sa.Order_No=pu.Order_No";
$result = $conn->query($select);
while($row = $result->fetch_assoc()){
?>
<tr>
<td><?php echo $row['Order_No'] ?></td>
<td><?php echo $row['Name'] ?></td>
<td><?php echo $row['Phone_number'] ?></td>
<td><?php echo $row['Car_name'] ?></td>
<td><?php echo $row['Transaction_id'] ?></td>
<td><?php echo $row['Quantity'] ?></td>
<td>Rs.<?php echo $row['Price'] ?></td>
<td><?php echo $row['Supplier_Delivery_Date'] ?></td>
<td><?php echo $row['Supplier_id'] ?></td>
<td><a href="booked_car_edit.php?id=<?php echo $row['Order_No'] ?>">Edit</a></td>
<td><a href="booked_car_delete.php?id=<?php echo $row['Order_No'] ?>">Delete</a></td>
</tr>
<?php
}
?>
</table>
</body>
</html>