added online users feature

This commit is contained in:
SJ
2013-07-24 22:14:05 +02:00
parent 920f4208ba
commit 93e9c7ce33
16 changed files with 159 additions and 1 deletions

View File

@ -26,6 +26,13 @@
<th><?php print $text_swap_usage; ?>:</th>
<td><div class="progress <?php if($swapinfo < HEALTH_RATIO) { ?>progress-success<?php } else { ?>progress-danger<?php } ?>"><div class="bar" style="width: <?php print $swapinfo; ?>%"></div>&nbsp;<?php print $swapinfo; ?>% / <?php print $totalswap; ?> MB</div></td>
</tr>
<?php if(ENABLE_SAAS == 1) { ?>
<tr>
<th class="span4"><?php print $text_online_users; ?>:</th>
<td class="span8"><a href="index.php?route=stat/online"><?php print $num_of_online_users; ?></a></td>
</tr>
<?php } ?>
</table>

View File

@ -0,0 +1,30 @@
<h4><?php print $text_online_users; ?></h4>
<div class="listarea">
<?php if(isset($users)){ ?>
<table id="ss1" class="table table-striped table-condensed">
<tr>
<th class="domaincell"><?php print $text_username; ?></th>
<th class="domaincell"><?php print $text_ipaddr; ?></th>
<th class="domaincell"><?php print $text_logged_in; ?></th>
<th class="domaincell"><?php print $text_last_activity; ?></th>
</tr>
<?php foreach($users as $user) { ?>
<tr>
<td class="domaincell"><?php print $user['username']; ?></td>
<td class="domaincell"><?php print $user['ipaddr']; ?></td>
<td class="domaincell"><?php print date("Y.m.d. G:i:s", $user['ts']); ?></td>
<td class="domaincell"><?php print date("Y.m.d. G:i:s", $user['last_activity']); ?></td>
</tr>
<?php } ?>
</table>
<?php } ?>
</div>