-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcheckoutitems.php
More file actions
91 lines (83 loc) · 2.83 KB
/
checkoutitems.php
File metadata and controls
91 lines (83 loc) · 2.83 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<?php
require_once('connect.php');
session_start();
?>
<!DOCTYPE html>
<html>
<head>
<title>Checkoutitems</title>
<link rel="stylesheet" type="text/css" href="admin.css">
</head>
<div class="header">
<div class="logoWrapper">
<img class="logo" src="BNN.png" border="0" />
<div class="topnav">
<!-- <a href="staffsignin.php">Log in</a>
<a href="staffregister.php">Sign up</a> -->
<a href="management.php">Home</a>
</div>
</div>
<!-- <div class="motto">
<h1>We provide professional laundry service</h1>
</div> -->
</div>
<body>
<div class="row">
<div class="content">
<div class="boxWrapper">
<div class="">
<table>
<col width="5%">
<!-- <col width="5%"> -->
<col width="5%">
<col width="20%">
<col width="15%">
<col width="5%">
<col width="10%">
<col width="10%">
<col width="5%">
<tr>
<th>Service ID</th>
<!-- <th>Staff ID</th> -->
<th>User ID</th>
<th>Member Name</th>
<th>Date In</th>
<th>Date Out</th>
<th>Service status</th>
<th>Total price</th>
<th>Checkout Items</th>
</tr>
<?php
$q="SELECT *,`firstName` FROM `laundryservice`,`member` where `serviceStatus` = 'F' AND laundryservice.dateOut='0000-00-00' AND laundryservice.memberId = member.memberId ORDER BY `serviceId`";
$result=$mysqli->query($q);
if(!$result){
echo "Select failed. Error: ".$mysqli->error ;
}
while($row=$result->fetch_array()){ ?>
<?php
$dashDateOut="";
if ($row['dateOut']=="0000-00-00") {
$dashDateOut="-";
}
else {
$dashDateOut=$row['dateOut'];
}
?>
<tr>
<td><?=$row['serviceId']?></td>
<!-- <td><?=$row['staffId']?></td> -->
<td><?=$row['memberId']?></td>
<td><?=$row['firstName']?></td>
<td><?=$row['dateIn']?></td>
<td><?=$dashDateOut?></td>
<td>Finished</td>
<td><?=$row['totalPrice']?></td>
<td><a href='checkcheckout.php?serviceId=<?=$row['serviceId']?>&memberId=<?=$row['memberId']?>&totalPrice=<?=$row['totalPrice']?>";'> <img src="cart.png" width="24" height="24"></a></td>
</tr>
<?php } ?>
</table>
</div>
</div>
</div>
</body>
</html>