/[LeafOK_CVS]/fenglin/bbs/search_user.php
ViewVC logotype

Diff of /fenglin/bbs/search_user.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.10 by sysadm, Mon Mar 17 13:21:14 2025 UTC Revision 1.11 by sysadm, Thu Mar 27 12:29:03 2025 UTC
# Line 35  $search_author=addslashes(stripslashes($ Line 35  $search_author=addslashes(stripslashes($
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);
# Line 57  $rs=mysql_query("select count(user_list. Line 53  $rs=mysql_query("select count(user_list.
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!");
# Line 170  $rs=mysql_query("select user_list.UID,us Line 165  $rs=mysql_query("select user_list.UID,us
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")


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1