Просмотр файла users/boy.php

Размер файла: 1.26Kb
<?php
require '../inc/func.php';
bk_head('Boy Member');
require '../inc/head.php';

####male###
$UsersOn = mysql_result(mysql_query('select count(id) from `users` where `last_active`>='.(time() - 300).''),0);
echo '<div class="list1"><div class="tt">&nbsp;Người dùng</div>Online: '.$UsersOn.'';
echo '<div class="shadow">Tìm Theo<a href="index.php"><span>Tất Cả</span></a>&nbsp;<span><a href="girl.php">Girl</a></span>&nbsp;&nbsp;&hearts;<span>Boy</span></div>';

//*Trang*//
$total = mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE gender = 'm' "), 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*//
if($total > 0){
$m_Users = mysql_query('SELECT * FROM users WHERE gender = "m" ORDER BY regtime DESC LIMIT '.$start.','.$display);
while ($sm_Users = mysql_fetch_assoc($m_Users)){
echo '<div class="list1"><a href="/u/'.$sm_Users['id'].'">'.$sm_Users['username'].'</a> ';
echo '</div>';
}

if($total > 3)
{
echo '<div class="shadow">';
pages($page,$count_pages,'?page=');
echo '</div>';
}
}else{
err('Trống!');
}
echo '</div>';
bk_foot();
?>