php title Онлайн paginate include_once protected sys php if user heade

  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
<?php
$title = 'Онлайн';
$paginate = 1;
include_once 'protected/sys.php';
if (!$user)
{
header("Location:/");
exit;
}
$c = 10;
$k_post = $db->rows("SELECT `id`,`online` FROM `users` WHERE `online`>?",
array(($config['time']-(3600*12))));
$k_page = k_page($k_post,$c);
$page = page($k_page);
$start = $c*$page-$c;
$db->offEmulate();
$OnlineArray = $db->fetchAll("SELECT * FROM `users` WHERE `online`>?
ORDER BY `online` LIMIT ?,?",
array(($config['time']-(3600*12)),$start,$c));
?>
<?
foreach ($OnlineArray as $data) {
?>
<a class ='mbtn mb2' href ='/user?id=<?=$data['id'];?>'/>
<img src = '/imgData/static/<?=$data['sex'];?>.png'/>
<?=$data['login'];?>
<?=($data['online']>($config['time']-600) ? '<img src="/imgData/static/online.png"/>':
null);?>
<span style ='float:right; margin-left:2px;'/>
Рейтинг : <?=($data['str']+$data['vit']+$dat['def']);?>
</span>
</a>
<?
}
?>
<?
if ($k_page>1){
?>
<div class ='content'/>
<div class="hr_arr mt2 mb2 mlr10">
<div class="alf">
<div class="art">
<div class="acn">
</div>
</div>
</div>
</div>
<center>
<?
str('?',$k_page,$page); // Вывод страниц
?>
</center>
<div class="hr_arr mt2 mb2 mlr10">
<div class="alf">
<div class="art">
<div class="acn">
</div>
</div>
</div>
</div>
</div>
<?
}
?>
<div class="bntf">
<div class="small">
<div class="nl">
<div class="nr cntr lyell lh1 p5 sh">
<img src="/imgData/static/online.png" alt="online" class="icon">
- игрок проявлял активность за последние 10 минут
</div>
</div>
</div>
</div>
<a class ='mbtn mb2' href ='/search_user'/> Поиск игроков </a>
<?
include_once $config['root'].'/protected/footermain.php';