/[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.8 by sysadm, Sun Mar 9 07:30:10 2025 UTC Revision 1.11 by sysadm, Thu Mar 27 12:29:03 2025 UTC
# Line 2  Line 2 
2          require_once "./session_init.inc.php";          require_once "./session_init.inc.php";
3          require_once "./user_level.inc.php";          require_once "./user_level.inc.php";
4  ?>  ?>
5  <?  <?
 set_user_action("search_user");  
   
6  $page_max_record=20;  $page_max_record=20;
7    
8  if (isset($_GET["page"]))  if (isset($_GET["page"]))
# Line 37  $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 59  $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 172  $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")
# Line 213  while($row=mysql_fetch_array($rs)) Line 205  while($row=mysql_fetch_array($rs))
205                                          </td>                                          </td>
206                                          <td class="level">                                          <td class="level">
207                                                  <a class="s2" href="javascript:NW_open('send_msg.php?user_id=<? echo $row["UID"]; ?>','send_msg',500,300)">发送消息</a>                                                  <a class="s2" href="javascript:NW_open('send_msg.php?user_id=<? echo $row["UID"]; ?>','send_msg',500,300)">发送消息</a>
                                                 <a class="s2" href="javascript:NW_open('bbs_email.php?user_id=<? echo $row["UID"]; ?>','send_msg',500,300)">发送邮件</a>  
208                                          </td>                                          </td>
209                                          <td align="center">                                          <td align="center">
210                                          </td>                                          </td>


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

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