Файл: Source/pages/online.php
Строк: 48
<?php
/*
* Script name: Points4Prize
* Author: Soft Projects
* Date created: 15/07/2015
*/
require_once 'inc/header.php';
?>
<body class="no-slider">
<!-- <body class="has-top-menu"> -->
<!-- BEGIN #slider-imgs -->
<div id="slider-imgs">
<div class="featured-img-box">
<div id="featured-img-1" class="featured-img"></div>
<div id="featured-img-2" class="featured-img invisible"></div>
<div id="featured-img-3" class="featured-img invisible"></div>
<div id="featured-img-4" class="featured-img invisible"></div>
</div>
<!-- END #slider-imgs -->
</div>
<!-- BEGIN #top-layer -->
<div id="top-layer">
<div id="header-top">
<?php
require_once 'inc/header_top.php';
?>
</div>
<section id="content">
<header id="header">
<div id="menu-bottom">
<?php
require_once 'inc/menu_bottom.php';
?>
</div>
<div class="wrapper">
<div class="header-breadcrumbs">
<?php require_once 'inc/stats.php'; ?>
<ul>
<li><a href="index.php">Home</a></li>
<li>Online (<?php
$time = time() - 600;
$rq = mysql_query("SELECT * FROM `vn_users` WHERE lastact >= '$time'") or die(mysql_error());
$broi = mysql_num_rows($rq);
echo $broi;
?>)</li>
</ul>
</div>
</div>
</header>
<div id="main-box" class="full-width">
<div id="main">
<div class="content-padding">
<div class="friends-block">
<?php
if ($broi >= 1) {
$time = time();
$result = mysql_query("SELECT * FROM vn_users ORDER by id DESC") or die(mysql_error());
for ($i = 0; $i < mysql_num_rows($result); ++$i) {
$row = mysql_fetch_array($result);
if ($row['lastact'] < $time - 600 or $row['loged'] == 0) {
$status = "<font size='1' color='red'>offline</font>";
} else {
if (empty($row['avatar'])) {
$avatar = "uploads/avatars/noavatar.png";
} else {
$avatar = $row['avatar'];
}
echo "
<div style='width: 14%;' class='friend-single'>
<a class='avatar online' href='/u:$row[user]'>
<img src='$avatar' alt='Avatar' class='setborder' data-text-tooltip='$row[user]'/>
<div class='friend-user user-tooltip'><b>$row[user]</b> </div>
</a>
</div>
";
}
}
} else {
echo 'No users online.';
}
?>
</div>
</div>
<div class="clear-float"></div>
</div>
<div class="clear-float"></div>
</div>
</div>
</div>
<?php
require_once 'inc/footer.php';
?>