Файл: chats/who.php
Строк: 72
<?php
//*********************/
//Скрипт переписан админом
//http://waufon.ru Кот * Проги для компа и мобил
//Помогал админ
//http://pfc.h2m.ru/ КОСМОС * Посети непожалееш
//всю эту срань господнюю
//перехуяривали на дыры
//http://rus-waphost.ru/ Nitrix * Супер хост без висов
/*********************/
require( "inc/conf.inc.php" );
require( "inc/connect.php" );
echo "<title>Online</title>";
echo "<style type="text/css">";
echo "body { font-size: x-small; color: {$tcol}; background-color: {$bcol} }";
echo "a:link,a:visited { text-decoration: underline; color: {$lcol} }";
echo "div { border-style:solid; border-width: 1px; text-align: center; background-color: {$rcol} }";
echo "</style>";
echo "</head>";
echo "<body>";
$q_count = @mysql_query( @"SELECT count(*) FROM users WHERE ltime>'".@intval( @time( ) - 300 )."'" );
$count = @mysql_fetch_array( @$q_count );
echo "<div align="center">В чате <b>[".$count['count(*)']."]</b> чел.</div>";
$q = @mysql_query( "select `var`,`name` from setts order by var;" );
while ( $droom = @mysql_fetch_array( @$q ) )
{
$q_online = @mysql_query( @"SELECT `login` FROM users WHERE ltime>'".@intval( @time( ) - 300 )."' AND lroom='".@$droom['var']."' order by ltime desc;" );
echo "<font color={$lcol}><u>".$droom['name'].":</u></font><br/>";
while ( $donline = @mysql_fetch_array( @$q_online ) )
{
$flag = true;
echo $donline['login'].", ";
}
echo "<br/>";
}
print "<font color={$lcol}><u>Прихожая:</u></font><br/>";
$q_online = mysql_query( "SELECT `login` FROM users WHERE ltime>'".intval( time( ) - 300 )."' AND `lroom`='11' order by ltime desc;" );
while ( $donline = mysql_fetch_array( $q_online ) )
{
print $donline['login'].", ";
}
echo "<div align="center"><form method="post" action="enter.php">";
echo "Логин:<br/>";
echo "<input type="text" name="login" maxlength="15"/><br/>";
echo "Пароль:<br/>";
echo "<input type="text" name="pass" maxlength="20" size="15"/><br/>";
echo "<input value="Вход" type="submit"/>";
echo "</form>";
echo "<a href="rega.php">Регистрация</a><br/>";
echo "<a href="index.php">Главная</a></div><p>{$ip}</p>";
echo "</body></html>";
mysql_close( $link );
?>