Файл: monst/core/pag/online.php
Строк: 93
<?
upd_loc('view online');
?>
<br/>
<div class='padding'>
<?
$on_page = 20;
$find = $_users -> find(
[
'l_time' => [
'$gte' => time() - 60 * 60
],
'level' => [
'$gte' => 0
]
]
);
$find -> limit($on_page);
$find -> sort(
[
'level' => -1,
'l_time' => -1,
]
);
$count = $find -> count();
$nav = nav($on_page);
foreach ( $find as $user_array ) {
$online = Online($user_array['l_time']);
?>
<a href='/id<?=$user_array['id']?>'>
<div style='display: inline-block;'>
<img src='<?=av($user_array['id'])?>' alt='' width='50' class='av' style='float: left; margin: 5px;'/>
<div style='position: relative; height: 0; top: -20px; left: 15px;'>
<?=$online?>
</div>
</div>
<div style='display: inline-block; vertical-align: top;'>
<?=Name($user_array['id'])?> <span style='color: #444; font-size: 11px;'>[<?=$user_array['level']?>]</span><br/>
<span style='color: #777;'>
<?=$user_array['loc']?>
</span>
</div>
</a>
<br/>
<?
}
print $nav;
?>
<br/><br/>
<div style='font-size: 12px;'>
<span style='color: yellowgreen;'>• <?=$lang['online.php']['online']?></span><br/>
<span style='color: lightyellow;'>• <?=$lang['online.php']['10ago']?></span><br/>
<span style='color: orange;'>• <?=$lang['online.php']['20ago']?></span><br/>
<span style='color: orangered;'>• <?=$lang['online.php']['30ago']?></span><br/>
<span style='color: #777;'>• <?=$lang['online.php']['30last']?></span><br/>
</div>
</div>
<br/>
<?
$key = md5('monst__online.php_enters');
$enters = $mem -> get($key);
if ( !$enters ) {
$enters = $_users -> find(
[
'l_time' => [
'$gte' => mktime(0, 0, 0, date('m'), date('d'), date('Y'))
]
]
) -> count();
$mem -> set($key, $enters, 0, 60 * 10);
}
$key = md5('monst__online.php_regs');
$regs = $mem -> get($key);
if ( !$regs ) {
$regs = $_users -> find(
[
'r_time' => [
'$gte' => mktime(0, 0, 0, date('m'), date('d'), date('Y'))
]
]
) -> count();
$mem -> set($key, $regs, 0, 60 * 10);
}
?>
<div class='padding'>
<?=$lang['online.php']['uniq_users']?>: <?=$enters?><br/>
<?=$lang['online.php']['new_users']?>: <?=$regs?><br/>
</div>