-
Notifications
You must be signed in to change notification settings - Fork 0
/
userlist.php
94 lines (70 loc) · 1.62 KB
/
userlist.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
<?php
require_once 'core/init.php';
$pagename = $LANG['homepage'];
include_once 'includes/head.php';
include_once 'includes/header.php';
if (Session::exists('home')){
echo '<p>'. Session::flash('home') . '</p>';
}
if ($user->isLoggedIn()){
?>
<table border="1">
<tr>
<th>Username</th>
<th>First name</th>
<?php
if ($user->hasPermission('moderator')){
?>
<th>E-mail</th>
<th>Steamid</th>
<?php
}
?>
<?php
if ($user->hasPermission('admin')){
?>
<th>Address</th>
<th>Zip</th>
<th>City</th>
<th>Phone</th>
<?php
}
?>
</tr>
<?php
$user_id = array(1,2,3);
foreach($user_id as $user_id) {
$profileuser = new User($user_id);
?>
<tr>
<td><?php echo escape($profileuser->data()->username); ?></td>
<td><?php echo escape($profileuser->data()->firstname); ?></td>
<?php
if ($user->hasPermission('moderator')){
?>
<td><?php echo escape($profileuser->data()->email); ?></td>
<td><?php echo escape($profileuser->data()->steamid); ?></td>
<?php
}
?>
<?php
if ($user->hasPermission('admin')){
?>
<td><?php echo escape($profileuser->data()->address); ?></td>
<td><?php echo escape($profileuser->data()->zip); ?></td>
<td><?php echo escape($profileuser->data()->city); ?></td>
<td><?php echo escape($profileuser->data()->phone); ?></td>
<?php
}
?>
</tr>
<?php
}
?>
</table>
<?php
print_r($user->countregusers()->count());
} else {
echo '<p>You need to <a href="login.php">login</a> or <a href="register.php">register</a></p>';
}
include_once 'includes/bottom.php';