Файл: rating/duel.php
Строк: 63
<?php
require_once '../core/system.php';
echo only_reg();
$header = 'Рейтинг игроков';
require_once '../core/head.php';
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `user` where duel_rating > '0'"),0);
$k_page = k_page($k_post,$set['p_str']);
$page = page($k_page);
$start = $set['p_str']*$page-$set['p_str'];
$q = mysql_query("SELECT * FROM `user` where duel_rating > '0' ORDER BY `duel_rating` DESC LIMIT $start, $set[p_str]");
$p= mysql_query("SELECT * FROM `user` ORDER BY `duel_rating` DESC LIMIT 1");
echo "<div class='block_zero'>";
while($post2 = mysql_fetch_assoc($p)) {
echo "<div class='dgreen bold'><img src='/images/icon/crys/1.png'> Чемпион дуэлей</div><div class='float-left'><a href='/user/$post2[id]/'><img src='/style/duel/".($post2['pol'] == 0 ? "zj" : "m")."/$post2[avatar].png' width='120' height='160' style='margin-right:10px;margin-top:3px;' alt=''/></a></div>";
if ($post2['storona'] == '0') {?><img src="/images/icon/0.png" height="11" alt="a"/> <?php }
if ($post2['storona'] == '1') {?><img src="/images/icon/1.png" height="11" alt="d"/> <?php }
echo online($post2[id]);
echo " $post2[nick]<br/><br/><img src='/images/icon/str.png' alt='str'/> Сила: $post2[sila]<br/><img src='/images/icon/vit.png' alt='vit'/> Здоровье: $post2[max_health]<br/><img src='/images/icon/agi.png' alt='agi'/> Ловкость: $post2[lovk]<br/><img src='/images/icon/def.png' alt='def'/> Защита: $post2[zashit]<br/><div style='clear:both;'></div>";
}
while($post = mysql_fetch_assoc($q)) {
if ($post['storona'] == '0') {?><img src="/images/icon/0.png" height="11" alt="a"/> <?php }
if ($post['storona'] == '1') {?><img src="/images/icon/1.png" height="11" alt="d"/> <?php }
echo online($post[id]);
echo ' <a href="/user/'.$post['id'].'/">'.$post['nick'].'</a> '.$post[duel_rating].'<br />';
}
echo "</div>";
echo "<div class='mini-line'></div>";
echo "<div class='block_zero'><span class='hint'>Ваш рейтинг:</span><span class='green'>$user[duel_rating]</span></div>";
echo "<div class='mini-line'></div>";
echo "<div class='menuList'><li><a href='/rating/sumstat.php'><img src='/images/icon/str.png' alt=''/>По сумме параметров</a></li>
<li><a class='grey' href='/rating/duel.php'><img src='/images/icon/sumstat.png' alt=''/>Дуэли</a></li></div><div class='mini-line'></div>";
if ($k_page>1){
echo "<div class='dot-line'></div>";
str('?',$k_page,$page); // Вывод страниц
}
require_once '../core/foot.php';
?>