forked from eodclan/User-Control-System
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstaff_usercontrol.php
118 lines (109 loc) · 3.45 KB
/
staff_usercontrol.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<?php
// ************************************************************************************//
// * User Control Panel ( UCP )
// ************************************************************************************//
// * Author: DerStr1k3r
// ************************************************************************************//
// * Version: 2.5
// *
// * Copyright (c) 2020 - 2021 DerStr1k3r. All rights reserved.
// ************************************************************************************//
// * License Typ: GNU GPLv3
// ************************************************************************************//
require_once("include/features.php");
site_secure();
secure_url();
site_secure_staff_check();
site_header("".STAFF_USERCONTROL."");
site_navi_logged();
site_content_logged();
$limit = 10;
if (isset($_GET["site"])) {
$site = $_GET["site"];
}else{
$site=1;
};
$start_from = ($site-1) * $limit;
echo "
<div class='row clearfix'>
<div class='col-lg-12 col-md-12 col-sm-12 col-xs-12'>
<div class='card'>
<div class='header'>
<h2>
".STAFF_USERCONTROL."
</h2>
</div>
<div class='body'>
<p class='m-t-15 m-b-30'>
<div class='table-responsive'>
<table class='table'>
<thead class=' text-primary'>
<th>
".STAFF_USERCONTROLUSERID."
</th>
<th>
".STAFF_USERCONTROLUSERNAME."
</th>
<th>
".STAFF_USERCONTROLSOCIALCLUB."
</th>
<th>
".STAFF_USERCONTROLEMAIL."
</th>
<th>
".STAFF_USERCONTROLACCOUNTWHITELIST."
</th>
</thead>
<tbody>";
$sql = "SELECT id, username, email, socialclubname, betaAcess FROM users ORDER BY id ASC LIMIT ".$start_from.", ".$limit."";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($userchange = $result->fetch_assoc()) {
echo "
<tr>
<td>
" . $userchange["id"]. "
</td>
<td>
" . $userchange["username"]. "
</td>
<td>
" . $userchange["socialclubname"]. "
</td>
<td>
" . $userchange["email"]. "
</td>
<td>
" . $userchange["betaAcess"]. "
</td>
</tr>";
}
}
echo "
</tbody>
</table>";
$result_db = mysqli_query($conn,"SELECT COUNT(id) FROM users");
$userchange_db = mysqli_fetch_row($result_db);
$total_records = $userchange_db[0];
$total_sites = ceil($total_records / $limit);
$siteLink = "
<nav>
<ul class='pagination'>";
for ($i=1; $i<=$total_sites; $i++) {
$siteLink .= "
<li class='bg-teal'>
<a class='waves-effect' href='".$_SERVER['PHP_SELF']."?site=".$i."'>".$i."</a>
</li>";
}
echo $siteLink . "
</ul>
</nav>
</div>
</p>
</div>
</div>
</div>
</div>";
site_footer();
?>