Вход Регистрация
Файл: chat/top_umnik.php
Строк: 45
<?php
require '../lang_inc.php';
require 
'../sid.php';
require 
'../config.php';
$link = connect_db();
list(
$user, $id, $ps) = check_login($link);

$rm = my_int($_GET['rm']);

whorm(0, 'room');

include 
'../head.php';

$open = mysql_fetch_array(mysql_query("SELECT `open_chat` FROM `setting` WHERE `ids` = '1'"));
if (
$open[0] == 0) {
   
err(''.$lang['Чат закрыт Администратором'].'!');
   include 
'../foot.php';
   exit();
}

$empty = mysql_query("SELECT * FROM `rooms` WHERE `id` = '$rm' LIMIT 1");

if (
mysql_num_rows($empty) == FALSE) {
    
header('Location: ../index.php?lg='.$lg.'');
    die();
} else {
    
$inf = mysql_fetch_assoc($empty);
}

$ASnum = mysql_num_rows(mysql_query("SELECT * FROM `users` WHERE `room` = 'room$rm' AND `onl` + '200' > '" . time() . "' ORDER BY `onl` DESC"));

echo 
$div_left . $div_title . $inf['name'] . $div_end . $div_menu . '
     <a href="index.php?lg='
.$lg.'&amp;'.$ref.'">'.$lang['Комнаты'].'|</a>
     <a href="room.php?rm='
.$rm.'&amp;lg='.$lg.'">' . $inf['name'] . '</a>|
     <a href="say.php?rm='
.$rm.'&amp;lg='.$lg.'">'.$lang['Сказать'].'</a> |
     <b>'
.$lang['ТОП-10 умники'].'</b> |
     <a href="whoroom.php?rm='
.$rm.'&amp;lg='.$lg.'">'.$lang['Кто здесь'].'(' . $ASnum . ')</a>
     ' 
. $div_end;

$look = mysql_query("SELECT * FROM `users` WHERE `credits` > '0' ORDER BY `credits` DESC LIMIT 10");
$i = 0;

 if (
mysql_num_rows($look) != FALSE) {
 while(
$a = mysql_fetch_assoc($look)) {
    echo (
$i ++ % 2) ? $div_tworazdel : $div_razdel;
    echo 
'<b>' . us($a['id']) . '</b> '.$lang['ответов'].': (' . $a['credits'] . ')' . $div_end;
 }
} else {
    echo 
''.$lang['Умников нет'].'!<br/>';
}

echo 
$div_end . '<a href="room.php?rm='.$rm.'&amp;lg='.$lg.'">'.$lang['В чат'].'</a>';
include 
'../foot.php';
?>
Онлайн: 2
Реклама