File size: 3.63Kb
<?php
require_once '../core/system.php';
$header = 'Игроки онлайн';
if($user['mesto'] != 'Игроки онлайн') mysql_query("UPDATE `user` set `mesto` = 'Игроки онлайн' where `id` = '".$user['id']."'");
require_once '../core/head.php';
$req = mysql_query("SELECT * from `ban` where `id_us` = '".$user['id']."' and `time`>'".$_SERVER['REQUEST_TIME']."'");
$ban = mysql_fetch_array($req);
if($ban['ban'] == 3){
header('Location: /moduls/ban');
}
if(!isset($user['id'])) header('Location: /');
if($user['prava'] > 3 OR $user['id']=='11'){
$real = mysql_result(mysql_query("SELECT COUNT(id) FROM `user` WHERE `online` > '".($_SERVER['REQUEST_TIME']-60)."' and `bot`='0'"),0);
if(!isset($_GET['allon'])){
echo"<div class='head'>
<a class='mini-fight center' href='?allon'>
Активные за минуту (".$real.")</a>
</div>
<hr>";
} else {
echo'<div class="head">
<a class="mini-fight center" href="?">
Скрыть активных ('.$real.')
</br>
</a>
</div>
<hr>';
}
}
echo'<div class="foot foot">';
$kadar = @mysql_result(mysql_query(
"SELECT COUNT(id) FROM `user`
WHERE `online`>'".($_SERVER['REQUEST_TIME']-14400)."'
and `bot`='0'
and `plem`='ogn'"
),0);
$sarma = @mysql_result(mysql_query(
"SELECT COUNT(id) FROM `user`
WHERE `online`>'".($_SERVER['REQUEST_TIME']-14400)."'
and `bot`='0'
and `plem`='mol'"
),0);
echo'<div class="inpc-ar center">
<font color="#CDC9C9">
<img src="/images/icon/race/0.png">
'.$kadar.' vs '.$sarma.'
<img src="/images/icon/race/1.png">
</font>
</div>
</div>
<hr>';
$k_post = $kadar + $sarma;
$k_page = k_page($k_post,8);
$page = page($k_page);
$start = 8*$page-8;
$q = mysql_query ("SELECT `id`,`nick`,`pumpit`,`level`,`prava`,`font`,`mesto`, `fs_id`, `ok`, `mail`
FROM `user`
WHERE `bot`='0'
and `online`>'".($_SERVER['REQUEST_TIME']-(isset($_GET['allon']) ? 60:14400))."'
ORDER BY `online_total`
DESC LIMIT ".$start.", ".(isset($_GET['allon']) ? 600:8)." ");
while($post = mysql_fetch_array($q)) {
echo '<div class="but-list">';
if($post['prava'] == 5){
$status = "<font color='ffc22b'>[A]</font>";
}
if($post['prava'] == 4){
$status = "<font color='ffc22b'>[a]</font>";
}
if($post['prava'] == 3){
$status = "<font color='ffc22b'>[M]</font>";
}
if($post['prava'] == 2){
$status = "<font color='ffc22b'>[m]</font>";
}
echo '<a href="/user/'.$post['id'].'/">';
$data = mysql_fetch_object(mysql_query("SELECT `id`,`plem`,`online` FROM `user` WHERE `id`='".$post['id']."'"));
?>
<img src="/images/icon/race/<?=($data->plem == 'ogn' ? 0 : 1);?>.png" style ="<?=($data->online < ($_SERVER['REQUEST_TIME']-3600) ? 'opacity:0.2;' : null);?>"/>
<?php
echo' <font color="'.$post['font'].'">'.$post['nick'].'</font>';
if($post['prava'] > 1){
echo' '.$status.'';
}
echo', <img src="/images/icon/level.png">'.$post['level'].', ('.$post['mesto'].')';
if($user['prava'] >= 2 and $post['pumpit'] > 0){
echo'<span class="float-right">
<img src="/images/pay/pumpit.png">
</span>';
}
if($user['prava'] >= 2 and $post['fs_id'] > 0){
echo'<span class="float-right">
<img src="/images/fs/fs.png">
</span>';
}
if($user['prava'] >= 2 and $post['ok'] > 0){
echo'<span class="float-right">
<img src="/ok/ok.png">
</span>';
}
if($user['prava'] >= 2 and $post['mail'] > 0){
echo'<span class="float-right">
<img src="/images/icon/mailik.png">
</span>';
}
echo'</a>
</div>';
}
if ($k_page > 1){
echo'<hr>';
str('?',$k_page, $page);
}
?>
<hr>
<div class="but-list-light">
<a href="/user/search">
<img src="/images/icon/search.png">
Поиск игроков
</a>
</div>
<?
require_once '../core/foot.php';
?>