-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadmin.php
62 lines (45 loc) · 1.77 KB
/
admin.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
<?php
require_once('includes/master.inc.php');
require_once('AdminRouter.php');
Auth::getAuth()->requireAdmin();
?>
<!DOCTYPE html>
<html>
<head>
<title>Admin - DailyOje</title>
<link rel="stylesheet" type="text/css" href="<?php echo Config::get('googleFontUrl'); ?>">
<link rel="stylesheet" type="text/css" href="<?php echo root_url(); ?>css/style.css">
<link rel="icon" type="image/png" href="<?php echo root_url(); ?>images/icon.png">
<script src="<?php echo Config::get('jQueryUrl'); ?>"></script>
</head>
<body>
<div id="wrapper">
<p>There are a total of <strong><?php echo AdminRouter::countAllUsers(); ?></strong> users in the system.</p>
<p>Users listed by registration date in descending order:</p>
<?php
$users = AdminRouter::fetchMostRecentUsers();
foreach ($users as $user) :
if(empty($user->image_url))
{
$default = root_url() . '/images/user-avatar.png';
$user->image_url = "http://www.gravatar.com/avatar/" . md5(strtolower(trim($user->username))) . "?d=" . urlencode($default) . "&s=50";
}
$username = $user->name;
if($user->oauth_provider == "dailyoje")
{
$username = $user->username;
}
?>
<div class="author-table">
<img src="<?php echo $user->image_url; ?>" border="0"/>
<span class="author-name">
<a href="<?php echo $user->buildProfileUrl(); ?>" target="_blank">
<?php echo $username; ?>
</a>
</span>
<span class="grey-subtext author-description"><?php echo $user->profile_details; ?> -> Total Notes: <strong><?php echo AdminRouter::noteCountForUser($user); ?></strong></span>
</div>
<?php endforeach; ?>
</div>
</body>
</html>