Файл: test.masteram.us/top/rating.php
Строк: 60
<?
include '../Core.php';
only_reg();
include_once '../sys/inc/thead.php';
title();
err();
echo "<div class='menu_razd'>";
echo "<center><img src='/style/icons/stat14.png'> Самые популярные!</center>";
echo "</div>n";
include_once '../top/rating_best.php';
echo "<div class='menu_razd'>";
echo "<center><img src='/style/icons/stat14.png'> Топ самых популярных!</center>";
echo "</div>n";
echo "<table class='post'>n";
$k_rating = mysql_num_rows(mysql_query("SELECT `id` FROM `user` WHERE `rating` > '0'"));
$k_page = k_page($k_rating,$set['p_str']);
$page = page($k_page);
$start = $set['p_str']*$page-$set['p_str'];
if ($k_rating=='0')
{
echo 'Нет результатов';
}
$q_rating = mysql_query("SELECT * FROM `user` WHERE `rating` > '0' ORDER BY `rating` DESC LIMIT $start, $set[p_str]");
while ($rating = mysql_fetch_array($q_rating))
{
echo '<tr><td class="icon14">';
avatar3($rating['id']);
echo '</td><td class="anput">';
echo "".online($rating['id'])." n";
echo "<a href='/info.php?id=$rating[id]'><span style="color:$rating[ncolor]">$rating[nick]</span></a><br />n";
echo "<img src='/style/icons/stat14.png'>n";
echo 'Рейтинг: <font color="red">'.$rating['rating'].'</font> %<br />';
echo "</div>";
echo '</td></tr>';
}
echo "</table>";
if ($k_page>1)str("rating.php?",$k_page,$page);
echo' <img src="/style/back.gif" alt="" class="icon"/> <a href="/top/">Рейтинги</a><br/>';
include_once '../sys/inc/tfoot.php';
?>