Файл: WM-Koder/online.php
Строк: 43
<?php
require 'system/sid.php';
require 'system/config.php';
include 'system/user.php';
include 'system/head.php';
include 'system/navigator.php';
whorm(0, 'tut');
$count = mysql_result(mysql_query("SELECT COUNT(id) FROM `users` WHERE `onl` + '300' > '" . time() . "' ORDER BY `onl` DESC"), 0);
echo $div_title . 'Онлайн ' . $count . $div_end;
if ($count != false) {
$n = new navigator($count, 10, '?');
$result = mysql_query("SELECT room, mod_reg, id FROM `users` WHERE `onl` + '300' > '" . time() . "' ORDER BY `onl` DESC {$n->limit}");
$i = 0;
$cols = 0;
while($sql = mysql_fetch_assoc($result)) {
++$cols;
$num = ($n->start + $cols);
if (user_inf($sql['id'], 'onl') + 300 > time())
{
$online = ' <span style="color: green;">On</span>';
}
else
{
$online = ' <span style="color: red;">Off</span>';
}
echo '<div class="menu"><a class="ssyl2" href="/'.$sql['id'].'">'.uus($sql['id']).'</td>
<td><b>'.usss($sql['id']).'</b>'.$online.'<br><span style="color: grey; font-size: 11px;">'.elite($sql['id']).'';
echo '</span>
</td>
</tr>
</table>
</a></div>';
}
echo $n->navi();
} else {
echo '<div class="menu">В онлайне никого нет!</div>';
}
include 'system/foot.php';
?>