| 35 |
|
|
| 36 |
$db_conn=include "./db_open.inc.php"; |
$db_conn=include "./db_open.inc.php"; |
| 37 |
|
|
| 38 |
$rs=mysql_query("select user_online.SID from user_online". |
$rs=mysql_query("select user_online.SID from user_online WHERE UID = 0". |
| 39 |
" where UID=0 and current_action not in". |
($online ? " AND TIMESTAMPDIFF(SECOND, last_tm, NOW()) <= $BBS_user_off_line" : "")) |
|
" ('max_user_limit','max_ip_limit','max_session_limit','exit')". |
|
|
" group by SID") |
|
| 40 |
or die("Count guest error!"); |
or die("Count guest error!"); |
| 41 |
$guest_count=mysql_num_rows($rs); |
$guest_count=mysql_num_rows($rs); |
| 42 |
mysql_free_result($rs); |
mysql_free_result($rs); |
| 43 |
|
|
| 44 |
$rs=mysql_query("select user_online.SID from user_online". |
$rs=mysql_query("select user_online.SID from user_online WHERE UID <> 0". |
| 45 |
" where UID<>0 and current_action not in". |
($online ? " AND TIMESTAMPDIFF(SECOND, last_tm, NOW()) <= $BBS_user_off_line" : "")) |
|
" ('max_user_limit','max_ip_limit','max_session_limit','exit')". |
|
|
" group by SID") |
|
| 46 |
or die("Count user error!"); |
or die("Count user error!"); |
| 47 |
$user_count=mysql_num_rows($rs); |
$user_count=mysql_num_rows($rs); |
| 48 |
mysql_free_result($rs); |
mysql_free_result($rs); |
| 53 |
" inner join user_pubinfo on user_list.UID=user_pubinfo.UID where". |
" inner join user_pubinfo on user_list.UID=user_pubinfo.UID where". |
| 54 |
" user_list.enable and ".($type==1?"user_pubinfo.nickname":"user_list.username"). |
" user_list.enable and ".($type==1?"user_pubinfo.nickname":"user_list.username"). |
| 55 |
" like '%$search_author%'". |
" like '%$search_author%'". |
| 56 |
($online ? " and current_action not in". |
($online ? " AND TIMESTAMPDIFF(SECOND, last_tm, NOW()) <= $BBS_user_off_line" : ""). |
|
" ('max_user_limit','max_ip_limit','max_session_limit','exit')":""). |
|
| 57 |
($friend ? " and friend_list.UID=".$_SESSION["BBS_uid"]:"") |
($friend ? " and friend_list.UID=".$_SESSION["BBS_uid"]:"") |
| 58 |
) |
) |
| 59 |
or die("Query user error!"); |
or die("Query user error!"); |
| 165 |
" inner join user_pubinfo on user_list.UID=user_pubinfo.UID where". |
" inner join user_pubinfo on user_list.UID=user_pubinfo.UID where". |
| 166 |
" user_list.enable and ".($type==1?"user_pubinfo.nickname":"user_list.username"). |
" user_list.enable and ".($type==1?"user_pubinfo.nickname":"user_list.username"). |
| 167 |
" like '%$search_author%'". |
" like '%$search_author%'". |
| 168 |
($online ? " and current_action not in". |
($online ? " AND TIMESTAMPDIFF(SECOND, last_tm, NOW()) <= $BBS_user_off_line":""). |
|
" ('max_user_limit','max_ip_limit','max_session_limit','exit')":""). |
|
| 169 |
($friend ? " and friend_list.UID=".$_SESSION["BBS_uid"]:""). |
($friend ? " and friend_list.UID=".$_SESSION["BBS_uid"]:""). |
| 170 |
" order by ".($type==1?"nickname":"username"). |
" order by ".($type==1?"nickname":"username"). |
| 171 |
" limit ".($page-1)*$page_max_record.",$page_max_record") |
" limit ".($page-1)*$page_max_record.",$page_max_record") |