📄 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/GroupPermission.asp"-->
<!--#include file="../dv_dpo/cls_dvapi.asp"-->
<%
Head()
Dim admin_flag,sqlstr,myrootid
FoundErr=False
admin_flag=",16,"
CheckAdmin(admin_flag)
Dim tRs,UserInfo,UserTitle
UserMain(1)
Select Case Request("action")
Case "fix"
Fixuser()
Case "userSearch"
UserSearch()
Case "touser"
ToUser()
Case "modify"
UserModify()
Case "saveuserinfo"
SaveUserInfo()
Case "UserPermission"
UserPermission()
Case "UserBoardPermission"
UserBoardPermission()
Case "saveuserpermission"
SaveUserPermission()
Case "uniteuser"
UniteUser()
Case Else
UserIndex()
End Select
UserMain(0)
Footer()
'用户管理通用头部
Sub UserMain(Str)
If Str = 1 Then
%>
<table cellpadding="2" cellspacing="1" border="0" width="100%" align=center>
<tr>
<th colspan=8 style="text-align:center;">用户管理</th>
</tr>
<tr>
<td width="20%" class=td2 align="center"><button Style="width:80;height:50;border: 1px outset;" class="button">注意事项</button></td>
<td width="80%" class=td2 colspan=7><li>①点删除按钮将删除所选定的用户,此操作是不可逆的;<li>②您可以批量移动用户到相应的组;<li>③点用户名进行相应的资料操作;<li>④点用户最后登陆IP可进行锁定IP操作;<li>⑤点用户Email将给该用户发送Email;<li>⑥点修复贴子将会修复该用户所发的贴子数据并更新其文章数,用于误删ID用户贴的修复。</td>
</tr>
<tr>
<td width=100% class=td2 colspan=8>
快速查看:<a href="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=userSearch&userSearch=14"><%If Request("userSearch")="13" Then%><font color=red><%End If%>自定义权限用户<%If Request("userSearch")="13" Then%></font><%End If%></a>
| <a href="?action=userSearch&userSearch=15"><%If Request("userSearch")="15" Then%><font color=red><%End If%>VIP用户<%If Request("userSearch")="15" Then%></font><%End If%></a>
</td>
</tr>
<tr>
<td width=100% class=td2 colspan=8>
功能选项:<a href="?action=uniteuser">合并用户</a> | <a href="update_user.asp">奖惩用户管理</a> <!--| <a href="boardmastergrade.asp">版主工作情况</a>-->
</td>
</tr>
<%
Else
%>
</table>
<p></p>
<%
End If
End Sub
'用户管理首页,搜索项
Sub UserIndex()
%>
<form action="?action=userSearch" method=post>
<tr>
<th colspan=7 style="text-align:center;">高级查询</th>
</tr>
<tr>
<td width="20%" class=td1>注意事项</td>
<td width="80%" class=td1 colspan=5>在记录很多的情况下搜索条件越多查询越慢,请尽量减少查询条件;最多显示记录数也不宜选择过大</td>
</tr>
<tr>
<td width="20%" class=td1>最多显示记录数</td>
<td width="80%" class=td1 colspan=5><input size=45 name="searchMax" type=text value=100></td>
</tr>
<tr>
<td width="20%" class=td1>用户名</td>
<td width="80%" class=td1 colspan=5><input size=45 name="username" type=text> <input type=checkbox class=checkbox name="usernamechk" value="yes" checked>用户名完整匹配</td>
</tr>
<tr>
<td width="20%" class=td1>用户组</td>
<td width="80%" class=td1 colspan=5>
<select size=1 name="usergroups">
<option value=0>任意</option>
<%
Dim rs
set rs=Dvbbs.Execute("select usergroupid,UserTitle,ParentGID from dv_usergroups Where Not ParentGID=0 order by ParentGID,usergroupid")
do while not rs.eof
response.write "<option value="&rs(0)&">"&SysGroupName(Rs(2)) & rs(1)&"</option>"
rs.movenext
loop
rs.close
set rs=nothing
%>
</select>
</td>
</tr>
<tr>
<td width="20%" class=td1>Email包含</td>
<td width="80%" class=td1 colspan=5><input size=45 name="userEmail" type=text></td>
</tr>
<tr>
<td width="20%" class=td1>用户IM包含</td>
<td width="80%" class=td1 colspan=5><input size=45 name="userim" type=text> 包括主页、OICQ、UC、ICQ、YAHOO、AIM、MSN</td>
</tr>
<tr>
<td width="20%" class=td1>登录IP包含</td>
<td width="80%" class=td1 colspan=5><input size=45 name="lastip" type=text></td>
</tr>
<tr>
<td width="20%" class=td1>头衔包含</td>
<td width="80%" class=td1 colspan=5><input size=45 name="usertitle" type=text></td>
</tr>
<tr>
<td width="20%" class=td1>签名包含</td>
<td width="80%" class=td1 colspan=5><input size=45 name="sign" type=text></td>
</tr>
<tr>
<td width="20%" class=td1>详细资料包含</td>
<td width="80%" class=td1 colspan=5><input size=45 name="userinfo" type=text></td>
</tr>
<!--shinzeal加入特殊搜索-->
<tr>
<th colspan=7 style="text-align:center;">特殊查询 (注意: <多于> 或 <少于> 已默认包含 <等于>;条件留空则不使用此条件 )</th>
</tr>
<tr>
<td class=td1 colspan=7>
<table ID="Table1" width="100%">
<tr>
<td width="50%" class=td2>登录次数:<input type=radio class=radio value=more name="loginR" checked> 多于 <input type=radio class=radio value=less name="loginR"> 少于 <input size=5 name="loginT" type=text> 次</td>
<td width="50%" class=td2>消失天数:<input type=radio class=radio value=more name="vanishR" checked> 多于 <input type=radio class=radio value=less name="vanishR"> 少于 <input size=5 name="vanishT" type=text> 天</td>
</tr>
<tr>
<td>注册天数:<input type=radio class=radio value=more name="regR" checked> 多于 <input type=radio class=radio value=less name="regR"> 少于 <input size=5 name="regT" type=text> 天</td>
<td>发表帖数:<input type=radio class=radio value=more name="artcleR" checked> 多于 <input type=radio class=radio value=less name="artcleR"> 少于 <input size=5 name="artcleT" type=text> 篇</td>
</tr>
<tr>
<td class=td2>用户金钱:<input type=radio class=radio value=more name="UWealth" checked> 多于 <input type=radio class=radio value=less name="UWealth"> 少于 <input size=5 name="UWealth_value" type=text></td>
<td class=td2>用户经验:<input type=radio class=radio value=more name="UEP" checked> 多于 <input type=radio class=radio value=less name="UEP"> 少于 <input size=5 name="UEP_value" type=text></td>
</tr>
<tr>
<td>用户魅力:<input type=radio class=radio value=more name="UCP" checked> 多于 <input type=radio class=radio value=less name="UCP"> 少于 <input size=5 name="UCP_value" type=text></td>
<td>用户威望:<input type=radio class=radio value=more name="UPower" checked> 多于 <input type=radio class=radio value=less name="UPower"> 少于 <input size=5 name="UPower_value" type=text></td>
</tr>
<tr>
<td class=td2>用户金币:<input type=radio class=radio value=more name="UMoney" checked> 多于 <input type=radio class=radio value=less name="UMoney"> 少于 <input size=5 name="UMoney_value" type=text></td>
<td class=td2>用户点券:<input type=radio class=radio value=more name="UTicket" checked> 多于 <input type=radio class=radio value=less name="UTicket"> 少于 <input size=5 name="UTicket_value" type=text></td>
</tr>
<tr>
<td class=td1><LI>以下条件请选取相应的VIP用户组进行查询</LI></td>
</tr>
<tr>
<td class=td2>Vip登记时间:<input type=radio class=radio value=more name="UVipStarTime" checked> 多于 <input type=radio class=radio value=less name="UVipStarTime"> 少于 <input size=5 name="UVipStarTime_value" type=text></td>
<td class=td2>Vip截止时间:<input type=radio class=radio value=more name="UVipEndTime" checked> 多于 <input type=radio class=radio value=less name="UVipEndTime"> 少于 <input size=5 name="UVipEndTime_value" type=text></td>
</tr>
</table>
</td></tr>
<!--特殊搜索结束-->
<tr>
<td width="100%" class=td1 align=center colspan=7><input name="submit" type=submit class=button value=" 搜 索 "></td>
</tr>
<input type=hidden value="9" name="userSearch">
</form>
<%
End Sub
'用户搜索结果项
Sub UserSearch()
%>
<tr>
<th colspan=8 style="text-align:center;">搜索结果</th>
</tr>
<%
dim currentpage,page_count,Pcount
dim totalrec,endpage
Dim rs,sql
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
Sql = " Userid, Username, Useremail, LastLogin, UserLastIP, UserPost, UserGroupID,Vip_StarTime,Vip_EndTime"
Set Rs = Server.CreateObject("ADODB.Recordset")
Select Case Request("UserSearch")
Case 1
Sql = "SELECT " & Sql & " FROM [Dv_User] ORDER BY UserID DESC"
Case 2
Sql = "SELECT TOP 100 " & Sql & " FROM [Dv_User] ORDER BY UserPost DESC"
case 3
sql="select top 100 " & Sql & " from [dv_user] order by UserPost"
case 4
If IsSqlDataBase=1 Then
sql="select " & Sql & " from [dv_user] where datediff(hour,LastLogin,"&SqlNowString&")<25 order by lastlogin desc"
else
sql="select " & Sql & " from [dv_user] where datediff('h',LastLogin,"&SqlNowString&")<25 order by lastlogin desc"
end if
case 5
If IsSqlDataBase=1 Then
sql="select " & Sql & " from [dv_user] where datediff(hour,JoinDate,"&SqlNowString&")<25 order by UserID desc"
else
sql="select " & Sql & " from [dv_user] where datediff('h',JoinDate,"&SqlNowString&")<25 order by UserID desc"
end if
case 6
sql="select " & Sql & " from [dv_user] where usergroupid=5 order by UserID desc"
case 7
sql="select " & Sql & " from [dv_user] where usergroupid=6 order by UserID desc"
case 8
sql="select " & Sql & " from [dv_user] where usergroupid<4 order by usergroupid"
case 10
Sql = "select " & Sql & " from [dv_user] where usergroupid="&request("usergroupid")&" order by UserID desc"
case 11
sql="select " & Sql & " from [dv_user] where lockuser=2 order by userid desc"
case 12
sql="select " & Sql & " from [dv_user] where lockuser=1 order by userid desc"
case 13
sql="select " & Sql & " from [dv_user] where IsChallenge=1 order by userid desc"
case 14
Sql = "SELECT " & Sql & " FROM [Dv_User] WHERE UserID IN (SELECT Uc_UserID FROM Dv_UserAccess) ORDER BY Userid DESC"
case 15
Sql = "SELECT " & Sql & " FROM [dv_user] WHERE UserGroupid IN (SELECT UserGroupID FROM Dv_UserGroups WHERE ParentGID=5) ORDER BY Vip_EndTime desc,UserID desc"
case 9
sqlstr=""
if request("username")<>"" then
if request("usernamechk")="yes" then
sqlstr=" username='"&request("username")&"'"
else
sqlstr=" username like '%"&request("username")&"%'"
end if
end if
if cint(request("usergroups"))>0 then
if sqlstr="" then
sqlstr=" usergroupid="&request("usergroups")&""
else
sqlstr=sqlstr & " and usergroupid="&CheckNumeric(request("usergroups"))
end if
end if
'if request("userclass")<>"0" then
' if sqlstr="" then
' sqlstr=" userclass='"&request("userclass")&"'"
' else
' sqlstr=sqlstr & " and userclass='"&request("userclass")&"'"
' end if
'end if
'======shinzeal加入特殊搜索=======
dim Tsqlstr
if request("loginT")<>"" then
if request("loginR")="more" then
Tsqlstr=" userlogins >= "&CheckNumeric(request("loginT"))
else
Tsqlstr=" userlogins <= "&CheckNumeric(request("loginT"))
end if
if sqlstr="" then
sqlstr=Tsqlstr
else
sqlstr=sqlstr & " and " & Tsqlstr
end if
end if
if request("vanishT")<>"" then
if request("vanishR")="more" then
If IsSqlDataBase=1 Then
Tsqlstr=" datediff(d,lastlogin,"&SqlNowString&") >= "&CheckNumeric(request("vanishT"))
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -