/[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.12 by sysadm, Fri Mar 28 05:55:16 2025 UTC
# Line 1  Line 1 
1  <?  <?
2            require_once "../lib/db_open.inc.php";
3          require_once "./session_init.inc.php";          require_once "./session_init.inc.php";
4          require_once "./user_level.inc.php";          require_once "./user_level.inc.php";
5  ?>  ?>
6  <?  <?
 set_user_action("search_user");  
   
7  $page_max_record=20;  $page_max_record=20;
8    
9  if (isset($_GET["page"]))  if (isset($_GET["page"]))
# Line 35  else Line 34  else
34          $search_text="";          $search_text="";
35  $search_author=addslashes(stripslashes($search_text));  $search_author=addslashes(stripslashes($search_text));
36    
37  $db_conn=include "./db_open.inc.php";  $rs=mysql_query("select user_online.SID from user_online WHERE UID = 0".
38            ($online ? " AND TIMESTAMPDIFF(SECOND, last_tm, NOW()) <= $BBS_user_off_line" : ""))
 $rs=mysql_query("select user_online.SID from user_online".  
         " where UID=0 and current_action not in".  
         " ('max_user_limit','max_ip_limit','max_session_limit','exit')".  
         " group by SID")  
39          or die("Count guest error!");          or die("Count guest error!");
40  $guest_count=mysql_num_rows($rs);  $guest_count=mysql_num_rows($rs);
41  mysql_free_result($rs);  mysql_free_result($rs);
42    
43  $rs=mysql_query("select user_online.SID from user_online".  $rs=mysql_query("select user_online.SID from user_online WHERE UID <> 0".
44          " 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")  
45          or die("Count user error!");          or die("Count user error!");
46  $user_count=mysql_num_rows($rs);  $user_count=mysql_num_rows($rs);
47  mysql_free_result($rs);  mysql_free_result($rs);
# Line 59  $rs=mysql_query("select count(user_list. Line 52  $rs=mysql_query("select count(user_list.
52          " inner join user_pubinfo on user_list.UID=user_pubinfo.UID where".          " inner join user_pubinfo on user_list.UID=user_pubinfo.UID where".
53          " user_list.enable and ".($type==1?"user_pubinfo.nickname":"user_list.username").          " user_list.enable and ".($type==1?"user_pubinfo.nickname":"user_list.username").
54          " like '%$search_author%'".          " like '%$search_author%'".
55          ($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')":"").  
56          ($friend ? " and friend_list.UID=".$_SESSION["BBS_uid"]:"")          ($friend ? " and friend_list.UID=".$_SESSION["BBS_uid"]:"")
57          )          )
58          or die("Query user error!");          or die("Query user error!");
# Line 172  $rs=mysql_query("select user_list.UID,us Line 164  $rs=mysql_query("select user_list.UID,us
164          " inner join user_pubinfo on user_list.UID=user_pubinfo.UID where".          " inner join user_pubinfo on user_list.UID=user_pubinfo.UID where".
165          " user_list.enable and ".($type==1?"user_pubinfo.nickname":"user_list.username").          " user_list.enable and ".($type==1?"user_pubinfo.nickname":"user_list.username").
166          " like '%$search_author%'".          " like '%$search_author%'".
167          ($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')":"").  
168          ($friend ? " and friend_list.UID=".$_SESSION["BBS_uid"]:"").          ($friend ? " and friend_list.UID=".$_SESSION["BBS_uid"]:"").
169          " order by ".($type==1?"nickname":"username").          " order by ".($type==1?"nickname":"username").
170          " 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 204  while($row=mysql_fetch_array($rs))
204                                          </td>                                          </td>
205                                          <td class="level">                                          <td class="level">
206                                                  <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>  
207                                          </td>                                          </td>
208                                          <td align="center">                                          <td align="center">
209                                          </td>                                          </td>
# Line 280  mysql_close($db_conn); Line 270  mysql_close($db_conn);
270  ?>  ?>
271          </body>          </body>
272  </html>  </html>
   


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

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