📄 authsetting.asp
字号:
<!-- #include file="common.asp" -->
<!-- #include file="isadm.asp" -->
<%
Dim zsb_auth, hasAuth2
hasAuth2 = False
zsb_auth = Split( Trim( session("zsb_auth") ), ",", -1, 1 )
For Each auth In zsb_auth
If ( auth = "account" ) Then
hasAuth2 = True
Exit For
End If
Next
If hasAuth2 = false and session("zsb_admtp")="normaladm" Then
Response.Write("<script language=javascript>alert('对不起,你没有权限,请联系超级管理员!');history.back(-1);</script>")
End If
%>
<%
set rs=Server.CreateObject("ADODB.Recordset")
If Trim(Request("op")) = "set" Then
authstring = Request.Form("config")
authstring = authstring + "," + Request.Form("news")
authstring = authstring + "," + Request.Form("account")
authstring = authstring + "," + Request.Form("auditing")
authstring = authstring + "," + Request.Form("modguest")
authstring = authstring + "," + Request.Form("repguest")
authstring = authstring + "," + Request.Form("delguest")
authstring = authstring + "," + Request.Form("settop")
sqlstr="select * from admin where ID=" & Trim(Request("id"))
rs.open sqlstr,conn,1,3
if not rs.eof then
'Response.Write( authstring )
rs("Authorization") = authstring
rs.Update
end if
rs.close
'set rs=nothing
If Trim(Session("zsb_admid")) = Trim(Request("id")) Then
Session("zsb_auth") = authstring
End If
End If
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>管理权限设置</title>
<link href="<%=GBCss%>/common.css" rel="stylesheet" type="text/css">
</head>
<body>
<%
sqlstr="select * from admin where ID=" & Trim(Request("id"))
rs.open sqlstr, conn, 1, 1
If not ( rs.eof and rs.bof ) Then
zsb_auth = Split( Trim(rs("Authorization")), ",", -1, 1 )
'For Each a In zsb_auth
'Response.Write( a )
'Next
Function hasAuth( authid )
'If ( zsb_auth = "" ) Then
'hasAuth = False
'Exit Function
'Else
For Each auth In zsb_auth
'Response.Write( auth )
If auth = authid Then
hasAuth = True
Exit For
Exit Function
Else
hasAuth = False
End If
Next
'End If
End Function
%>
<table width="500" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="20"> </td>
</tr>
<tr>
<td height="30" bgcolor="#FFFFFF" align="center" style="background-image:url(<% =GBSkin %>/guest_top.gif) " class="text_header"><b>管理员权限设置</b></td>
</tr>
</table>
<table width="500" border="0" align="center" cellpadding="0" cellspacing="5" bgcolor="#FFFFFF" style="background-image:url(<% =GBSkin %>/guest_bg.gif) ">
<form name="setauth" method="POST" action="authsetting.asp?pn=<%=Trim(Request("pn"))%>&op=set&id=<%=Trim(Request("id"))%>">
<tr>
<td height="20" class="mytext"> 系统设置:
<input id="config" name="config" type="checkbox" value="config" <% if hasAuth("config")=True then %>checked<% end if %>>
</td>
</tr>
<tr>
<td height="20" class="mytext"> 公告管理:
<input id="news" name="news" type="checkbox" value="news" <% if hasAuth("news")=True then %>checked<% end if %>>
</td>
</tr>
<tr>
<td height="20" class="mytext"> 帐号管理:
<input id="account" name="account" type="checkbox" value="account" <% if hasAuth("account")=True then %>checked<% end if %>>
</td>
</tr>
<tr>
<td height="20" class="mytext"> 留言审核:
<input id="auditing" name="auditing" type="checkbox" value="auditing" <% if hasAuth("auditing")=True then %>checked<% end if %>>
</td>
</tr>
<tr>
<td height="20" class="mytext"> 留言修改:
<input id="modguest" name="modguest" type="checkbox" value="modguest" <% if hasAuth("modguest")=True then %>checked<% end if %>>
</td>
</tr>
<tr>
<td height="20" class="mytext"> 留言回复:
<input id="repguest" name="repguest" type="checkbox" value="repguest" <% if hasAuth("repguest")=True then %>checked<% end if %>>
</td>
</tr>
<tr>
<td height="20" class="mytext"> 留言删除:
<input id="delguest" name="delguest" type="checkbox" value="delguest" <% if hasAuth("delguest")=True then %>checked<% end if %>>
</td>
</tr>
<tr>
<td height="20" class="mytext"> 留言置顶:
<input id="settop" name="settop" type="checkbox" value="settop" <% if hasAuth("settop")=True then %>checked<% end if %>>
</td>
</tr>
<tr align="center">
<td height="30">
<input type="button" onClick="javascript:location.href='aid_mang.asp?pn=<%=Trim(Request("pn"))%>';" value="返 回" class="button_common" style="width: 80px; height:18px;">
<input type="reset" value="重新填写" class="button_common" style="width: 80px; height:18px;">
<input type="submit" value="保存设置" class="button_common" style="width: 80px; height:18px;"></td>
</tr>
</form>
</table>
<% End If%>
<table width="500" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="30" bgcolor="#FFFFFF" align="center" style="background-image:url(<% =GBSkin %>/guest_top.gif) "></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -