Размер файла: 1.23Kb
<?php
require '../inc/func.php';
bk_head('Member');
require '../inc/head.php';
if (!$user) {
header ('location: /index.php');
}
$UsersOn = mysql_result(mysql_query('select count(id) from `users` where `last_active`>='.(time() - 300).''),0);
echo '<div class="list1"><div class="tt"> Người dùng</div>Online: '.$UsersOn.'';
echo '<div class="shadow">Tìm Theo ♥<span>Tất Cả</span> <span><a href="girl.php">Girl</a></span> <span><a href="boy.php">Boy</a></span></div>';
//*Trang*//
$total = mysql_result(mysql_query("SELECT COUNT(*) FROM `users`"), 0);
$display = 3;
$count_pages = ceil($total/$display);
$page = (isset($_GET['page']) and is_numeric($_GET['page']) and $_GET['page']>1 and $_GET['page']<=$count_pages) ? $_GET['page'] : 1;
$start = $page*$display-$display;
//*Trang*//
$users = mysql_query('SELECT * FROM users ORDER BY regtime DESC LIMIT '.$start.','.$display);
while ($susers = mysql_fetch_assoc($users)) {
echo '<div class="list1"><a href="/u/'.$susers['id'].'">'.$susers['username'].'</a></div>';
}
if($total > 3 && $page < $count_pages)
{
echo '<div class="shadow">';
pages($page,$count_pages,'?page=');
echo '</div>';
}
echo '<br /></div>';
bk_foot();
?>