📄 act.admin.asp
字号:
<!--#include file="ACT.Function.asp"-->
<!--#include file="../ACT_inc/cls_pageview.asp"-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>ACTCMS_Admin</title>
<link href="Images/css1/css.css" rel="stylesheet" type="text/css">
</head>
<body>
<%
If Not ACTCMS.ChkAdmin() Then '超级管理员检测
Call Actcms.ACTCMSErr("")
End If
Dim ShowErr
IF Request.QueryString("Action") = "Del" Then'生成HTML
Dim AdminID ,Sqllog
AdminID = ACTCMS.ChkNumeric(Request.QueryString("AdminID"))
IF AdminID <> 1 Then
Sqllog = "Delete From admin_ACT Where ID=" & AdminID
Conn.Execute (Sqllog)
ShowErr = "<li>删除管理员成功</li>"
set conn=nothing
Else
ShowErr = "<li>默认管理员不允许删除</li>"
End IF
Response.Redirect("Error.asp?Errs="&Server.URLEncode(ShowErr)&"&ErrorUrl=ACT.Admin.asp"&"&Title=")
Response.end
End IF
IF Request.QueryString("Action") = "Lock" Then
AdminID = ACTCMS.ChkNumeric(Request.QueryString("AdminID"))
Conn.execute("Update Admin_ACT set Locked=1 where ID ="&AdminID&"")
set conn=nothing
ShowErr = "<li>锁定成功 </li>"
Response.Redirect("Error.asp?Errs="&Server.URLEncode(ShowErr)&"&ErrorUrl=ACT.Admin.asp"&"&Title=")
Response.end
End IF
IF Request.QueryString("Action") = "Unlock" Then
AdminID = ACTCMS.ChkNumeric(Request.QueryString("AdminID"))
Conn.execute("Update Admin_ACT set Locked=0 where ID ="&AdminID&"")
set conn=nothing
ShowErr = "<li>解锁成功 </li>"
Response.Redirect("Error.asp?Errs="&Server.URLEncode(ShowErr)&"&ErrorUrl=ACT.Admin.asp"&"&Title=")
Response.end
End IF
Dim strLocalUrl
strLocalUrl = request.ServerVariables("SCRIPT_NAME")
Dim intPageNow
intPageNow = request.QueryString("page")
Dim intPageSize, strPageInfo
intPageSize = 30
Dim arrRecordInfo, i
Dim sql, sqlCount
sql = "SELECT [ID], [Admin_Name], [SuperTF], [LoginTime], [LoginIP], [LoginNumber], [Locked]" & _
" FROM [Admin_ACT]"& _
"ORDER BY [ID] DESC"
sqlCount = "SELECT Count([ID])" & _
" FROM [Admin_ACT]"
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 = "page"
clsRecordInfo.objConn = Conn
arrRecordInfo = clsRecordInfo.arrRecordInfo
strPageInfo = clsRecordInfo.strPageInfo
Set clsRecordInfo = nothing
%><form name="SysLog" method="post" action="ACT.AAdd.asp?Action=Add">
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table">
<tr>
<td class="bg_tr"><strong>系统设置----管理员管理<a href="#" target="_blank" style="cursor:help;'" class="Help"></a></strong></td>
</tr>
<tr>
<td ><strong>管理导航:</strong><strong> <a href="?">首页</a> ┆ <a href="ACT.AAdd.asp?Action=Add">添加新管理员</a> ┆</strong></td>
</tr>
</table>
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table">
<tr>
<td colspan="8" class="bg_tr">您现在的位置:系统设置 >> <a href="?"><font class="bg_tr">管理员管理</font></a></td>
</tr>
<tr>
<td width="115" align="center" >管理员</td>
<td width="111" align="center" >类型</td>
<td width="154" align="center" >最后登录时间</td>
<td width="136" align="center" >登录IP</td>
<td width="73" align="center" >登录次数</td>
<td width="70" align="center" >状态</td>
<td width="278" align="center" >操作</td>
</tr>
<%
Dim bgColor
If IsArray(arrRecordInfo) Then
For i = 0 to UBound(arrRecordInfo, 2)
%>
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
<td align="center" ><%= arrRecordInfo(1,i) %></td>
<td align="center" >
<%IF arrRecordInfo(2,i) = 1 Then Response.Write "<font color=red>超级管理员</font>" Else Response.Write "普通管理员" %>
</td>
<td align="center" ><%= arrRecordInfo(3,i) %></td>
<td align="center" ><%= arrRecordInfo(4,i) %></td>
<td align="center" ><%= arrRecordInfo(5,i) %></td>
<td align="center" >
<%IF arrRecordInfo(6,i) = 1 Then Response.Write "<font color=red>已锁定</font>" Else Response.Write "正常" %>
</td>
<td align="center" >
<a href="ACT.AAdd.asp?Action=Edit&AdminID=<%= arrRecordInfo(0,i) %>">修改 </a>|
<% IF arrRecordInfo(0,i) <> 1 Then %>
<a href="include/ACT.QX.ASP?AdminID=<%= arrRecordInfo(0,i) %>"> 修改权限 </a>|
<a href="?Action=Del&AdminID=<%= arrRecordInfo(0,i) %>" onClick="return confirm('确认删除此管理员吗?')">删除 </a>|
<%Else %>
<a href="#" disabled="disabled"> 修改权限 </a>|
<a href="#" disabled="disabled">删除 </a>|
<% End If
IF arrRecordInfo(0,i) <> 1 Then
IF arrRecordInfo(6,i) = 0 Then%>
<a href="?Action=Lock&AdminID=<%= arrRecordInfo(0,i) %>"> 锁定</a>
<% Else %>
<a href="?Action=Unlock&AdminID=<%= arrRecordInfo(0,i) %>"> 解锁</a>
<% End IF
End IF %> </td>
</tr>
<%
Next
End If
%>
<tr >
<td height="30" colspan="8" align="right" >
<input type=button onclick=CheckForm() class="ACT_btn" name=Submit1 value=" 添加新管理员 " /></td>
</tr>
<tr >
<td height="25" colspan="8" align="center" ><%= strPageInfo%></td>
</tr>
</table>
</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="";
}
}
function CheckForm()
{ var form=document.SysLog;
form.Submit1.value="正在提交数据,请稍等...";
form.Submit1.disabled=true;
form.submit();
return true;
}
</script>
<% CloseConn %>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -