-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex0.php
78 lines (76 loc) · 2.46 KB
/
index0.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
72
73
74
75
76
77
78
<?php
session_start();
if (!isset($_SESSION['Admin-name'])) {
header("location: login.php");
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Foydalanuvchilar</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/png" href="images/favicon.png">
<script type="text/javascript" src="js/jquery-2.2.3.min.js"></script>
<script type="text/javascript" src="js/bootstrap.js"></script>
<link rel="stylesheet" type="text/css" href="css/Users.css">
<script>
$(window).on("load resize ", function() {
var scrollWidth = $('.tbl-content').width() - $('.tbl-content table').width();
$('.tbl-header').css({'padding-right':scrollWidth});
}).resize();
</script>
</head>
<body>
<?php include'header.php'; ?>
<main>
<section>
<h1 class="slideInDown animated">Barcha foydalanuvchilar ro‘yxati</h1>
<!--User table-->
<div class="table-responsive slideInRight animated" style="max-height: 400px;">
<table class="table">
<thead class="table-primary">
<tr>
<th>ID | F.I.SH.</th>
<th>Seriya raqami</th>
<th>Jinsi</th>
<th>ID karta</th>
<th>Sana</th>
<th>O`tish joyi</th>
</tr>
</thead>
<tbody class="table-secondary">
<?php
//Connect to database
require'connectDB.php';
$sql = "SELECT * FROM users WHERE add_card=1 ORDER BY id DESC";
$result = mysqli_stmt_init($conn);
if (!mysqli_stmt_prepare($result, $sql)) {
echo '<p class="error">SQL Error</p>';
}
else{
mysqli_stmt_execute($result);
$resultl = mysqli_stmt_get_result($result);
if (mysqli_num_rows($resultl) > 0){
while ($row = mysqli_fetch_assoc($resultl)){
?>
<TR>
<TD><?php echo $row['id']; echo" | "; echo $row['username'];?></TD>
<TD><?php echo $row['serialnumber'];?></TD>
<TD><?php echo $row['gender'];?></TD>
<TD><?php echo $row['card_uid'];?></TD>
<TD><?php echo $row['user_date'];?></TD>
<TD><?php echo $row['device_dep'];?></TD>
</TR>
<?php
}
}
}
?>
</tbody>
</table>
</div>
</section>
</main>
</body>
</html>