Файл: bdls.ru/rating.php
Строк: 16
<?php
include ('./system/common.php');
include ('./system/functions.php');
include ('./system/user.php');
$title = 'Рейтинг';
include ('./system/h.php');
if(!$user) {
header('location: /');
exit;
}
$max = 10;
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `users`"),0);
$k_page = k_page($k_post,$max);
$page = page($k_page);
$start = $max*$page-$max;
$sql = mysql_query("SELECT * FROM `users` ORDER BY `level` DESC LIMIT $start, $max");
while($sqls = mysql_fetch_assoc($sql))
{
echo '<a href="/user.php?id='.$sqls['id'].'" class="link">'.$sqls['login'].' <span style="float: right;"><img src="/images/level.png"> '.$sqls['level'].'</span></a>';
}
if($k_post<1) {
echo '<div class="block center">Нет игроков!</div>';
}
if($k_page>1) echo str('?',$k_page,$page);
require_once './system/f.php';
?>