View file chat/index.php

File size: 1.1Kb
<?php

$title='Чат'; 
require"../system/config.php";
 require"../system/func.php";
 require"../system/head.php";
 require"../system/error.php"; if($vhod==1){
echo'<div class="i" align="center">'.$title.'</div>';
switch($_GET['act']){
default:
echo'<div class="p">Комнаты:</div>';
$allrum=mysql_query("SELECT * FROM `chat_room`");
while($data=mysql_fetch_array($allrum)){

$qqq=mysql_fetch_array(mysql_query("SELECT * FROM `users`"));
$kolonl=mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `gdeon` LIKE '/chat/room.php?r=".$data['id_room']."%' AND `online`>'".(time()-120)."'"),0);
echo'<img src="'.$dirsite.'/design/default/act.gif" alt=""> <a href="/chat/room/'.$data['id_room'].'/">'.$data['name'].'</a> ['.$kolonl.']<br>';}
break;}}else{echo'Чтобы зайти в чат,нужно быть зарегистрированым';}
$onl=mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `gdeon` LIKE '/chat/%' AND `online`>'".(time()-120)."'"),0);
echo'<div class="p"><a href="../pages/online.php?act=chat">Кто в чате?</a> ['.$onl.']</div>';
require"../system/foot.php";
?>