📄 admin_userdata.asp
字号:
<!--#include file="Inc/Level012.asp" -->
<!--#include file="Connections/connY.asp" -->
<!--#include file="Inc/TimeFormat.asp" -->
<!--#include file="Inc/UBBCode.asp" -->
<!--#include file="Inc/SetCss.asp" -->
<html>
<head>
<title><%=Forum_Title%></title>
<meta http-equiv="Content-Type" content="text/html;">
<meta http-equiv="Expires" CONTENT="0">
<meta http-equiv="Cache-Control" CONTENT="no-cache">
<meta http-equiv="Pragma" CONTENT="no-cache">
<!--#include file="Inc/Css.asp" -->
<script language=Javascript src="Js/Menu.Js"></script>
<script language=Javascript src="Js/Button.Js"></script>
<script language=Javascript src="Js/Operate.Js"></script>
</head>
<body leftmargin="0" topmargin="0" bgcolor="<%=Forum_ColorList_BgColor%>" vlink="<%=Forum_Css_A_Link_Color%>" onLoad="MM_preloadImages('<%=Forum_Pic_Write2%>','<%=Forum_Pic_Vote2%>')">
<!--#include file="Inc/Top.asp" -->
<table width="<%=Forum_Width%>" border="0" cellspacing="1" cellpadding="0" align="center" bgcolor="<%=Forum_ColorList_BorderColor%>">
<tr>
<td height="20" bgcolor="<%=Forum_ColorList_BgColor%>">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="font">
<tr>
<td> 您所在的位置: <a href="../" onfocus="this.blur()">首页</a> >>
<a href="List.asp" onFocus="this.blur()">讨论组</a> >> <font color="<%=Forum_ColorList_NavFontColor%>">论坛管理系统</font></td>
<td width="18">
<div align="center"></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table width="<%=Forum_Width%>" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td height=1></td>
</tr>
</table>
<table width="<%=Forum_Width%>" border="0" cellspacing="1" cellpadding="2" align="center" bgcolor="<%=Forum_ColorList_BorderColor%>" class="font">
<tr>
<td valign="top" width="102" bgcolor="<%=Forum_ColorList_BgColor%>">
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td>
<!--#include file="Inc/Menu.asp" -->
</td>
</tr>
</table>
</td>
<td bgcolor="<%=Forum_ColorList_BgColor%>" valign="top"> <br>
<table width="80%" border="0" cellspacing="1" cellpadding="2" align="center" class="font" bgcolor="<%=Forum_ColorList_BorderColor%>">
<tr>
<td bgcolor="<%=Forum_ColorList_TitleColor%>" height="20"> 用户数据管理</td>
</tr>
<tr>
<td bgcolor="<%=Forum_ColorList_BgColor%>" valign="top"> 1. 点击用户昵称编辑用户属性.
<br>
-------------------------------------------------------------------------------<br>
<b> <a href="Admin_UserData.asp" onFocus="this.blur()">列表</a> | <a href="Admin_UserData.asp?Action=AllDel" onFocus="this.blur()">批量删除</a></b><br>
-------------------------------------------------------------------------------
<br>
<%
If Request("Action")="DelUserNow" Then
Set rsDel = Server.CreateObject("ADODB.Recordset")
If Request("TimeLimited")<>"A" Then
Sql = "Select * From tUserManage Where DateDiff('d',rLastLoginTime,Now())>"&Cint(Request("TimeLimited"))
Else
Sql = "Select * From tUserManage Where rLastLoginTime is null"
End If
rsDel.Open Sql,ConnY,3,3
TotalNum=rsDel.RecordCount
While Not rsDel.Eof
rsDel.Delete
rsDel.MoveNext
Wend
rsDel.Close
Set rsDel=Nothing
Response.Write " 成功批量删除"&TotalNum&"个用户."
End If
If Request("Action")="Delete" Then
Set rsDel = Server.CreateObject("ADODB.Recordset")
DelUsers=Split(Request("DelUser"),",")
For I=0 To Ubound(DelUsers)
Sql = "Select * From tUserManage Where rID="&DelUsers(I)
rsDel.Open Sql,ConnY,3,3
rsDel.Delete
rsDel.Close
Next
Set rsDel=Nothing
Response.Redirect "Admin_UserData.asp"
End If
If Request("Action")="" Then
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="font">
<form name="form3" method="post" action="Admin_UserData.asp">
<tr>
<td width="14%"> 查找用户:</td>
<td width="86%">
<input type="text" name="User" class="textfiled">
<input type="submit" name="Submit" value="查找" class="button" onFocus="this.blur()">
</td>
</tr>
</form>
</table>
<br>
<%
Set rsUser = Server.CreateObject("ADODB.Recordset")
If Request("User")="" Then
Sql = "Select * From tUserManage Where rUserID<>'Guest' And rUserID<>'Admin' Order By rRegTime desc"
Else
Sql = "Select * From tUserManage Where rUserID<>'Guest' And rUserID<>'Admin' And rNickName Like '%"&Request("User")&"%' Order By rRegTime desc"
End If
rsUser.Open Sql,ConnY,3,3
If Not rsUser.Eof Then
Dim PageSize
Dim RowNum
rsUser.PageSize=20
RowNum=rsUser.PageSize
PageSize=rsUser.PageSize
If Request("Page")<>"" Then
CurrentPage=Cint(Request("Page"))
Else
CurrentPage=1
End If
TotalNum=rsUser.RecordCount
If (TotalNum Mod PageSize)=0 Then
TotalPage=TotalNum \ PageSize
Else
TotalPage=TotalNum \ PageSize+1
End If
If CurrentPage<1 Then
CurrentPage=1
End If
If CurrentPage>TotalPage Then
CurrentPage=TotalPage
End If
rsUser.Move(CurrentPage-1)*PageSize
End If
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="font">
<form name="form2" method="post" action="Admin_UserData.asp?Action=Delete">
<tr bgcolor="<%=Forum_ColorList_TitleColor%>">
<td width="10%">
<div align="center">ID</div>
</td>
<td width="57%">
<div align="center">用户</div>
</td>
<td width="33%">
<div align="center">
选中后点击删除-><input type="submit" name="Submit" value="删除" class="button_none" onFocus="this.blur()">
</div>
</td>
</tr>
<%
While Not rsUser.Eof And PageSize>0
%>
<tr>
<td width="10%">
<div align="center"><%=rsUser("rID")%></div>
</td>
<td width="57%">
<div align="center"><a href="Admin_UserEdit.asp?I=<%=rsUser("rID")%>" onFocus="this.blur()"><%=rsUser("rNickName")%></a></div>
</td>
<td width="33%">
<div align="center">
<input type="checkbox" name="DelUser" value="<%=rsUser("rID")%>" onFocus="this.blur()">
</div>
</td>
</tr>
<%
PageSize=PageSize-1
RowNum=RowNum-1
rsUser.MoveNext
Wend
%></form>
<tr valign="bottom">
<form name="form1" method="post" action="" onsubmit="return vdf('Page','页码','NinRange1:<%=TotalPage%>');">
<td colspan="3" height="40">
<div align="right">
<input type="hidden" name="User" value="<%=Request("User")%>">
<%
Response.Write "用户总数:"&rsUser.RecordCount&" "
If CurrentPage<=1 Then
Response.Write "<font color="&Forum_ColorList_UFontColor&">首页 上页</font>"
Else
Response.Write "<a href='javascript:ToPage(1)' onFocus='this.blur()'>首页</a> <a href='javascript:ToPage("&(Cint(CurrentPage)-1)&")' onFocus='this.blur()'>上页</a>"
End If
Response.Write " <font color='"&Forum_ColorList_PFontColor&"'>"&CurrentPage&"</font>/"&TotalPage&" "
If CurrentPage>=TotalPage Then
Response.Write "<font color="&Forum_ColorList_UFontColor&">下页 末页</font>"
Else
Response.Write "<a href='javascript:ToPage("&(Cint(CurrentPage)+1)&")' onFocus='this.blur()'>下页</a> <a href='javascript:ToPage("&TotalPage&")' onFocus='this.blur()'>末页</a>"
End If
%>
跳转至第
<input type="text" name="Page" class="Textfiled_Bottom" size="1" maxlength="3">
页
<input type="submit" name="Submit" class="Button_None" value="提交" onFocus="this.blur()">
</div></td>
</form>
</tr>
</table>
<%
End If
If Request("Action")="AllDel" Then
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="font">
<form name="form4" method="post" action="Admin_UserData.asp?Action=DelUserNow"><tr>
<td> 删除指定日期内没有登陆的用户
<select name=TimeLimited size=1 class="textfiled">
<option value=A>删除所有的
<option value=1>删除一天前的
<option value=2>删除两天前的
<option value=7>删除一星期前的
<option value=15>删除半个月前的
<option value=30>删除一个月前的
<option value=60>删除两个月前的
<option value=180>删除半年前的
<option value=360>删除一年前的
<option value=720>删除二年前的
</select>
<input type="submit" name="Submit" value="删除" class=button>
<br>
</td>
</tr></form>
</table>
<%
End If
%>
</td>
</tr>
</table>
<div align="center"><br>
</div>
</td>
</tr>
</table>
<!--#include file="Inc/Bottom.asp" -->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -