Файл: users/users_rating.php
Строк: 63
<?
require_once("../core/core.php");
require_once("../core/ava_users.php");
$title = $title . ' :: По рейтингу';
$location = 'В обитателях';
include ('../head.php');
    echo '<div class="title"><center>';
    echo 'Обитатели';
    echo '</center></div>';
Echo '<div class="login"><a href = users_online.php>Онлайн</a></div>';
    
if (@$u['setting_users_list'])
    $count = $u['setting_users_list']; else
    $count = 10;
$all = mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `rating`"), 0);
if ($all > 0) {
    $total = intval(($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 `rating` ORDER BY `rating` DESC LIMIT $start, $count");
    while ($user = mysql_fetch_assoc($result)) {
            echo $i % 2 ? '<div class="post_0">' : '<div class="post_1">';
if ($user['id'] != @$u['id']) {
echo '<span style="float:right;"><a href="/mail.php?act=write&id='.$user['id'].'"><img src="/style/page/mail.png"></a></span>';
}
        echo '<table><tr><td VALIGN=top>';
        ava($user['id'], 50);
        echo '</td><td VALIGN=top>';
        if ($user['delete'] == 1) {
            echo '' . ico($user['sex'], $user['admin'], $user['online']) . ' <a href = "/page.php?id=' . $user['id'] . '"><del><b><font color="#79358c">' . $user['login'] . '</font></b></del></a>';
        } else {
            echo '' . ico($user['sex'], $user['admin'], $user['online']) . ' <a href = "/page.php?id=' . $user['id'] . '"><b><font color="#79358c">' . $user['login'] . '</font></b></a>';
        }
        echo '' . medal($user['rating']) . '';
        if ($user['online'] > (time() - $system['online_time'])) {
            echo '<font color="black">';
            echo ' ' . $user['location'] . '';
            echo '</font>';
        }
        echo '<br />';
//~~~~~~~~~~~~~~~Высчитываю возвраст~~~~~~~~~~~~~~//
        $e = date("Y");
        $d = $user['anketa_byear'];
        $qwe = $e - $d;
        if ($qwe == $e) {
            
        } else {
            echo "$qwe";
        }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
        if ($user['anketa_city']) {
            if ($user['anketa_byear']) {
                echo ', ';
            }
            echo '' . $user['anketa_city'] . '';
            echo '<br />';
        } else {
            if ($user['anketa_byear']) {
            }
        }
if($u['id']){
if($user['id']!=$u['id']){
$req = mysql_query("SELECT*FROM `friends`WHERE `user` = '".$u['id']."' and friend = '".$user['id']."' LIMIT 1");
if(mysql_num_rows($req))
echo '<img src="/style/page/delete.gif"alt="!"/> <a href = "/friends.php?act=delete&id='.$user
['id'].'">Удалить</a><br/>';
else
echo '<img src="/style/page/go_friend.gif"alt="!"/> <a href = "/friends.php?act=adding&id='.$user['id'].'">Добавить</a><br/>';
}
}
        echo '</table></div>';
$i++;
    }
    navigation($page, $total, 'users_rating.php?&');
} else {
    echo '<div class="div"> Не найдено ни одного Обитателя имеющий рейтинг!</div>';
}
echo '</div>';
include '../foot.php';
?>