📄 admin_setclasspurview.asp
字号:
<!--#include file="Inc/Const.asp"-->
<%
dim UserID,Action
dim AdminName,AdminPurview
dim arrClassMaster,arrClassCheck,arrClassInput,arrClassView
dim sqlClass,rsClass,iDepth,TempName,sClassID
dim sType
dim arrChildID,arrShowLine(10)
arrChildID=Trim(Request("ID"))
arrChildID=Replace(arrChildID," ","")
if Not IsNumeric(Replace(arrChildID,",","")) then arrChildID=0
for i=0 to ubound(arrShowLine)
arrShowLine(i)=False
next
sType=Trim(Request("Type"))
Action=Trim(Request("Action"))
ChannelID=Cl.GetClng(request("ChannelID"))
if ChannelID=0 then
FoundErr=True
ErrMsg=ErrMsg & "<br /><li>请指定频道ID</li>"
end if
FileName="Admin_SetClassPurview.asp?Type="&sType&"&ChannelID=" & ChannelID
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../Skins/Css/Admin.Css" rel="stylesheet" type="text/css">
<title>设置栏目权限</title>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<%
ClassPurviewBody
%>
</body>
</html>
<%
CloseAllObj
if FoundErr=True then
Response.write ErrMsg
response.end
end if
Sub ClassPurviewBody()
sqlClass="Select * From Cl_Class where (ParentID In ("&arrChildID&") or Depth<=1) and ChannelID="&Cint(ChannelID)&" order by RootID,OrderID"
set rsClass=Cl.Execute(sqlClass)'server.CreateObject("adodb.recordset")
if Lcase(sType)="u" then
Arr_User_Pueview
else
Arr_Admin_Pueview
end if
Set rsClass=Nothing
%>
</table>
</form>
<%
End Sub
Sub Arr_Admin_Pueview()
if Action="Modify" then
UserID=Cl.GetClng(request("UserID"))
if UserID=0 then
FoundErr=True
ErrMsg=ErrMsg & "<br /><li>请指定要修改的管理员ID</li>"
else
sql="Select UserName,Purview,arrClassMaster,arrClassCheck,arrClassInput from Cl_Admin where ID=" & UserID
Set rs=Cl.Execute(sql)
if rs.Bof and rs.EOF then
FoundErr=True
ErrMsg=ErrMsg & "<br /><li>不存在此管理员!</li>"
else
AdminName=rs(0)
AdminPurview=rs(1)
arrClassMaster=rs(2)
arrClassCheck=rs(3)
arrClassInput=rs(4)
end if
Set rs=Nothing
end if
FileName="Admin_SetClassPurview.asp?Type="&sType&"&ChannelID=" & ChannelID & "&Action=" & Action & "&UserID=" & UserID
end if
%>
<form name="myform" method="post" action="">
<table width="100%" border="0" cellspacing="1" cellpadding="2" class="border">
<tr align="center" class="title">
<td height="22"><strong>栏目名称</strong></td>
<td width="30" height="22"><strong>录入</strong></td>
<td width="30"><strong>审核</strong></td>
<td width="30" height="22"><strong>管理</strong></td>
</tr>
<%
do while not rsClass.eof
sClassID=rsClass("ClassID")
%>
<tr class="tdbg" onMouseOut="this.className='tdbg'" onMouseOver="this.className='tdbg2'">
<td> <%
iDepth=rsClass("Depth")
if rsClass("NextID")>0 then
arrShowLine(iDepth)=True
else
arrShowLine(iDepth)=False
end if
if iDepth>0 then
for i=1 to iDepth
if i=iDepth then
if rsClass("NextID")>0 then
response.write "<img src='"&Cl.Webdir&"images/Tree/line1.gif' width='17' height='16' valign='abvmiddle'>"
else
response.write "<img src='"&Cl.Webdir&"images/Tree/line2.gif' width='17' height='16' valign='abvmiddle'>"
end if
else
if arrShowLine(i)=True then
response.write "<img src='"&Cl.Webdir&"images/Tree/line3.gif' width='17' height='16' valign='abvmiddle'>"
else
response.write "<img src='"&Cl.Webdir&"images/Tree/line4.gif' width='17' height='16' valign='abvmiddle'>"
end if
end if
next
end if
if rsClass("Child")>0 then
if Instr(","&arrChildID&",",","&rsClass("ParentPath") & "," & sClassID & ",")>0 then
response.write "<a href='"&FileName&"&ID=" & rsClass("ParentPath") & "' title='收起栏目'><img src='"&Cl.Webdir&"images/Tree/folder3.gif' width='15' height='15' valign='abvmiddle' border=0>" & rsClass("ClassName") & "</a> (" & rsClass("Child") & ")"
else
response.write "<a href='"&FileName&"&ID=" & rsClass("ParentPath") & "," & sClassID & "' title='展开栏目'><img src='"&Cl.Webdir&"images/Tree/folder4.gif' width='15' height='15' valign='abvmiddle' border=0>" & rsClass("ClassName") & "</a> (" & rsClass("Child") & ")"
end if
else
response.write "<img src='"&Cl.Webdir&"images/Tree/folder3.gif' width='15' height='15' valign='abvmiddle' border=0>" & rsClass("ClassName")
end if
%> </td>
<td width="30" align="center"><%
response.write "<input name='ClassInput' type='checkbox' id='ClassInput' value='" & sClassID & "'"
if Action="Modify" then
if Instr("," & arrClassInput & ",",","&sClassID&",")>0 then response.write " checked"
end if
response.write ">"
%>
</td>
<td width="30" align="center"><%
response.write "<input name='ClassCheck' type='checkbox' id='ClassCheck' value='" & sClassID & "'"
if Action="Modify" then
if Instr("," & arrClassCheck & ",",","&sClassID&",")>0 then response.write " checked"
end if
response.write ">"
%></td>
<td width="30" align="center"><%
response.write "<input name='ClassMaster' type='checkbox' id='ClassMaster' value='" & sClassID & "'"
if Action="Modify" then
if Instr("," & arrClassMaster & ",",","&sClassID&",")>0 then response.write " checked"
end if
response.write ">"
%></td>
</tr>
<%
rsClass.movenext
loop
end Sub
Sub Arr_User_Pueview()
if Action="Modify" then
UserID=Cl.GetClng(request("UserID"))
if UserID=0 then
Response.write "<br /><li>请指定要修改的管理员ID</li>"
Exit Sub
else
sql="Select Purview,arrClassView,arrClassMaster,arrClassCheck,arrClassInput from Cl_UserGroup where ID=" & UserID
Set rs=Cl.Execute(sql)
if rs.Bof and rs.EOF then
Response.write "<br /><li>不存在此管理员!</li>"
Exit Sub
else
arrClassView=rs(1)
arrClassMaster=rs(2)
arrClassCheck=rs(3)
arrClassInput=rs(4)
end if
Set rs=Nothing
end if
FileName="Admin_SetClassPurview.asp?Type="&sType&"&ChannelID=" & ChannelID & "&Action=" & Action & "&UserID=" & UserID
end if
%>
<form name="myform" method="post" action="">
<table width="100%" border="0" cellspacing="1" cellpadding="2" class="border">
<tr align="center" class="title">
<td height="22"><strong>栏目名称</strong></td>
<td width="30" height="22"><strong>浏览</strong></td>
<td width="30" height="22"><strong>录入</strong></td>
<td width="30"><strong>审核</strong></td>
<td width="30" height="22"><strong>管理</strong></td>
</tr>
<%
do while not rsClass.eof
sClassID=rsClass("ClassID")
%>
<tr class="tdbg" onMouseOut="this.className='tdbg'" onMouseOver="this.className='tdbg2'">
<td> <%
iDepth=rsClass("Depth")
if rsClass("NextID")>0 then
arrShowLine(iDepth)=True
else
arrShowLine(iDepth)=False
end if
if iDepth>0 then
for i=1 to iDepth
if i=iDepth then
if rsClass("NextID")>0 then
response.write "<img src='"&Cl.Webdir&"images/Tree/line1.gif' width='17' height='16' valign='abvmiddle'>"
else
response.write "<img src='"&Cl.Webdir&"images/Tree/line2.gif' width='17' height='16' valign='abvmiddle'>"
end if
else
if arrShowLine(i)=True then
response.write "<img src='"&Cl.Webdir&"images/Tree/line3.gif' width='17' height='16' valign='abvmiddle'>"
else
response.write "<img src='"&Cl.Webdir&"images/Tree/line4.gif' width='17' height='16' valign='abvmiddle'>"
end if
end if
next
end if
if rsClass("Child")>0 then
if Instr(","&arrChildID&",",","&rsClass("ParentPath") & "," & sClassID & ",")>0 then
response.write "<a href='"&FileName&"&ID=" & rsClass("ParentPath") & "' title='收起栏目'><img src='"&Cl.Webdir&"images/Tree/folder3.gif' width='15' height='15' valign='abvmiddle' border=0>" & rsClass("ClassName") & "</a> (" & rsClass("Child") & ")"
else
response.write "<a href='"&FileName&"&ID=" & rsClass("ParentPath") & "," & sClassID & "' title='展开栏目'><img src='"&Cl.Webdir&"images/Tree/folder4.gif' width='15' height='15' valign='abvmiddle' border=0>" & rsClass("ClassName") & "</a> (" & rsClass("Child") & ")"
end if
else
response.write "<img src='"&Cl.Webdir&"images/Tree/folder3.gif' width='15' height='15' valign='abvmiddle' border=0>" & rsClass("ClassName")
end if
%> </td>
<td width="30" align="center"><%
response.write "<input name='ClassView' type='checkbox' id='ClassView' value='" & sClassID & "'"
if Action="Modify" then
if Instr("," & arrClassView & ",",","&sClassID&",")>0 then response.write " checked"
end if
response.write ">"
%>
</td>
<td width="30" align="center"><%
response.write "<input name='ClassInput' type='checkbox' id='ClassInput' value='" & sClassID & "'"
if Action="Modify" then
if Instr("," & arrClassInput & ",",","&sClassID&",")>0 then response.write " checked"
end if
response.write ">"
%>
</td>
<td width="30" align="center"><%
response.write "<input name='ClassCheck' type='checkbox' id='ClassCheck' value='" & sClassID & "'"
if Action="Modify" then
if Instr("," & arrClassCheck & ",",","&sClassID&",")>0 then response.write " checked"
end if
response.write ">"
%></td>
<td width="30" align="center"><%
response.write "<input name='ClassMaster' type='checkbox' id='ClassMaster' value='" & sClassID & "'"
if Action="Modify" then
if Instr("," & arrClassMaster & ",",","&sClassID&",")>0 then response.write " checked"
end if
response.write ">"
%></td>
</tr>
<%
rsClass.movenext
loop
end Sub
%>
<!--
'┌───────────────────────────────────────────────────────┐
'│ │
'│ CreateLive CMS Version 4.0 │
'│ Powered by Aspoo.CN │
'│ │
'│ 邮箱: support@aspoo.cn Info@aspoo.cn │
'│ QQ: 3315263 596197794 │
'│ 网站: www.aspoo.cn www.aspoo.com │
'│ 论坛: bbs.aspoo.cn bbs.aspoo.com │
'│ │
'│ Copyright (C) 2005-2007 Aspoo.CN All Rights Reserved. │
'└───────────────────────────────────────────────────────┘
'-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -