📄 userlist.asp
字号:
<!--#include file="User_conn.asp"-->
<!--#include file="../Include/cls_pageview.asp"-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>用户管理中心</title>
<link href="Images/css.css" rel="stylesheet" type="text/css">
</head>
<body>
<script Language="JavaScript" Type="text/javascript">
<!--
function userview(url) {
var
look=window.open(url,"","toolbar=no,location=no,top=100,left=50,directories=no,center:yes;status=no,menubar=no,scrollbars=yes,resizable=no width=820,height=480");
return (false);
}
//--></script>
<%
Dim UserHS
Set UserHS = New Art_User
Private CurrentPage,totalPut
Private MaxPerPage,SQL,tablebody,strErr,action,boxName,smscount,smstype,readaction,turl
Private ArticleStatus,ComeUrl,TotalPages
MaxPerPage =50
ComeUrl=Request.ServerVariables("HTTP_REFERER")
IF Cbool(UserHS.UserLoginChecked)=false then
Response.Write "<script>top.location.href ='login.asp' ;</script>"
Response.end
End If
%>
<table width="98%" height=20 border=0 align="center" cellPadding=2 cellSpacing=1 borderColor=#111111 class="table" id=AutoNumber3 style="BORDER-COLLAPSE: collapse">
<tr>
<td height=20 class="bg_tr"><B>所有注册会员</B></td>
<td width=583 height=20 align=right class="bg_tr">·<a href="?ListType=1">按会员ID排序</a> ·<a href="?ListType=2">按注册日期排序</a> ·<a href="?ListType=3">按登录次数排序</a></td>
</tr>
</table>
<%
Dim strLocalUrl,ValidDays,tmpDays
strLocalUrl = request.ServerVariables("SCRIPT_NAME")
Dim intPageNow
intPageNow = request.QueryString("page")
Dim intPageSize, strPageInfo
intPageSize = 20
Dim arrRecordInfo, i
Dim sqlCount,Sqls,UserSearch,pages,StrGuide,ListType
ListType=ChkClng(S("ListType"))
UserSearch = Request("UserSearch")
pages = "UserSearch="&Request("UserSearch")&"&page"
If ListType=1 Then
Param="Order By UserID Desc"
ElseIF ListType=2 Then
Param="Order By LoginTime Desc"
ElseIF ListType=3 Then
Param="Order By LoginNumber Desc"
End IF
if S("Username2")<>"" then
Sqls="where username like '%" & s("username2") & "%' "
else
Sqls=""
end if
sql = "SELECT [UserID], [GroupID], [UserName],[sex], [Email],[LoginNumber],[LoginTime], [Privacy] FROM [Art_User]" &Sqls&Param
sqlCount = "SELECT Count([UserID]) FROM [Art_User]"&Sqls
Dim clsRecordInfo
Set clsRecordInfo = New Cls_PageView
clsRecordInfo.intRecordCount = 2816
clsRecordInfo.strSqlCount = sqlCount
clsRecordInfo.strSql = sql
clsRecordInfo.intPageSize = intPageSize
clsRecordInfo.intPageNow = intPageNow
clsRecordInfo.strPageUrl = strLocalUrl
clsRecordInfo.strPageVar = pages
clsRecordInfo.objConn = Conn
arrRecordInfo = clsRecordInfo.arrRecordInfo
strPageInfo = clsRecordInfo.strPageInfo
Set clsRecordInfo = nothing
%>
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table">
<tr>
<td colspan="12" class="bg_tr">您现在的位置:<a href="?" ><font class="bg_tr">管理首页</font> </a>>> 注册用户管理>><%= StrGuide %></td>
</tr>
<tr class="tdbg">
<td align="center" nowrap><STRONG>ID</STRONG></td>
<td align="center" nowrap><STRONG>用户名</STRONG></td>
<td align="center" ><STRONG>所属用户组</STRONG></td>
<td align="center" nowrap><STRONG>性别</STRONG></td>
<td align="center" nowrap><STRONG>信箱</STRONG></td>
<td align="center"><STRONG>最后登录时间</STRONG></td>
<td align="center" nowrap><STRONG>登录次数</STRONG></td>
</tr>
<%
Dim bgColor,Sex,Email,LoginTime,LoginNumber
If IsArray(arrRecordInfo) Then
For i = 0 to UBound(arrRecordInfo, 2)
Sex=arrRecordInfo(3,i)
if Sex="1"then Sex="女"
if Sex="0"then Sex="男"
Email=arrRecordInfo(4,i)
LoginTime=arrRecordInfo(6,i)
LoginNumber=arrRecordInfo(5,i)
Privacy=arrRecordInfo(7,i)
%>
<tr onMouseOver=overColor(this) onMouseOut=outColor(this) class="tdbg">
<td align="center" ><%= arrRecordInfo(0,i) %></td>
<td align="center" ><a href="user_view.asp?id=<%=arrRecordInfo(0,i)%>" onClick="return userview(this.href);" target='_blank' ><%=Replace(arrRecordInfo(2,i),request("username2"),"<font color=""RED"">"&request("username2")&"</font>") %></a></td>
<td align="center" ><%=GetGroupName(arrRecordInfo(1,i)) %></td>
<td align="center" ><% If Privacy>0 Then Response.Write "保密" Else Response.Write Sex End If%></td>
<td align="center" ><% If Privacy=2 Then Response.Write "保密" Else Response.Write Email End If%></td>
<td align="center" ><% If Privacy>0 Then Response.Write "保密" Else Response.Write LoginTime End If%></td>
<td align="center" ><% If Privacy>0 Then Response.Write "保密" Else Response.Write LoginNumber End If%></td>
</tr>
<%
Next
End If
%>
<tr class="tdbg">
<td height="25" colspan="12" align="center"><%= strPageInfo%></td>
</tr>
</table>
<form action='userlist.asp' name='myform' method='pose'>
快速查找用户-> 用户名:<input type="text" name="username2" size="20" maxlength="30">
<input type='submit' value='搜索'>
</form>
<script language="javascript">
function overColor(Obj)
{
var elements=Obj.childNodes;
for(var i=0;i<elements.length;i++)
{
elements[i].className="tdbg1"
Obj.bgColor="";
}
}
function outColor(Obj)
{
var elements=Obj.childNodes;
for(var i=0;i<elements.length;i++)
{
elements[i].className="tdbg";
Obj.bgColor="";
}
}
</script>
<%
Public Function GetGroupName(GroupID)
On Error Resume Next
Dim Grs
Set Grs=ArtEXE("Select GroupSetting From Art_Group Where GroupID=" & GroupID)
If Not Grs.eof Then
GetGroupName = Split(Grs(0),"^@$@^")(0)
Else
GetGroupName="<font color=red>该用户组已被删除</font>"
End If
End Function
%>
<% Set UserHS = Nothing:call CloseConn() %>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -