Файл: rayb.me/online.php
Строк: 168
<style>
.count1 {
float: right;
padding: 1px 9px;
}
</style>
<?php
require_once ('system/func.php');
$title = 'Кто онлайн';
require_once ('system/header.php');
auth();
antihack();
if(isset($_GET['admins'])){
$set['p_str'] = 20;
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `access` = '5'"),0);
$k_page = k_page($k_post,$set['p_str']);
$page = page($k_page);
$start = $set['p_str']*$page-$set['p_str'];
$q = mysql_query("SELECT * FROM `users` WHERE `access` = '5' ORDER BY `access` DESC LIMIT ".$start.", ".$set['p_str']."");
echo "<div class='bordered'><center><a href='online.php'>Онлайн</a> | Администрация [".mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `access` = '5'"),0)."] | <a href='?md'>Модераторы</a> [".mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `access` = '4'"),0)."]</center></div></br>";
while($post = mysql_fetch_assoc($q)) {
if($post['id']!=2){
$image = icons_user2($post['ico'],$post['online']);
$money_sek = n_f($money_updater[0]*$post['x2']*$post['g_x2']);
echo $image." <a href='/profile/".$post['id']."'>".$post['login']."</a>";
if($post['access'] == 7){
echo '<span style="font-size: 10px; color:#FF0000;"> [R] </span>';
}elseif($post['access'] == 6){
echo '<span style="font-size: 10px; color:#FF0000;"> [S] </span>';
}elseif($post['access'] == 5){
echo '<span style="font-size: 10px; color:#FF4500;"> [A] </span>';
}elseif($post['access'] == 4){
echo '<span style="font-size: 10px; color:#20859E;"> [M] </span>';
}elseif($post['access'] == 3){
echo '<span style="font-size: 10px; color:#FF4500;"> [a] </span>';
}elseif($post['access'] == 2){
echo '<span style="font-size: 10px; color:#20859E;"> [m] </span>';
}elseif($post['access'] == 1){
echo '<span style="font-size: 10px; color:#000000;"> [t] </span>';
}
echo "<a href='/mail/".$post['id']."'><img src='/img/mail_white.png' width='22' height='22' alt=''/></a><br>";
}}
if($k_post > 20){
str('admins/?',$k_page,$page); // Вывод страниц
}else{
}
require_once ('system/footer.php');
exit();
}
if(isset($_GET['md'])){
$set['p_str'] = 20;
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `access` = '4'"),0);
$k_page = k_page($k_post,$set['p_str']);
$page = page($k_page);
$start = $set['p_str']*$page-$set['p_str'];
$q = mysql_query("SELECT * FROM `users` WHERE `access` = '4' ORDER BY `access` DESC LIMIT ".$start.", ".$set['p_str']."");
echo "<div class='bordered'><center><a href='online.php'>Онлайн</a> | <a href='/online?admins'>Администрация</a> [".mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `access` = '5'"),0)."] | Модераторы [".mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `access` = '4'"),0)."]</center></div></br>";
while($post = mysql_fetch_assoc($q)) {
$image = icons_user2($post['ico'],$post['online']);
$money_sek = n_f($money_updater[0]*$post['x2']*$post['g_x2']);
echo $image." <a href='/profile/".$post['id']."'>".$post['login']."</a>";
if($post['access'] == 7){
echo '<span style="font-size: 10px; color:#FF0000;"> [R] </span>';
}elseif($post['access'] == 6){
echo '<span style="font-size: 10px; color:#FF0000;"> [S] </span>';
}elseif($post['access'] == 5){
echo '<span style="font-size: 10px; color:#FF4500;"> [A] </span>';
}elseif($post['access'] == 4){
echo '<span style="font-size: 10px; color:#20859E;"> [M] </span>';
}elseif($post['access'] == 3){
echo '<span style="font-size: 10px; color:#FF4500;"> [a] </span>';
}elseif($post['access'] == 2){
echo '<span style="font-size: 10px; color:#20859E;"> [m] </span>';
}elseif($post['access'] == 1){
echo '<span style="font-size: 10px; color:#000000;"> [t] </span>';
}
echo "<a href='/mail/".$post['id']."'><img src='/img/mail_white.png' width='22' height='22' alt=''/></a><br>";
}
if($k_post > 20){
str('admins/?',$k_page,$page); // Вывод страниц
}else{
}
echo '</div>';
require_once ('system/footer.php');
exit();
}
## Ищим игрока ##
if(isset($_GET['sea'])){
if(isset($_POST['login'])){
$login = text($_POST['login']);
$sql = $db->query("SELECT * FROM `users` WHERE `login` = '$login'");
if($sql->num_rows == 0) $err = 'Игрок не найден';
if(!isset($err)){
$ank = $db->query("SELECT `id` FROM `users` WHERE `login` = '$login'")->fetch_assoc();
header("Location: /profile/".$ank['id']."/");
//exit();
}else{
$_SESSION['msg'] = $err;
header('location: ?sea');
exit();
}
}
echo "<div class='bordered center'>";
echo '<form action="?sea" method="post">';
echo 'Ник игрока:<br><input class="center" type="text" name="login" maxlength="50" value="" /><br/>';
echo '<input type="submit" name="go" class="btni" value="Найти игрока">';
echo '</form>';
echo "</div>";
require_once ('system/footer.php');
exit();
}
echo "<div class='feedback'><center>Онлайн | <a href='/online?admins'>Администрация</a> [".mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `access` = '5'"),0)."] | <a href='/online?md'>Модераторы</a> [".mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `access` = '4'"),0)."]</center>";
echo "</div>";
$set['p_str'] = 20;
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `online` > '".(time()-800)."'"),0);
$k_page = k_page($k_post,$set['p_str']);
$page = page($k_page);
$start = $set['p_str']*$page-$set['p_str'];
$q = mysql_query("SELECT `access`, `id`, `login`, `angels`, `online`, `ava`, `status`,`ico` FROM `users` WHERE `online` > '".(time()-800)."' ORDER BY `angels` DESC LIMIT ".$start.", ".$set['p_str']."");
while($post = mysql_fetch_assoc($q)) {
echo "<div class='bordered photo'>";
if($post['ava']){
echo '<img class="photo" src="/img/avatar/'.$post['ava'].'" alt="$" width = "30" ></a> ';
}else{
echo '<img class="photo" src="/img/avatar/0.png?'.date().'" alt="$" width = "30" ></a> ';
}
$image = icons_user2($post['ico'],$post['online']);
echo $image." <a href='/profile/".$post['id']."'>".$post['login']."</a>";
if($post['access'] == 7){
echo '<span style="font-size: 10px; color:#FF0000;"> [R] </span>';
}elseif($post['access'] == 6){
echo '<span style="font-size: 10px; color:#FF0000;"> [S] </span>';
}elseif($post['access'] == 5){
echo '<span style="font-size: 10px; color:#FF4500;"> [A] </span>';
}elseif($post['access'] == 4){
echo '<span style="font-size: 10px; color:#20859E;"> [M] </span>';
}elseif($post['access'] == 3){
echo '<span style="font-size: 10px; color:#FF4500;"> [a] </span>';
}elseif($post['access'] == 2){
echo '<span style="font-size: 10px; color:#20859E;"> [m] </span>';
}elseif($post['access'] == 1){
echo '<span style="font-size: 10px; color:#000000;"> [t] </span>';
}
echo ' -<small><font color="gray">'.$post['self'].'</font><span id="timr">('.time_last($post['online']).')</span></small>';
echo "<div class='count1'>";
echo '<img src="/img/angel48.png" alt="$" width="16" height="16"> <span><font color="green">'.n_f($post['angels']).'</font></div>'.$self.'</span><br>';
echo '<font color="green">'.text_msg($post['status']).' </font></a>';
echo '</div>';
}
if($k_post > 20){
str('?',$k_page,$page); // Вывод страниц
}else{
}
echo "<br/>";
echo'<a class="btnl mt4" href="?sea" class="btn"> Поиск</a>';
require_once ('system/footer.php');
?>