Файл: vkollektive2014/play/forum_top_rating.php
Строк: 75
<?
include_once '../connect.php';
$location = '(В топ рейтинге форума)';
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Ретинг~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
$title = $title.' | Топ рейтинг форума';
require('../head.php');
echo '<div class="title">';
echo '<img src="/ico/forum.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_forum_messages` > 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_forum_messages` > 0 ORDER BY `stat_forum_messages` 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";
if($user['stat_forum_messages']>=100)echo "<img src='/ico/nagr.png' alt='' class='icon'</a>n";
if($user['stat_forum_messages']>=150)echo "<img src='/ico/nagr.png' alt='' class='icon'</a>n";
if($user['stat_forum_messages']>=200)echo "<img src='/ico/nagr.png' alt='' class='icon'</a>n";
if($user['stat_forum_messages']>=250)echo "<img src='/ico/nagr.png' alt='' class='icon'</a>n";
if($user['stat_forum_messages']>=1000)echo "<img src='/ico/nagr.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/forums.gif" alt="!" /> Написано сообщений в форуме: '.$user['stat_forum_messages'].'';
echo '<br/>';
echo '</div>';
@$i++;
}
echo '</div>';
navigation($page, $total,'forum_top_rating.php?act=rating&');
} else {
error(' Пользователей не найдено !');
}
echo '</div>';
require('../foot.php');
?>