Файл: in4at/whoroom.php
Строк: 38
<?php
##################################################################################################
## Script name : In4at ##
## Version : Final ##
## Made by : XPYCT(Сергей Мищенко) ##
## E-mail : bce-ok@bk.ru ##
## ICQ : 447-50-50-62 ##
## Site : http://vkontakte.ru/id31604521 ##
## Внимание! Скрипт распространяется бесплатно! Модификация W4at by XPYCT ##
##################################################################################################
define('REQ_2_chat', true);
require('4at_set.php');
require('db_con.php');
require('style.php');
if ($py !== spy_code) require('us_info.php');
if($rm==10) $rm.="&pwd=$pwd";
echo head;
if ($vv!=0) echo '<div align="center"><div class="d0"><b>Кто тут?</b></div>';
else echo '<card id="inroom" title="Кто тут?"><p align="center">';
echo $fsize1;
$room = "room".$rm;
$tm = time()-300;
if ($row['level'] < 7){
$res = mysql_query("Select who from $room WHERE id > '".$tm."' and hid != 1 group by who order by id desc;");
} else {
$res = mysql_query("Select who,hid from $room WHERE id > '".$tm."' group by who order by id desc;");
}
$kol = mysql_affected_rows();
$kol_all += ($kol-1);
$lines = mysql_fetch_array($res);
$roomselect = mysql_query("Select name from rooms where rm=$rm");
$rooms = mysql_fetch_array($roomselect);
$roomname=$rooms["name"];
echo "<a href="chat.php?$wp&rm=$rm">$roomname(".($kol-1)."):</a><br/>";
echo divide;
for ($k = 1;$k < $kol;$k++){
$lines = mysql_fetch_array($res);
$user = $lines['who'];
$hd = $lines["hid"];
$res1 = mysql_query("Select id from users WHERE user='".$user."'");
$kol1 = mysql_affected_rows();
$kol_all1 += ($kol1-1);
$lines1 = mysql_fetch_array($res1);
$nk = $lines1['id'];
if ($hd != 1)
echo "<a href="inside.php?$wp&rm=$rm&nk=$nk">$user</a>";
else if ($row['level'] > 6) echo "<a href="inside.php?$wp&rm=$rm&nk=$nk">$user(!)</a>";
if (($k+1) != $kol) echo ', ';
}
if($kol>1)
echo '<br/>';
unset($lines);
unset($lines1);
echo divide;
if (isset($rm)) echo "<a href="chat.php?$wp&rm=$rm">В чат</a><br/>";
echo '<a href="enter.php?id='.$id.'&ps='.$ps.'&ref='.$ref.'">Прихожая</a><br/>';
echo $fsize2;
if ($vv!=0) echo '</div>';
echo foot;
mysql_close ($link);
?>