--- fenglin/bbs/search_user.php 2025/03/09 07:30:10 1.8 +++ fenglin/bbs/search_user.php 2025/03/28 05:55:16 1.12 @@ -1,10 +1,9 @@ -0 and current_action not in". - " ('max_user_limit','max_ip_limit','max_session_limit','exit')". - " group by SID") +$rs=mysql_query("select user_online.SID from user_online WHERE UID <> 0". + ($online ? " AND TIMESTAMPDIFF(SECOND, last_tm, NOW()) <= $BBS_user_off_line" : "")) or die("Count user error!"); $user_count=mysql_num_rows($rs); mysql_free_result($rs); @@ -59,8 +52,7 @@ $rs=mysql_query("select count(user_list. " inner join user_pubinfo on user_list.UID=user_pubinfo.UID where". " user_list.enable and ".($type==1?"user_pubinfo.nickname":"user_list.username"). " like '%$search_author%'". - ($online ? " and current_action not in". - " ('max_user_limit','max_ip_limit','max_session_limit','exit')":""). + ($online ? " AND TIMESTAMPDIFF(SECOND, last_tm, NOW()) <= $BBS_user_off_line" : ""). ($friend ? " and friend_list.UID=".$_SESSION["BBS_uid"]:"") ) or die("Query user error!"); @@ -172,8 +164,7 @@ $rs=mysql_query("select user_list.UID,us " inner join user_pubinfo on user_list.UID=user_pubinfo.UID where". " user_list.enable and ".($type==1?"user_pubinfo.nickname":"user_list.username"). " like '%$search_author%'". - ($online ? " and current_action not in". - " ('max_user_limit','max_ip_limit','max_session_limit','exit')":""). + ($online ? " AND TIMESTAMPDIFF(SECOND, last_tm, NOW()) <= $BBS_user_off_line":""). ($friend ? " and friend_list.UID=".$_SESSION["BBS_uid"]:""). " order by ".($type==1?"nickname":"username"). " limit ".($page-1)*$page_max_record.",$page_max_record") @@ -213,7 +204,6 @@ while($row=mysql_fetch_array($rs)) ','send_msg',500,300)">发送消息 - ','send_msg',500,300)">发送邮件 @@ -280,4 +270,3 @@ mysql_close($db_conn); ?> -