📄 admin_user.asp
字号:
CurrentPage=1
Else
rs.move (CurrentPage-1)*PageSize
End if
SQL = rs.GetRows(PageSize)
rs.Close:set rs=Nothing
ShowContent
end if
end if
End Sub
Sub ShowContent()
%>
<script language="JavaScript" type="text/javascript">
function unselectall()
{
if(document.myform.chkAll.checked){
document.myform.chkAll.checked = document.myform.chkAll.checked&0;
}
}
function CheckAll(form)
{
for (var i=0;i<form.elements.length;i++)
{
var e = form.elements[i];
if (e.name != "chkAll")
e.checked = form.chkAll.checked;
}
}
</script>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<form name="myform" method="Post" action="Admin_User.asp" onSubmit="return confirm('确定要执行选定的操作吗?');">
<tr><td>
<table border="0" cellspacing="1" align="center" width="100%" cellpadding="0" class="border">
<tr class="title">
<td width="30" align="center"><strong>选中</strong></td>
<td width="30" align="center"><strong>ID</strong></td>
<td width="80" height="22" align="center"><strong> 用户名</strong></td>
<td height="22" align="center"><strong>所属用户组</strong></td>
<td align="center"><strong>剩余<%=Cl.Web_Setting(28)%>/天数</strong></td>
<td height="22" align="center"><strong>最后登录IP</strong></td>
<td align="center"><strong>最后登录时间</strong></td>
<td width="60" height="22" align="center"><strong>登录次数</strong></td>
<td width="40" height="22" align="center"><strong> 状态</strong></td>
<td width="120" height="22" align="center"><strong> 操作</strong></td>
</tr>
<%
For i=0 To Ubound(SQL,2)
%>
<tr class="tdbg" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#cccccc'" style="padding: 0px 2px;">
<td width="30" align="center"><input name="UserID" type="checkbox" onclick="unselectall()" id="UserID" value="<%=SQL(0,i)%>"></td>
<td width="30" align="center"><%=SQL(0,i)%></td>
<td width="80" align="center"><%
response.write "<a href='Admin_User.asp?Action=Modify&UserID=" & SQL(0,i) & "'>" & SQL(1,i) & "</a>"
%>
</td>
<td align="center"><font color=blue><%=Cl.GetUserGroupName(SQL(2,i))%></font></td>
<td align="center">
<%
if SQL(3,i)=1 then
if SQL(4,i)<=0 then
response.write "<font color=#ff6600>" & SQL(4,i) & "</font> "&Cl.Web_Setting(29)&""
else
if SQL(4,i)<=10 then
response.write "<font color=blue>" & SQL(4,i) & "</font> "&Cl.Web_Setting(29)&""
else
response.write SQL(4,i) & " "&Cl.Web_Setting(29)&""
end if
end if
else
ValidDays=SQL(6,i)
tmpDays = ValidDays-DateDiff("D",SQL(7,i),now())
if tmpDays<=10 then
response.write "<font color=#ff0033>" & tmpDays & "</font> 天"
else
response.write "<font color=#0000ff>" & tmpDays & "</font> 天"
end if
end if
%></td>
<td align="center"> <%
if SQL(8,i)<>"" then
response.write "<a href=Admin_LockIP.asp?action=add&userip="&SQL(8,i)&">"&SQL(8,i)&"</a>"
else
response.write " "
end if%> </td>
<td align="center"> <%=SQL(9,i)%> </td>
<td width="60" align="center"><%=SQL(10,i)%> </td>
<td width="40" align="center"><%
if SQL(11,i)<>0 then
response.write "<font color=#ff6600>已锁定</font>"
else
response.write "正常"
end if%></td>
<td width="120" align="center"><%
response.write "<a href='Admin_User.asp?Action=Modify&UserID=" & SQL(0,i) & "'>修改</a> "
if SQL(2,i)<>1 then '管理员判断
if SQL(11,i)=0 then
response.write "<a href='Admin_User.asp?Action=Lock&UserID=" & SQL(0,i) & "'>锁定</a> "
else
response.write "<a href='Admin_User.asp?Action=UnLock&UserID=" & SQL(0,i) & "'>解锁</a> "
end if
response.write "<a href='Admin_User.asp?Action=Del&UserID=" & SQL(0,i) & "' onClick='return confirm(""确定要删除此用户吗?"");'>删除</a> "
'response.write "<a href='Admin_User.asp?Action=AddMoney&UserID=" & SQL(0,i) & "'>续费</a>"
end if
%> </td>
</tr>
<%Next%>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="border">
<tr class="tdbg">
<td width="200" height="30"><input name="chkAll" type="checkbox" id="chkAll" onclick=CheckAll(this.form) value="checkbox">
选中本页显示的所有用户</td>
<td> <strong>操作:</strong>
<input name="Action" type="radio" value="Del" checked onClick="document.myform.UserGroupID.disabled=true">删除
<input name="Action" type="radio" value="Lock" onClick="document.myform.UserGroupID.disabled=true">锁定
<input name="Action" type="radio" value="UnLock" onClick="document.myform.UserGroupID.disabled=true">解锁
<input name="Action" type="radio" value="Move" onClick="document.myform.UserGroupID.disabled=false">移动到
<select name="UserGroupID" id="UserGroupID" disabled>
<%=Cl.UserGroup_Option(3)%>
</select>
<input type="Submit" name="Submit" value=" 执 行 " > </td>
</tr>
</table>
</td></tr></form></table>
<%=Cl.ShowPage(FileName,TotalPut,PageSize,"个","用户")%>
<%
End Sub
Sub ShowSearch()
%>
<form action="Admin_User.asp" method="post" name="form2" id="form2">
<table width="100%" align="center" border="0" cellspacing="1" cellpadding="2" class="border">
<tr class="title">
<td align="left" colspan="2" height="23">高级查询</td>
</tr>
<tr class="tdbg">
<td width="20%">注意事项</td>
<td width="80%">在记录很多的情况下搜索条件越多查询越慢,请尽量减少查询条件;最多显示记录数也不宜选择过大</td>
</tr>
<tr class="tdbg">
<td width="20%">最多查询记录数</td>
<td width="80%"><input size="45" name="searchMax" type="text" value="100" /></td>
</tr>
<tr class="tdbg">
<td width="20%">用户ID</td>
<td width="80%"><input size="45" name="userid" type="text" /></td>
</tr>
<tr class="tdbg">
<td width="20%">用户名</td>
<td width="80%"><input size="45" name="username" type="text" />
<input type="checkbox" name="usernamechk" value="yes" checked="checked" />
用户名完整匹配</td>
</tr>
<tr class="tdbg">
<td width="20%">用户IP</td>
<td width="80%"><input size="45" name="userip" type="text" /></td>
</tr>
<tr class="tdbg">
<td width="20%">用户等级</td>
<td width="80%">
<select size="1" name="UserGroupID">
<option value="0" selected="selected">任意</option>
<%=Cl.UserGroup_Option(0)%>
</select>
</td>
</tr>
<tr class="tdbg">
<td width="20%">Email包含</td>
<td width="80%"><input size="45" name="UserEmail" type="text" /></td>
</tr>
</table>
<table width="100%" align="center" border="0" cellspacing="1" cellpadding="2" class="border">
<!--特殊搜索-->
<tr class="title">
<td align="left" colspan="2" height="23">特殊查询 (注意: <多于> 或 <少于> 已默认包含 <等于>;条件留空则不使用此条件 )</td>
</tr>
<tr class="tdbg">
<td width="50%">登录次数:
<input type="radio" value="more" name="loginR" checked="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="checked" id="Radio3" />
多于
<input type="radio" value="less" name="vanishR" id="Radio4" />
少于
<input size="5" name="vanishT" type="text" id="Text2" />
天 </td>
</tr>
<tr class="tdbg">
<td width="50%">注册天数:
<input type="radio" value="more" name="regR" checked="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="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="tdbg" align="center" colspan="7"><input name="Submit" type="submit" value=" 搜 索 " /></td>
</tr>
<input name="UserSearch" type="hidden" id="UserSearch" value="11" />
</table>
</form>
<%
End Sub
Sub EditUserInfo()
Dim UserLogins,UserLastIP,JoinDateTime,LastLoginTime
if Action="Modify" then
UserID = Cl.GetClng(UserID)
UserName = Trim(Request("UserName"))
if UserID>0 then
sqlUser="select * from " & Db.UserTable & " Where UserID=" & UserID
ElseIf UserName<>"" then
sqlUser="select * from " & Db.UserTable & " Where UserName='" & Cl.CheckStr(UserName) & "'"
Else
Cl.ShowErr("<br /><li>参数不足!</li>")
End if
Set rsUser=Cl.Execute_U(sqlUser)
if rsUser.bof and rsUser.eof then
rsUser.close:set rsUser=Nothing
Cl.OutMsg 0,"找不到指定的用户!","-1"
end if
UserName = rsUser(Db.UserName)
UserReName = rsUser(Db.UserReName)
Question = rsUser(Db.UserQuestion)
Answer = rsUser(Db.UserAnswer)
UserSex = rsUser(Db.UserSex)
UserGroupID = rsUser(Db.UserGroupID)
UserEmail = rsUser(Db.UserEmail)
UserIM = rsUser(Db.UserIM)
IF UserTableType="Bbsxp" then
UserIM = Split(UserIM,"\")
UserHome = rsUser(Db.UserHomePage)
UserQQ = UserIM(0)
UserICQ = UserIM(1)
UserMSN = UserIM(4)
UserAIM = UserIM(3)
UserYahoo = UserIM(5)
UserUC = UserIM(2)
if UserSex="male" then
UserSex=1
else
UserSex=0
end if
Else
UserIM = Split(UserIM,"|||")
UserHome = UserIM(0)
UserQQ = UserIM(1)
UserICQ = UserIM(2)
UserMSN = UserIM(3)
UserAIM = UserIM(4)
UserYahoo = UserIM(5)
UserUC = UserIM(6)
End if
CityInfo = Split(rsUser(Db.CityInfo),"|||")
if Ubound(CityInfo)<2 then Redim CityInfo(2)
UserBirthDay = rsUser(Db.UserBirthDay)
IDCard = rsUser(Db.IDCard)
UserWorking = rsUser(Db.UserWorking)
SchoolAge = rsUser(Db.SchoolAge)
UserHomePhone=rsUser(Db.UserHomePhone)
UserMobile = rsUser(Db.UserMobile)
UserTelePhone=rsUser(Db.UserTelePhone)
ZipCode = rsUser(Db.ZipCode)
UserAddRess = rsUser(Db.UserAddRess)
ChargeType = rsUser(Db.ChargeType)
BeginDate = rsUser(Db.BeginDate)
ValidNum = rsUser(Db.ValidNum)
UserPoint = rsUser(Db.UserPoint)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -