Файл: play/top_chat.php
Строк: 55
<?
include_once '../connect.php';
$location = '(В топ рейтинге чата)';
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Ретинг~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
$title = $title.' | Топ рейтинг чата';
require('../head.php');
echo '<div class="title">';
echo '<img src="/ico/chat.png" alt="!"/> <b>Топ пользователей чата:</b>';
echo '</div>';
if($u['setting_users_list']) $count = $u['setting_users_list']; else $count = 10;
$all = mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `stat_chat` > 0"), 0);
if($all > 0){
$total = num(($all - 1) / $count) + 1;
$page = num(@$_GET['page']);
if(empty($page) or $page < 0) $page = 1;
if($page > $total) $page = $total;
$start = $page * $count - $count;
$result = mysql_query("SELECT * FROM `users` WHERE `stat_chat` > 0 ORDER BY `stat_chat` DESC LIMIT $start, $count");
while($user = mysql_fetch_assoc($result)){
echo @$i % 2 ? '<div class="div">' : '<div class="div">';
if(ban($user['id']) || ($user['delete'] == 1)){
echo ''.ico($user['sex'],$user['admin']).' <a href = "/page.php?id='.$user['id'].'"><del>'.$user['login'].'</del></a> '.online($user['online']).'';
} else {
echo ''.ico($user['sex'],$user['admin']).' <a href = "/page.php?id='.$user['id'].'">'; echo GradientText("$user[login]", "$user[ncolor]", "$user[ncolor2]"); echo '</a> '.online($user['online']).'';
}
if($user['rating']>=1000 && $user['rating']<=1999)echo " <img src='/ico/b.png' alt='' class='icon'</a>n";
if($user['rating']>=2000 && $user['rating']<=2999)echo " <img src='/ico/s.png' alt='' class='icon'</a>n";
if($user['rating']>=3000)echo " <img src='/ico/z.png' alt='' class='/icon'</a>n";
$vip = mysql_fetch_array(mysql_query("SELECT * FROM `vip_users` WHERE `id_user` = '".$user['id']."'"));
if((int)$vip['id'] > 0){ echo " <img src='/style/vip_icons/{$vip['icon']}.gif' />n"; }
echo '<br/>';
echo '<img src="/ico/chat.png" alt="!" /> Написано сообщений в чате: '.$user['stat_chat'].'';
echo '<br/>';
echo '</div>';
@$i++;
}
echo '</div>';
navigation($page, $total,'top_chat.php?act=rating&');
} else {
error(' Пользователей не найдено !');
}
echo '</div>';
require('../foot.php');
?>