Файл: profiwm.pp.ua/chat/whoroom.php
Строк: 34
<?php
require '../system/sid.php';
require '../system/config.php';
include '../system/user.php';
include '../system/head.php';
include '../system/navigator.php';
whorm(0, 'chat');
$open = mysql_fetch_array(mysql_query("SELECT `open_chat` FROM `setting` WHERE `ids` = '1'"));
if ($open[0] == 0)
{
err('Чат закрыт Администратором!');
include '../system/foot.php';
exit();
}
$ASnum = mysql_num_rows(mysql_query("SELECT `id` FROM `users` WHERE `room` = 'chat' AND `onl` + '300' > '" . time() . "' ORDER BY `onl` DESC"));
echo $div_title . 'Кто здесь' . $div_end;
$count = mysql_result(mysql_query("SELECT COUNT(id) FROM `users` WHERE `room` = 'chat' AND `onl` + '300' > '" . time() . "' ORDER BY `onl` DESC"), 0);
if ($count != false) {
$n = new navigator($count, 10, '?');
$result = mysql_query("SELECT `id` FROM `users` WHERE `room` = 'chat' AND `onl` + '300' > '" . time() . "' ORDER BY `onl` DESC {$n->limit}");
$i = 0;
$cols = 0;
while($sql = mysql_fetch_assoc($result)) {
++$cols;
$num = ($n->start + $cols);
echo ($i ++ % 2) ? $div_tworazdel : $div_razdel;
echo $num . '. ' . us($sql['id']) . $div_end;
}
echo $n->navi();
} else {
echo 'Никого нет!<br/>';
}
include '../system/foot.php';
?>