File size: 1.25Kb
<?php
error_reporting(0);
include("config.php");
include("./includes/".$ver."/banned");
$urls='inchat.php';
list($msec, $sec) = explode(chr(32), microtime());
$headtime = $sec + $msec;
$ref = rand(1000, 9999);
header ("Content-type: text/html; charset=utf-8");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-cache, must-relative");
include("./template/head.php");
$sql = mysql_query("SELECT COUNT(*) FROM `chat_users` WHERE `time` >= ".time().";");
$online = mysql_result($sql, 0);
$sql = mysql_query("SELECT COUNT(*) FROM `chat_users` WHERE `time` >= ".time()." AND `invisible` != 1;");
$in_public_rooms = mysql_result($sql, 0);
$sql = mysql_query("SELECT `nickname` FROM `chat_users` WHERE `time` >= ".time()." AND `invisible` != 1 ORDER BY `level` DESC, `posts` DESC;");
if(mysql_num_rows($sql) == 0)
{
echo "В чате никого нет.<br/>\n";
}
else
{
echo "Сейчас в чате:<br/>\n";
}
$c = 0;
while($users = mysql_fetch_array($sql))
{
$c++;
echo $users['nickname'];
if($c != $in_public_rooms) echo ", ";
}
echo "<br/><a href=\"rules.php?ver=html&action=registration\">Регистрация</a><br/>\n";
echo "<a href=\"index.php?ver=html\">Назад</a><br/>\n";
include("./template/foot.php");
break;
?>