php require_once core system php header Игроки онлайн mysql_query UPDA

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<?php
require_once '../core/system.php';
$header = 'Игроки онлайн';
mysql_query("UPDATE `user` set `mesto` = 'Игроки онлайн' where `id` = '".$user['id']."' LIMIT 1");
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'] >= 4){
$real = mysql_result(mysql_query("SELECT COUNT(id) FROM `user` WHERE `online` > '".($_SERVER['REQUEST_TIME']-60)."' and `bot`!='1'"),0);
if(!isset($_GET['allon'])){
echo"<div class='head'>
<a class='mini-fight center' href='?allon'>
Активные за минуту (".$real.")</a>
</div>
<div class='line'></div>";
} else {
echo'<div class="head">
<a class="mini-fight center" href="?">
Скрыть активных ('.$real.')
</br>
</a>
</div>
<div class="line"></div>';
}
}
echo'<div class="foot foot">';
$kadar = mysql_result(mysql_query("SELECT COUNT(id) FROM `user` WHERE `plem`='ogn' and `online` > '".($_SERVER['REQUEST_TIME']-10800)."' and `bot`!='1'"),0);
$sarma = mysql_result(mysql_query("SELECT COUNT(id) FROM `user` WHERE `plem`='mol' and `online` > '".($_SERVER['REQUEST_TIME']-10800)."' and `bot`!='1'"),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>
<div class="line"></div>';
$k_post = mysql_result(mysql_query("SELECT COUNT(id) FROM `user` WHERE `online` > '".($_SERVER['REQUEST_TIME']-10800)."' and `bot`!='1'"),0);
$k_page = k_page($k_post,8);
$page = page($k_page);
$start = 8*$page-8;
if(!isset($_GET['allon'])){
$q = mysql_query("SELECT id,nick,prava,level,mesto,font,pumpit FROM `user` WHERE `online` > '".($_SERVER['REQUEST_TIME']-10800)."' and `bot`!='1' ORDER BY `online_total` DESC LIMIT ".$start.", 8");
} else {
$q = mysql_query("SELECT id,nick,prava,level,mesto,font,pumpit FROM `user` WHERE `online` > '".($_SERVER['REQUEST_TIME']-60)."' and `bot`!='1' ORDER BY `online_total` DESC LIMIT ".$start.", 400");
}
while($post = mysql_fetch_array($q)) {
echo '<div class="but-list">';
if($post['prava'] == 5){
$status = "<font color='ffc22b'>[A]</font>";
$color = "#F7990D";
}
if($post['prava'] == 4){
$status = "<font color='ffc22b'>[a]</font>";
$color = "EBC621";
}
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'].'/">';
echo online($post['id']);
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'] >= 4 and $post['pumpit'] > 0){
echo'<span class="float-right">
<img src="/images/pay/pumpit.png">
</span>';
}
echo'</a>
</div>';
}
if ($k_page > 1){
echo'<div class="line"></div>';
str('?',$k_page, $page);
}
?>
<div class="line"></div>
<div class="but-list-light">
<a href="/user/search">
<img src="/images/icon/search.png">
Поиск игроков
</a>
</div>
<?
require_once '../core/foot.php';
?>