<?
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';
$set['title']='Активность пользователя';
include_once '../../sys/inc/thead.php';
title();
err();
aut();
if (isset($user))$ank['id']=$user['id'];
if (isset($_GET['id']))$ank['id']=intval($_GET['id']);
$ank = get_user($ank['id']);

$forum_p=mysql_result(mysql_query("SELECT COUNT(*) FROM `forum_p` WHERE `id_user` = '$ank[id]'"),0);
$news_komm=mysql_result(mysql_query("SELECT COUNT(*) FROM `news_komm` WHERE `id_user` = '$ank[id]'"),0);
$obmennik_komm=mysql_result(mysql_query("SELECT COUNT(*) FROM `obmennik_komm` WHERE `id_user` = '$ank[id]'"),0);
$status_komm=mysql_result(mysql_query("SELECT COUNT(*) FROM `status_komm` WHERE `id_user` = '$ank[id]'"),0);
$gallery_komm=mysql_result(mysql_query("SELECT COUNT(*) FROM `gallery_komm` WHERE `id_user` = '$ank[id]'"),0);
$guest=mysql_result(mysql_query("SELECT COUNT(*) FROM `guest` WHERE `id_user` = '$ank[id]'"),0);
$notes_komm=mysql_result(mysql_query("SELECT COUNT(*) FROM `notes_komm` WHERE `id_user` = '$ank[id]'"),0);
$chat_post=mysql_result(mysql_query("SELECT COUNT(*) FROM `chat_post` WHERE `id_user` = '$ank[id]'"),0);
$mail_sms=mysql_result(mysql_query("SELECT COUNT(*) FROM `mail` WHERE `id_user` = '$ank[id]'"),0);
echo "<div class='main_menu'>Сообщения в форуме: ";
echo "(" . $forum_p . ")<br/>";
echo "Сообщения в чате: ";
echo "(" . $chat_post . ")<br/>";
echo "Сообщения в беседке: ";
echo "(" . $guest . ")<br/>";
echo "Сообщения в почте: ";
echo "(" . $mail_sms . ")<br/>";
echo "Сообщения в фото: ";
echo "(" . $gallery_komm . ")<br/>";
echo "Сообщения в новостях: ";
echo "(" . $news_komm . ")<br/>";
echo "Сообщения в дневниках: ";
echo "(" . $notes_komm . ")<br/>";
echo "Сообщения в файлах: ";
echo "(" . $obmennik_komm . ")<br/>";
echo "Сообщения в статусах: ";
echo "(" . $status_komm . ")</div>";
include_once '../../sys/inc/tfoot.php';
?>