php require_once _SERVER DOCUMENT_ROOT core system php header Игроки о

 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
<?php
require_once $_SERVER['DOCUMENT_ROOT'] . '/core/system.php';
$header = 'Игроки онлайн';
if ($user['mesto'] != $header)
{
mysql_query("UPDATE `user` set `mesto` = 'Игроки онлайн' where `id` = '".$user['id']."' ");
}
require_once $_SERVER['DOCUMENT_ROOT'] .'/core/head.php';
$banData = @mysql_fetch_assoc(mysql_query(
"SELECT `ban`,`id_us` FROM `ban`
WHERE `id_us`='".$user['id']."'"
));
if ($banData['ban'] == 3)
{
header("Location:/moduls/ban");
exit;
}
if (!$user)
{
header("Location:/");
exit;
}
if ($user['prava'] >=4)
{
$real = mysql_num_rows(mysql_query(
"SELECT `online`,`bot` FROM `user`
WHERE `online`>'".($_SERVER['REQUEST_TIME']-60)."'
and `bot`='0'"
));
?>
Активные за минуту:
<?php
echo $real;
}
$kadar = @mysql_num_rows(mysql_query(
"SELECT `id` FROM `user`
WHERE `online`>'".($_SERVER['REQUEST_TIME']-10800)."'
and `bot`='0'
and `plem`='ogn'"
));
$sarma = @mysql_num_rows(mysql_query(
"SELECT `id` FROM `user`
WHERE `online`>'".($_SERVER['REQUEST_TIME']-10800)."'
and `bot`='0'
and `plen`='mol'"
));
echo $kadar.' vs '.$sarma;
$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`,`prava`,`level`
,`mesto`,`font`,`pumpit`
FROM `user`
WHERE `online`>'".($_SERVER['REQUEST_TIME']-(isset($_GET['allon'] ? 60:10800))."'
and `bot`='0'
ORDER BY `online_total`
DESC LIMIT $start,8"));
while ($row = mysql_fetch_assoc($q))
{
?>
<a href ="/user/<?php echo $row['id'];?>"/>
<?php ($row['online']>($_SERVER['REQUEST_TIME']-10800) ? 'on':'off');?>
<?php echo $row['nick'];?>
<?php
}
($k_page > 1 ? str('?',$k_page,$page) : null);
include_once $_SERVER['DOCUMENT_ROOT'] . '/core/foot.php';