-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathuser_log_up.php
40 lines (40 loc) · 1.18 KB
/
user_log_up.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
<table class="table-log">
<thead class="table-log-head">
<tr>
<th>ID</th>
<th>Name</th>
<th>Card UID</th>
<th>Date</th>
<th>Time In</th>
<th>Time Out</th>
<th>Scores</th>
</tr>
</thead>
<tbody class="table-log-body">
<?php
// $sql = "SELECT * FROM users_logs WHERE checkindate=? AND pic_date BETWEEN ? AND ? ORDER BY id ASC";
include("connectDB.php");
$date = date("Y-m-d");
$sql = "SELECT * FROM users_logs WHERE checkindate='$date' ORDER BY id DESC";
//$sql = "SELECT * FROM users_logs ORDER BY id DESC";
if (isset($_GET['func']) && $_GET['func'] == 'filter') {
$sql = $_GET['sql'];
echo $sql;
}
$resultl = mysqli_query($conn, $sql);
while ($row = mysqli_fetch_array($resultl, MYSQLI_ASSOC)) {
?>
<TR>
<TD><?php echo $row['id']; ?></TD>
<TD><?php echo $row['username']; ?></TD>
<TD><?php echo $row['card_uid']; ?></TD>
<TD><?php echo $row['checkindate']; ?></TD>
<TD><?php echo $row['timein']; ?></TD>
<TD><?php echo $row['timeout']; ?></TD>
<TD><?php echo $row['scores']; ?></TD>
</TR>
<?php
}
?>
</tbody>
</table>