git.shiar.nl
/
minimedit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
c294943
)
login/visits: indicate admin users
author
Mischa POSLAWSKY
<perl@shiar.org>
Thu, 14 Jun 2018 09:59:07 +0000
(11:59 +0200)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Thu, 14 Jun 2018 12:45:19 +0000
(14:45 +0200)
login/visits.php
patch
|
blob
|
history
diff --git
a/login/visits.php
b/login/visits.php
index 1cecc8af64ccb714990afd0a42e82d2da366ae09..a26f3072382c290d93be6b8aa66eab793d6a609f 100644
(file)
--- a/
login/visits.php
+++ b/
login/visits.php
@@
-5,6
+5,7
@@
foreach (glob('profile/*') as $userdir) {
'login' => basename($userdir),
'name' => @file_get_contents("$userdir/name.txt"),
'seen' => @filemtime("$userdir/last.log"),
'login' => basename($userdir),
'name' => @file_get_contents("$userdir/name.txt"),
'seen' => @filemtime("$userdir/last.log"),
+ 'admin' => @file_exists("$userdir/.admin"),
];
}
];
}
@@
-14,10
+15,14
@@
if (@$_GET['order'] == 'seen') {
print "<ul>\n";
foreach ($logins as $profile) {
print "<ul>\n";
foreach ($logins as $profile) {
- printf('<li>%s <a href="%s">%s</a>
</li>'."\n"
,
+ printf('<li>%s <a href="%s">%s</a>
'
,
$profile['seen'] ? strftime('%F %H:%M', $profile['seen']) : '✘',
'/login/edit/'.$profile['login'],
$profile['name'] ?: $profile['login']
);
$profile['seen'] ? strftime('%F %H:%M', $profile['seen']) : '✘',
'/login/edit/'.$profile['login'],
$profile['name'] ?: $profile['login']
);
+ if (!empty($profile['admin'])) {
+ print ' <em>(beheerder)</em>';
+ }
+ print "</li>\n";
}
print "</ul>\n\n";
}
print "</ul>\n\n";