<?
include_once '../sys/inc/start.php';
include_once '../sys/inc/compress.php';
include_once '../sys/inc/sess.php';
include_once '../sys/inc/home.php';
include_once '../sys/inc/settings.php';
include_once '../sys/inc/db_connect.php';
include_once '../sys/inc/ipua.php';
include_once '../sys/inc/fnc.php';
include_once '../sys/inc/user.php';

only_reg();
$set['title']='TOP 10 Самых говорливых';
include_once '../sys/inc/thead.php';
title();
err();
aut();

 $guest_sql = mysql_query( 'SELECT COUNT(*) as `c`,`id_user`, `user`.`nick` FROM `guest` LEFT JOIN `user` ON `guest`.`id_user` = `user`.`id` GROUP by `id_user` ORDER by `c` DESC LIMIT 15');


	
    while($guest_row = mysql_fetch_assoc($guest_sql))
    {
        echo "<a href='/info.php?id=$guest_row[id_user]'>$guest_row[nick]</a> - $guest_row[c] сообщений.<br />";
    }
 echo "<hr>";   
echo '<img src="/img/topka.gif"><a href="/top/">В Топ</a>';

include_once '../sys/inc/tfoot.php';
?>
