Файл: vzabave/chat.php
Строк: 20
<?
require'config.php';
$align=$set['alignpr'];
$title='Чатик - '.date("H:i", $time);
aut();
head();
who_add(0,'chat'); // Занисываем Кто онлайн...
require'sys/calendar.php';
if(isset($_GET['intim']))unset($_SESSION['inps']);
echo gb.'<b>Комнаты Чатика:</b>'.div;
echo'<br/>';
$rooms = mysql_query("SELECT * FROM `rooms` ORDER BY `pos` ASC");
if(mysql_num_rows($rooms)!=0){
while($room = mysql_fetch_array($rooms)){
if ($room['sartir']==1)echo '<a href="room?rm='.$room['rm'].'&sartir">'.$room['name'].'</a>('.mysql_result(mysql_query('SELECT COUNT(*) FROM `who` WHERE `room` = "room" and `rm` = "'.$room['rm'].'"'),0).')<br />';
else if ($room['intim']==1)echo '<a href="room?rm='.$room['rm'].'&intim">'.$room['name'].'</a>('.mysql_result(mysql_query('SELECT COUNT(*) FROM `who` WHERE `room` = "room" and `rm` = "'.$room['rm'].'"'),0).')<br />';
else if ($room['level']<=$user['level'])echo '<a href="room?rm='.$room['rm'].'">'.$room['name'].'</a>('.mysql_result(mysql_query('SELECT COUNT(*) FROM `who` WHERE `room` = "room" and `rm` = "'.$room['rm'].'"'),0).')<br />';}
}else{
echo 'Комнаты еще не созданы...<br />';
}
$tm = time()-300;
$res=$db->sql_query("SELECT * FROM maf1 WHERE id >'".$tm."' group by who order by id desc");
$kol = mysql_affected_rows();
echo '<a href="mafia">Мафия</a>('.$kol.')<br/>';
/*$roommaf = @$db->sql_fetchrow(@$db->sql_query ("Select name from rooms where rm='23' LIMIT 1;"));
echo '<a href="chat?rm=23">Мафия('.$asnum3.')</a><br/>'; */
echo '<br/>';
echo gb.'<a href="enter">Прихожая</a>'.div;
foot();
?>