Файл: vsime.com/statistics/inc/act_index.php
Строк: 84
<?php
if (isset($_GET['id'])) {
$ank = profile(intval($_GET['id']));
if ($ank['id'] == 0) {
$title .= ' - Ошибка!';
ex_head();
$error[] = 'Пользователь не найден.';
show_errors();
ex_foot();
}
} else {
if_user('is_reg');
$ank = $user;
}
if (isset($user) && $user['id'] == $ank['id'])$title = 'Моя статистика';
else $title .= " $ank[nick]";
ex_head();
echo "<style>
.border {border-left: 1px solid #B3B3B3;border-right: 1px solid #B3B3B3;}
</style>";
echo "<div class='border'>n";
echo '<div class="b_switcher"><table width="100%"><tbody><tr><td><a href="'.htmlspecialchars($_SERVER['HTTP_REFERER']).'" class="blue_link">Профиль</a></td><td><span class="active_item">Статистика</span></td></tr></tbody></table></div>';
echo "</div>n";
echo '<div class=list><center>';
show_avatar_page($ank['id'], 'big', 1, 1);
echo '</center></div>';
echo "<div class='list'>n";
$count_topics = mysqli_result("SELECT COUNT(*) FROM `forum` WHERE `id_user` = '$ank[id]' AND `type` = 'topic'");
echo imgsd('forum.png')." Тем в форуме: $count_topics<br />n";
echo "</div>n";
echo "<div class='menu'>n";
$count_forum_comments = mysqli_result("SELECT COUNT(*) FROM `forum_komm` WHERE `id_user` = '$ank[id]'");
echo imgsd('message.png')." Комментариев в форуме: $count_forum_comments<br />n";
echo "</div>n";
echo "<div class='list'>n";
$count_chat_messages = mysqli_result("SELECT COUNT(*) FROM `chat` WHERE `id_user` = '$ank[id]' AND `type` = 'post'");
echo imgsd('chat.png')." Сообщений в чате: $count_chat_messages<br />n";
echo "</div>n";
echo "<div class='menu'>n";
$count_files_zone = mysqli_result("SELECT COUNT(*) FROM `files_zone` WHERE `id_user` = '$ank[id]' AND (`type` = 'file' OR `type` = 'foto')");
echo imgsd('download.png')." Файлов в ЗО: $count_files_zone<br />n";
echo "</div>n";
echo "<div class='list'>n";
echo imgsd('duels.png')." Выигранных дуэлей: $ank[duels_wins]<br />n";
echo "</div>n";
echo "<div class='menu'>n";
$count_sended_gifts = mysqli_result("SELECT COUNT(*) FROM `gifts` WHERE `id_kont` = '$ank[id]'");
echo imgsd('gift.png')." Подарено подарков: $count_sended_gifts<br />n";
echo "</div>n";
echo "<div class='list'>n";
$count_did_actions = mysqli_result("SELECT COUNT(*) FROM `actions_user` WHERE `id_ank` = '$ank[id]'");
echo imgsd('action_user.png')." Выполненых действий: $count_did_actions<br />n";
echo "</div>n";
echo "</div>n";
echo "<div class='foot'>n";
echo image_back().' <a href="'.htmlspecialchars($_SERVER['HTTP_REFERER']).'">Назад</a><br />';
echo "</div>n";
ex_foot();
?>