Файл: public_html/onlineclan.php
Строк: 47
<?
include './system/common.php';
include './system/functions.php';
include './system/user.php';
if(!$user) {
header('location: /');
exit;
}
$title = 'Хотят в клан';
include './system/h.php';
?>
<div class="block_zero"><a href="/online.php">Все игроки </a>| <a href="/onlineclan.php">Хотят в клан</a> | <a href="/online/search/">Поиск</a></div>
<div class="mini-line"></div>
<div class="block_zero">
<center><a class="btn22" href="/onlineclan.php?act=ge">Отписатся</a></center>
<?
if($_GET['act']==ge) {
mysql_query("UPDATE `users` SET `clan_w` = 0 WHERE `id` = ".$user['id']."");
}
?>
<?
$max = 10;
$count = mysql_result(mysql_query('SELECT COUNT(*) FROM `users` WHERE `clan_w` = "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 `clan_w` = "1" ORDER BY `online` DESC LIMIT '.$start.', '.$max.'');
while($row = mysql_fetch_array($q)) {
?>
<img src='/images/icon/race/<?=$row['r'].($row['online'] > (time() - 1000) ? '':'-off')?>.png' alt='*'/> <a href='/user/<?=$row['id']?>/'><?=$row['login']?></a><br/>
<?
}
?>
<?=pages('/onlineclan.php/?');?>
</div><div class='main'>
<?
}
else
{
?>
<div class='con'>
<font color='#999'> Пусто</font>
</div>
<?
}
include './system/f.php';
?>