-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathemployeesLog.php
71 lines (53 loc) · 1.75 KB
/
employeesLog.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
<div class="row g-3 align-items-center mx-4 " id="Tab">
<div class="col-auto">
<h5> employee Log Table</h5>
</div>
<div class="col-auto " class="ADDC">
</div>
</div>
<table class="table table-dark my-4 mx-1">
<thead class="my-2">
<th scope="row">#</th>
<td>Name</td>
<td>userName</td>
<td>password</td>
<td>Salary</td>
<td>TransactionCount</td>
<td colspan="2" class="table-active">Type</td>
<td colspan="2" class="table-active">Time updatedTime</td>
</thead>
<tbody class="my-4">
<?php
$sqln = "SELECT * FROM `updateLog` WHERE isActive = 1 ORDER BY updateTime DESC";
$resultn=mysqli_query($conn,$sqln);
$num=mysqli_num_rows($resultn);
if($num>0){
$i=1;
while ( $row=mysqli_fetch_assoc($resultn)) {
$type=$row['Type'];
if($type==1){
$type='Admin';
}
elseif($type==2){
$type='Human Resource';
}
elseif($type==3){
$type='Cashier';
}
echo'<tr>
<th scope="row">'.$i++.'</th>
<td>'.$row['name'].'</td>
<td>'.$row['userName'].'</td>
<td>'.$row['password'].'</td>
<td>'.$row['salary'].'</td>
<td>'.$row['transactionCount'].'</td>
<td colspan="2" class="table-active">'.$type.'</td>
<td>'.$row['updateTime'].'</td>
</tr>';
}
}
else{
}
?>
</tbody>
</table>