📄 admin_user.asp
字号:
strOrderType = "U.UserPoint desc,"
Case "UserExp"
strOrderType = "U.UserExp desc,"
Case Else
strOrderType = ""
End Select
Select Case SearchType
Case 1, 2
sql = "select top 100 "
Case 3, 4
sql = "select "
Case Else
If strOrderType = "" Then
sql = "select top " & MaxPerPage & " "
Else
sql = "select "
End If
End Select
sql = sql & " U.*,G.GroupName from PE_User U inner join PE_UserGroup G on U.GroupID=G.GroupID "
Querysql = Querysql & " where 1=1 "
Select Case SearchType
Case 0
Response.Write "所有会员"
Case 1
Response.Write "添加信息最多的前100个会员"
Case 2
Response.Write "添加信息最少的100个会员"
Case 3
Querysql = Querysql & " and datediff(" & PE_DatePart_H & ",LastLoginTime," & PE_Now & ")<25"
Response.Write "最近24小时内登录的会员"
Case 4
Querysql = Querysql & " and datediff(" & PE_DatePart_H & ",RegTime," & PE_Now & ")<25"
Response.Write "最近24小时内注册的会员"
Case 5
Querysql = Querysql & " and U.IsLocked=" & PE_True
Response.Write "所有被锁住的会员"
Case 6
Querysql = Querysql & " and U.UserPoint>0"
Response.Write PointName & "数大于0的会员"
Case 7
Querysql = Querysql & " and U.UserExp>0"
Response.Write "积分大于0的会员"
Case 8
Querysql = Querysql & " and U.Balance>0"
Response.Write "资金余额大于0的会员"
Case 9
Querysql = Querysql & " and U.Balance<0"
Response.Write "资金余额小于0的会员"
Case 11
Querysql = Querysql & " and U.GroupID=" & GroupID & ""
Response.Write GetGroupName(GroupID)
Case 21
Querysql = Querysql & " and datediff(" & PE_DatePart_M & ",LastLoginTime," & PE_Now & ")>=1"
Response.Write "最近一个月没有登录过的会员"
Case 22
Querysql = Querysql & " and datediff(" & PE_DatePart_M & ",LastLoginTime," & PE_Now & ")>=3"
Response.Write "最近三个月没有登录过的会员"
Case 23
Querysql = Querysql & " and datediff(" & PE_DatePart_M & ",LastLoginTime," & PE_Now & ")>=6"
Response.Write "最近半年没有登录过的会员"
Case 10
If Keyword = "" Then
Response.Write "所有会员"
Else
Select Case strField
Case "UserID"
If IsNumeric(Keyword) = False Then
FoundErr = True
ErrMsg = ErrMsg & "<li>会员ID必须是整数</li>"
Else
Querysql = Querysql & " and U.UserID=" & PE_CLng(Keyword)
Response.Write "会员ID等于<font color=red> " & PE_CLng(Keyword) & " </font>的会员"
End If
Case "UserName"
Querysql = Querysql & " and U.UserName like '%" & Keyword & "%'"
Response.Write "用户名中含有“ <font color=red>" & Keyword & "</font> ”的会员"
Case "Email"
Querysql = Querysql & " and U.Email like '%" & Keyword & "%'"
Response.Write "电子邮件中含有“ <font color=red>" & Keyword & "</font> ”的会员"
Case "Homepage"
Querysql = Querysql & " and U.ContacterID in (select ContacterID from PE_Contacter where Homepage like '%" & Keyword & "%')"
Response.Write "个人主页中含有“ <font color=red>" & Keyword & "</font> ”的会员"
Case "TrueName"
Querysql = Querysql & " and U.ContacterID in (select ContacterID from PE_Contacter where TrueName like '%" & Keyword & "%')"
Response.Write "真实姓名中含有“ <font color=red>" & Keyword & "</font> ”的会员"
Case "IDCard"
Querysql = Querysql & " and U.ContacterID in (select ContacterID from PE_Contacter where IDCard like '%" & Keyword & "%')"
Response.Write "身份证号码中含有“ <font color=red>" & Keyword & "</font> ”的会员"
Case "Company"
Querysql = Querysql & " and U.ContacterID in (select ContacterID from PE_Contacter where Company like '%" & Keyword & "%')"
Response.Write "单位名称中含有“ <font color=red>" & Keyword & "</font> ”的会员"
Case "Address"
Querysql = Querysql & " and U.ContacterID in (select ContacterID from PE_Contacter where Address like '%" & Keyword & "%')"
Response.Write "联系地址中含有“ <font color=red>" & Keyword & "</font> ”的会员"
Case "Mobile"
Querysql = Querysql & " and U.ContacterID in (select ContacterID from PE_Contacter where Mobile like '%" & Keyword & "%')"
Response.Write "手机号码中含有“ <font color=red>" & Keyword & "</font> ”的会员"
Case "OfficePhone"
Querysql = Querysql & " and U.ContacterID in (select ContacterID from PE_Contacter where OfficePhone like '%" & Keyword & "%')"
Response.Write "办公电话号码中含有“ <font color=red>" & Keyword & "</font> ”的会员"
Case "HomePhone"
Querysql = Querysql & " and U.ContacterID in (select ContacterID from PE_Contacter where HomePhone like '%" & Keyword & "%')"
Response.Write "家庭电话号码中含有“ <font color=red>" & Keyword & "</font> ”的会员"
Case "PHS"
Querysql = Querysql & " and U.ContacterID in (select ContacterID from PE_Contacter where PHS like '%" & Keyword & "%')"
Response.Write "小灵通号码中含有“ <font color=red>" & Keyword & "</font> ”的会员"
Case "Fax"
Querysql = Querysql & " and U.ContacterID in (select ContacterID from PE_Contacter where Fax like '%" & Keyword & "%')"
Response.Write "传真号码中含有“ <font color=red>" & Keyword & "</font> ”的会员"
Case "QQ"
Querysql = Querysql & " and U.ContacterID in (select ContacterID from PE_Contacter where QQ='" & Keyword & "')"
Response.Write "QQ号为“ <font color=red>" & Keyword & "</font> ”的会员"
Case "ICQ"
Querysql = Querysql & " and U.ContacterID in (select ContacterID from PE_Contacter where ICQ='" & Keyword & "')"
Response.Write "ICQ号为“ <font color=red>" & Keyword & "</font> ”的会员"
Case "MSN"
Querysql = Querysql & " and U.ContacterID in (select ContacterID from PE_Contacter where MSN='" & Keyword & "')"
Response.Write "MSN帐号为“ <font color=red>" & Keyword & "</font> ”的会员"
Case "Yahoo"
Querysql = Querysql & " and U.ContacterID in (select ContacterID from PE_Contacter where Yahoo='" & Keyword & "')"
Response.Write "雅虎通帐号为“ <font color=red>" & Keyword & "</font> ”的会员"
Case "UC"
Querysql = Querysql & " and U.ContacterID in (select ContacterID from PE_Contacter where UC='" & Keyword & "')"
Response.Write "UC号为“ <font color=red>" & Keyword & "</font> ”的会员"
Case "Aim"
Querysql = Querysql & " and U.ContacterID in (select ContacterID from PE_Contacter where Aim='" & Keyword & "')"
Response.Write "Aim帐号为“ <font color=red>" & Keyword & "</font> ”的会员"
Case Else
Querysql = Querysql & " and U.UserName like '%" & Keyword & "%'"
Response.Write "用户名中含有“ <font color=red>" & Keyword & "</font> ”的会员"
End Select
End If
End Select
totalPut = PE_CLng(Conn.Execute("select Count(*) from PE_User U " & Querysql)(0))
If (SearchType = 1 Or SearchType = 2) And totalPut > 100 Then
totalPut = 100
End If
If CurrentPage < 1 Then
CurrentPage = 1
End If
If (CurrentPage - 1) * MaxPerPage > totalPut Then
If (totalPut Mod MaxPerPage) = 0 Then
CurrentPage = totalPut \ MaxPerPage
Else
CurrentPage = totalPut \ MaxPerPage + 1
End If
End If
Select Case SearchType
Case 1
sql = sql & " order by " & strOrderType & "U.PostItems desc,U.UserID desc"
Case 2
sql = sql & " order by " & strOrderType & "U.PostItems asc,U.UserID desc"
Case 3
sql = sql & Querysql & " order by " & strOrderType & "U.LastLoginTime desc,U.UserID desc"
Case 4
sql = sql & Querysql & " order by " & strOrderType & "U.RegTime desc,U.UserID desc"
Case Else
If strOrderType = "" Then
If CurrentPage > 1 Then
Querysql = Querysql & " and U.UserID < (select min(UserID) from (select top " & ((CurrentPage - 1) * MaxPerPage) & " U.UserID from PE_User U " & Querysql & " order by U.UserID desc) as QueryUser) "
End If
sql = sql & Querysql & " order by U.UserID desc"
Else
sql = sql & Querysql & " order by " & strOrderType & "U.UserID desc"
End If
End Select
Response.Write "</td></tr></table>"
If FoundErr = True Then Exit Sub
Response.Write "<table width='100%' border='0' cellpadding='0' cellspacing='0'>"
Response.Write " <tr>"
Response.Write " <form name='myform' method='Post' action='Admin_User.asp'>"
Response.Write " <td>"
Response.Write " <table width='100%' border='0' align='center' cellpadding='2' cellspacing='1' class='border'>"
Response.Write " <tr class='title' height='22' align='center'>"
Response.Write " <td width='30'>选中</td>"
Response.Write " <td width='70'> 用户名</td>"
Response.Write " <td>会员类型</td>"
Response.Write " <td>所属会员组</td>"
Response.Write " <td width='60'><a href='" & strFileName & "&MaxPerPage=" & MaxPerPage & "&OrderType=Balance'>资金余额<a></td>"
Response.Write " <td width='60'><a href='" & strFileName & "&MaxPerPage=" & MaxPerPage & "&OrderType=Point'>可用" & PointName & "数</a></td>"
Response.Write " <td width='60'>剩余天数</td>"
Response.Write " <td width='60'><a href='" & strFileName & "&MaxPerPage=" & MaxPerPage & "&OrderType=UserExp'>可用积分</a></td>"
Response.Write " <td width='120'>最后登录IP<br>最后登录时间</td>"
Response.Write " <td width='40'>登录<br>次数</td>"
Response.Write " <td width='40'>状态</td>"
Response.Write " <td width='40'>聚合</td>"
Response.Write " </tr>"
Set rsUserList = Server.CreateObject("Adodb.RecordSet")
rsUserList.Open sql, Conn, 1, 1
If rsUserList.BOF And rsUserList.EOF Then
Response.Write "<tr><td colspan='20' height='50' align='center'>共找到 <font color=red>0</font> 个会员</td></tr>"
Else
If (SearchType = 1 Or SearchType = 2 Or SearchType = 3 Or SearchType = 4 Or strOrderType <> "") And CurrentPage > 1 Then
If (CurrentPage - 1) * MaxPerPage < totalPut Then
rsUserList.Move (CurrentPage - 1) * MaxPerPage
Else
CurrentPage = 1
End If
End If
Dim UserNum
UserNum = 0
strFileName = strFileName & "&OrderType=" & OrderType
Do While Not rsUserList.EOF
Response.Write " <tr class='tdbg' onmouseout=""this.className='tdbg'"" onmouseover=""this.className='tdbgmouseover'"" align=center>"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -