📄 admin_user.asp
字号:
<!--#include file="conn.asp"-->
<!-- #include file="inc/const.asp" -->
<!--#include file="inc/dv_clsother.asp"-->
<!--#include file="inc/md5.asp"-->
<!-- #include file="inc/DvADChar.asp" -->
<!-- #include file="inc/GroupPermission.asp" -->
<%
Head()
dim admin_flag,sqlstr,myrootid
FoundErr=False
admin_flag=",14,"
if not Dvbbs.master or instr(","&session("flag")&",",admin_flag)=0 then
Errmsg=ErrMsg + "<BR><li>本页面为管理员专用,请<a href=admin_index.asp target=_top>登录</a>后进入。<br><li>您没有管理本页面的权限。"
dvbbs_error()
End if
if request("action")="fix" Then
Call Fixuser()
End If
dim trs
dim userinfo
dim usertitle
%>
<table cellpadding="2" cellspacing="1" border="0" width="95%" class="tableBorder" align=center>
<tr>
<th align=left colspan=8 height=23>用户管理</th>
</tr>
<tr>
<td width=20% class=forumrowHighlight>注意事项</td>
<td width=80% class=forumrowHighlight colspan=7><li>①点删除按钮将删除所选定的用户,此操作是不可逆的;<li>②您可以批量移动用户到相应的组;<li>③点用户名进行相应的资料操作;<li>④点用户最后登陆IP可进行锁定IP操作;<li>⑤点用户Email将给该用户发送Email<li>⑥点修复贴子将会修复该用户所发的贴子数据并更新其文章数,用于误删ID用户贴的修复。</td>
</tr>
<tr>
<td width=100% class=forumrowHighlight colspan=8>
快捷方式:<a href="admin_user.asp">用户管理首页</a> | <a href="?action=userSearch&userSearch=1"><%If Request("userSearch")="1" Then%><font color=red><%End If%>所有用户<%If Request("userSearch")="1" Then%></font><%End If%></a> | <a href="?action=userSearch&userSearch=2"><%If Request("userSearch")="2" Then%><font color=red><%End If%>发贴TOP100<%If Request("userSearch")="2" Then%></font><%End If%></a> | <a href="?action=userSearch&userSearch=3"><%If Request("userSearch")="3" Then%><font color=red><%End If%>发贴END100<%If Request("userSearch")="3" Then%></font><%End If%></a> | <a href="?action=userSearch&userSearch=4"><%If Request("userSearch")="4" Then%><font color=red><%End If%>24H内登录<%If Request("userSearch")="4" Then%></font><%End If%></a> | <a href="?action=userSearch&userSearch=5"><%If Request("userSearch")="5" Then%><font color=red><%End If%>24H内注册<%If Request("userSearch")="5" Then%></font><%End If%></a><BR>
<a href="?action=userSearch&userSearch=6"><%If Request("userSearch")="6" Then%><font color=red><%End If%>等待 认证<%If Request("userSearch")="6" Then%></font><%End If%></a> | <a href="?action=userSearch&userSearch=7"><%If Request("userSearch")="7" Then%><font color=red><%End If%>等待验证<%If Request("userSearch")="7" Then%></font><%End If%></a> | <a href="?action=userSearch&userSearch=8"><%If Request("userSearch")="8" Then%><font color=red><%End If%>管理 团队<%If Request("userSearch")="8" Then%></font><%End If%></a> | <a href="?action=userSearch&userSearch=11"><%If Request("userSearch")="11" Then%><font color=red><%End If%>屏蔽 用户<%If Request("userSearch")="11" Then%></font><%End If%></a> | <a href="?action=userSearch&userSearch=12"><%If Request("userSearch")="12" Then%><font color=red><%End If%>锁定 用户<%If Request("userSearch")="12" Then%></font><%End If%></a><%If Dvbbs.Forum_ChanSetting(0)="1" Then%> | <a href="?action=userSearch&userSearch=13"><%If Request("userSearch")="13" Then%><font color=red><%End If%>阳光 会员<%If Request("userSearch")="13" Then%></font><%End If%></a><%End If%> | <a href="?action=uniteuser">合并用户</a> | <a href="?action=userSearch&userSearch=14"><%If Request("userSearch")="13" Then%><font color=red><%End If%>自定义权限用户<%If Request("userSearch")="13" Then%></font><%End If%></a>
</td>
</tr>
<%if request("action")="" or request("userSearch")="0" then%>
<form action="?action=userSearch" method=post>
<tr>
<th align=left colspan=7 height=23>高级查询</th>
</tr>
<tr>
<td width=20% class=forumrow>注意事项</td>
<td width=80% class=forumrow colspan=5>在记录很多的情况下搜索条件越多查询越慢,请尽量减少查询条件;最多显示记录数也不宜选择过大</td>
</tr>
<tr>
<td width=20% class=forumrow>最多显示记录数</td>
<td width=80% class=forumrow colspan=5><input size=45 name="searchMax" type=text value=100></td>
</tr>
<tr>
<td width=20% class=forumrow>用户名</td>
<td width=80% class=forumrow colspan=5><input size=45 name="username" type=text> <input type=checkbox name="usernamechk" value="yes" checked>用户名完整匹配</td>
</tr>
<tr>
<td width=20% class=forumrow>用户组</td>
<td width=80% class=forumrow colspan=5>
<select size=1 name="usergroups">
<option value=0>任意</option>
<%
set rs=Dvbbs.Execute("select usergroupid,title from dv_usergroups where ParentGID=0 order by usergroupid")
do while not rs.eof
response.write "<option value="&rs(0)&">"&rs(1)&"</option>"
rs.movenext
loop
rs.close
set rs=nothing
%>
</select>
</td>
</tr>
<tr>
<td width=20% class=forumrow>用户等级</td>
<td width=80% class=forumrow colspan=5>
<select size=1 name="userclass">
<option value=0>任意</option>
<%
set rs=Dvbbs.Execute("select usertitle from dv_usergroups order by usergroupid")
do while not rs.eof
response.write "<option value="&rs(0)&">"&rs(0)&"</option>"
rs.movenext
loop
rs.close
set rs=nothing
%>
</select>
</td>
</tr>
<tr>
<td width=20% class=forumrow>Email包含</td>
<td width=80% class=forumrow colspan=5><input size=45 name="userEmail" type=text></td>
</tr>
<tr>
<td width=20% class=forumrow>用户IM包含</td>
<td width=80% class=forumrow colspan=5><input size=45 name="userim" type=text> 包括主页、OICQ、UC、ICQ、YAHOO、AIM、MSN</td>
</tr>
<tr>
<td width=20% class=forumrow>登录IP包含</td>
<td width=80% class=forumrow colspan=5><input size=45 name="lastip" type=text></td>
</tr>
<tr>
<td width=20% class=forumrow>头衔包含</td>
<td width=80% class=forumrow colspan=5><input size=45 name="usertitle" type=text></td>
</tr>
<tr>
<td width=20% class=forumrow>签名包含</td>
<td width=80% class=forumrow colspan=5><input size=45 name="sign" type=text></td>
</tr>
<tr>
<td width=20% class=forumrow>详细资料包含</td>
<td width=80% class=forumrow colspan=5><input size=45 name="userinfo" type=text></td>
</tr>
<!--shinzeal加入特殊搜索-->
<tr>
<th align=left colspan=7 height=23>特殊查询 (注意: <多于> 或 <少于> 已默认包含 <等于>;条件留空则不使用此条件 )</th>
</tr>
<tr>
<td width=100% class=forumrow colspan=6><table ID="Table1">
<tr>
<td width=50%>登录次数:<input type=radio value=more name="loginR" checked ID="Radio1"> 多于 <input type=radio value=less name="loginR" ID="Radio2"> 少于 <input size=5 name="loginT" type=text ID="Text1"> 次 </td>
<td width=50%>消失天数:<input type=radio value=more name="vanishR" checked ID="Radio3"> 多于 <input type=radio value=less name="vanishR" ID="Radio4"> 少于 <input size=5 name="vanishT" type=text ID="Text2"> 天 </td>
</tr>
<tr>
<td width=50%>注册天数:<input type=radio value=more name="regR" checked ID="Radio5"> 多于 <input type=radio value=less name="regR" ID="Radio6"> 少于 <input size=5 name="regT" type=text ID="Text3"> 天 </td>
<td width=50%>发表帖数:<input type=radio value=more name="artcleR" checked ID="Radio7"> 多于 <input type=radio value=less name="artcleR" ID="Radio8"> 少于 <input size=5 name="artcleT" type=text ID="Text4"> 篇 </td>
</tr><!--特殊搜索结束-->
<tr>
<td width=100% class=forumrow align=center colspan=6><input name="submit" type=submit value=" 搜 索 "></td>
</tr>
<input type=hidden value="9" name="userSearch">
</form>
<%
elseif request("action")="userSearch" then
%>
<tr>
<th colspan=8 align=left height=23>搜索结果</th>
</tr>
<%
dim currentpage,page_count,Pcount
dim totalrec,endpage
currentPage=request("page")
if currentpage="" or not IsNumeric(currentpage) then
currentpage=1
else
currentpage=clng(currentpage)
if err then
currentpage=1
err.clear
end if
end if
Set rs= Server.CreateObject("ADODB.Recordset")
Select Case Request("UserSearch")
case 1
sql="select u.userid,u.username,u.useremail,u.LastLogin,u.UserLastIP,u.UserPost,u.UserGroupID from [dv_user] u inner join dv_UserGroups G on u.usergroupid=g.usergroupid order by u.UserID desc"
case 2
sql="select top 100 u.userid,u.username,u.useremail,u.LastLogin,u.UserLastIP,u.UserPost,u.UserGroupID from [dv_user] u inner join dv_UserGroups G on u.usergroupid=g.usergroupid order by u.UserPost desc"
case 3
sql="select top 100 u.userid,u.username,u.useremail,u.LastLogin,u.UserLastIP,u.UserPost,u.UserGroupID from [dv_user] u inner join dv_UserGroups G on u.usergroupid=g.usergroupid order by u.UserPost"
case 4
If IsSqlDataBase=1 Then
sql="select u.userid,u.username,u.useremail,u.LastLogin,u.UserLastIP,u.UserPost,u.UserGroupID from [dv_user] u inner join dv_UserGroups G on u.usergroupid=g.usergroupid where datediff(hour,u.LastLogin,"&SqlNowString&")<25 order by u.lastlogin desc"
else
sql="select u.userid,u.username,u.useremail,u.LastLogin,u.UserLastIP,u.UserPost,u.UserGroupID from [dv_user] u inner join dv_UserGroups G on u.usergroupid=g.usergroupid where datediff('h',u.LastLogin,"&SqlNowString&")<25 order by u.lastlogin desc"
end if
case 5
If IsSqlDataBase=1 Then
sql="select u.userid,u.username,u.useremail,u.LastLogin,u.UserLastIP,u.UserPost,u.UserGroupID from [dv_user] u inner join dv_UserGroups G on u.usergroupid=g.usergroupid where datediff(hour,u.JoinDate,"&SqlNowString&")<25 order by u.UserID desc"
else
sql="select u.userid,u.username,u.useremail,u.LastLogin,u.UserLastIP,u.UserPost,u.UserGroupID from [dv_user] u inner join dv_UserGroups G on u.usergroupid=g.usergroupid where datediff('h',u.JoinDate,"&SqlNowString&")<25 order by u.UserID desc"
end if
case 6
sql="select u.userid,u.username,u.useremail,u.LastLogin,u.UserLastIP,u.UserPost,u.UserGroupID from [dv_user] u inner join dv_UserGroups G on u.usergroupid=g.usergroupid where u.usergroupid=5 order by u.UserID desc"
case 7
sql="select u.userid,u.username,u.useremail,u.LastLogin,u.UserLastIP,u.UserPost,u.UserGroupID from [dv_user] u inner join dv_UserGroups G on u.usergroupid=g.usergroupid where u.usergroupid=6 order by u.UserID desc"
case 8
sql="select u.userid,u.username,u.useremail,u.LastLogin,u.UserLastIP,u.UserPost,u.UserGroupID from [dv_user] u inner join dv_UserGroups G on u.usergroupid=g.usergroupid where u.usergroupid<4 order by u.usergroupid"
case 11
sql="select u.userid,u.username,u.useremail,u.LastLogin,u.UserLastIP,u.UserPost,u.UserGroupID from [dv_user] u inner join dv_UserGroups G on u.usergroupid=g.usergroupid where u.lockuser=2 order by userid desc"
case 12
sql="select u.userid,u.username,u.useremail,u.LastLogin,u.UserLastIP,u.UserPost,u.UserGroupID from [dv_user] u inner join dv_UserGroups G on u.usergroupid=g.usergroupid where u.lockuser=1 order by userid desc"
case 13
sql="select u.userid,u.username,u.useremail,u.LastLogin,u.UserLastIP,u.UserPost,u.UserGroupID from [dv_user] u inner join dv_UserGroups G on u.usergroupid=g.usergroupid where u.IsChallenge=1 order by userid desc"
case 14
sql="select distinct u.userid,u.username,u.useremail,u.LastLogin,u.UserLastIP,u.UserPost,u.UserGroupID from [dv_user] u Inner Join Dv_UserAccess UC On u.UserID=UC.uc_UserID order by userid desc"
case 9
sqlstr=""
if request("username")<>"" then
if request("usernamechk")="yes" then
sqlstr=" u.username='"&request("username")&"'"
else
sqlstr=" u.username like '%"&request("username")&"%'"
end if
end if
if cint(request("usergroups"))>0 then
if sqlstr="" then
sqlstr=" u.usergroupid="&request("usergroups")&""
else
sqlstr=sqlstr & " and u.usergroupid="&request("usergroups")&""
end if
end if
if request("userclass")<>"0" then
if sqlstr="" then
sqlstr=" u.userclass='"&request("userclass")&"'"
else
sqlstr=sqlstr & " and u.userclass='"&request("userclass")&"'"
end if
end if
if request("useremail")<>"" then
if sqlstr="" then
sqlstr=" u.useremail like '%"&request("useremail")&"%'"
else
sqlstr=sqlstr & " and u.useremail like '%"&request("useremail")&"%'"
end if
end if
if request("userim")<>"" then
if sqlstr="" then
sqlstr=" u.UserIM like '%"&request("userim")&"%'"
else
sqlstr=sqlstr & " and u.UserIM like '%"&request("userim")&"%'"
end if
end if
if request("lastip")<>"" then
if sqlstr="" then
sqlstr=" u.UserLastIP like '%"&request("lastip")&"%'"
else
sqlstr=sqlstr & " and u.UserLastIP like '%"&request("lastip")&"%'"
end if
end if
if request("userinfo")<>"" then
if sqlstr="" then
sqlstr=" u.UserInfo like '%"&request("userinfo")&"%'"
else
sqlstr=sqlstr & " and u.UserInfo like '%"&request("userinfo")&"%'"
end if
end if
if request("title")<>"" then
if sqlstr="" then
sqlstr=" u.usertitle like '%"&request("title")&"%'"
else
sqlstr=sqlstr & " and u.usertitle like '%"&request("title")&"%'"
end if
end if
if request("sign")<>"" then
if sqlstr="" then
sqlstr=" u.usersign like '%"&request("sign")&"%'"
else
sqlstr=sqlstr & " and u.usersign like '%"&request("sign")&"%'"
end if
end if
'======shinzeal加入特殊搜索=======
dim Tsqlstr
if request("loginT")<>"" then
if request("loginR")="more" then
Tsqlstr=" u.userlogins >= "&request("loginT")&""
else
Tsqlstr=" u.userlogins <= "&request("loginT")&""
end if
if sqlstr="" then
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -