--- fenglin/bbs/search_user.php 2004/12/01 08:30:48 1.3 +++ fenglin/bbs/search_user.php 2025/03/27 12:29:03 1.11 @@ -1,10 +1,9 @@ - 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); + $rs=mysql_query("select count(user_list.UID) as rec_count from user_list". + ($online?" inner join user_online on user_list.UID=user_online.UID":""). + ($friend?" inner join friend_list on user_list.UID=friend_list.fUID":""). " 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%'") + " like '%$search_author%'". + ($online ? " AND TIMESTAMPDIFF(SECOND, last_tm, NOW()) <= $BBS_user_off_line" : ""). + ($friend ? " and friend_list.UID=".$_SESSION["BBS_uid"]:"") + ) or die("Query user error!"); $row=mysql_fetch_array($rs); -$toa=$u_count=$row["rec_count"]; +$u_count=$row["rec_count"]; mysql_free_result($rs); +$toa=$u_count; if ($toa==0) $toa=1; @@ -48,93 +75,142 @@ if ($page>$page_total) ?> - - 用户查找结果 + + 鐢ㄦ埛鏌ユ壘缁撴灉 - + + + +
- - -
+ + + + + + + + +
+ >>鏌ユ壘 +
- 未找到指定用户用户查找结果(共位) +?>鐢ㄦ埛鏌ユ壘缁撴灉锛堝叡浣嶏級 + 锛堝綋鍓嶅湪绾挎敞鍐岀敤鎴浣嶏紝娓稿浣嶏級
- - - - - - - - - -
- - - - - - - + + + +
+ + + + + + + + + + ♂',''),'') as gender". - " from user_list". +$rs=mysql_query("select user_list.UID,username,nickname,exp,". + "gender,gender_pub,last_login_dt from user_list". + ($online?" inner join user_online on user_list.UID=user_online.UID":""). + ($friend?" inner join friend_list on user_list.UID=friend_list.fUID":""). " 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%' order by ".($type==1?"nickname":"username"). + " like '%$search_author%'". + ($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") or die("Query user error!"); -do +while($row=mysql_fetch_array($rs)) { $color_index=($color_index+1)%$color_count; ?> - - - + - - + + + + -
鐢ㄦ埛ID鏄电О绛夌骇鏈鍚庣櫥闄嗘椂闂
- +鈾"); + else + echo (""); + } + else { - if ($row=mysql_fetch_array($rs)) - { + echo ("?"); + } ?> - - )"> + + )"> + + + + + + ','send_msg',500,300)">鍙戦佹秷鎭
- 分页: /页 + "> + "> + 鍒嗛〉: /1) { -?>97&friend=">9&friend=">797 8:&friend=">8&friend=">:8: @@ -172,12 +250,15 @@ mysql_close($db_conn);
- 查找用户 + 鏌ユ壘鐢ㄦ埛 - + + >鍦ㄧ嚎 + >濂藉弸 +