Файл: warhis.ru/moderators.php
Строк: 25
<?
include './system/common.php';
include './system/functions.php';
include './system/user.php';
if(!$user) {
header('location: /');
exit;
}
$title = 'Список модераторов';
include './system/h.php';
?>
<div class='main'>
<?
$max = 10;
$count = mysql_result(mysql_query('SELECT COUNT(*) FROM `users` WHERE `access` > 1'),0);
$pages = ceil($count/$max);
$page = _string(_num($_GET['page']));
if($page > $pages) {
$page = $pages;
}
if($page < 1) {
$page = 1;
}
$start = $page * $max - $max;
if($count > 0) {
?>
<div class='block_zero'>
<?
$q = mysql_query('SELECT * FROM `users` WHERE `access` > 1 ORDER BY `online` DESC LIMIT '.$start.', '.$max.'');
while($row = mysql_fetch_array($q)) {
?>
<img src='/images/icon/race/<?=$row['r'].($row['online'] > (time() - 300) ? '':'-off')?>.png' alt='*'/> <a href='/user/<?=$row['id']?>/'><?=$row['login']?></a><br/>
<?
}
?>
<hr>
<?=pages('/moderators/?');?>
</div>
</div>
<?
}
else
{
?>
<div class='block_zero'>
<font color='#999'>Модераторов нет</font>
</div></div>
<?
}
include './system/f.php';
?>