📄 admin_setpasspurview.asp
字号:
<!--#include file="Inc/Const.asp"-->
<%
dim ID,rs,sql
dim Action,FoundErr,ErrMsg
dim arrClassID
dim FileName
Cl.Get_WebSetting
Action=Trim(Request("Action"))
ID=trim(request("ID"))
FileName="Admin_SetSchoolPurview.asp"
if Action="Modify" then
if Not IsNumeric(ID) then
FoundErr=True
ErrMsg=ErrMsg & "<br /><li>请指定要修改的ID</li>"
else
sql="Select arrClassID from Cl_SchoolIP where ID=" & Clng(ID)
Set rs=Conn.Execute(sql)
if rs.Bof and rs.EOF then
FoundErr=True
ErrMsg=ErrMsg & "<br /><li>不存在此用户!</li>"
else
arrClassID=rs(0)
end if
Set rs=nothing
end if
FileName="Admin_SetSchoolPurview.asp?Action=" & Action & "&ID=" & ID
end if
if FoundErr=True then
Response.write ErrMsg
response.end
end if
%>
<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
Sub ClassPurviewBody()
dim arrChildID,sClassID,i
arrChildID=Trim(Request("CID"))
arrChildID=Replace(arrChildID," ","")
if Not IsNumeric(Replace(arrChildID,",","")) then arrChildID=0
dim arrShowLine(10)
for i=0 to ubound(arrShowLine)
arrShowLine(i)=False
next
dim sqlClass,rsClass,iDepth,TempName
sqlClass="Select ClassID,ClassName,ParentPath,Child,Depth,NextID From Cl_Class where (ParentID In ("&arrChildID&") or Depth<=1) and ChannelID=2 order by RootID,OrderID"
set rsClass=Cl.Execute(sqlClass)'server.CreateObject("adodb.recordset")
'rsClass.open sqlClass,conn,1,1
'if rsClass.bof or rsClass.eof then
' Response.write "此频道暂无任何栏目!"
' Exit Sub
'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>
</tr>
<%
do while not rsClass.eof
sClassID=rsClass("ClassID")
%>
<tr class="tdbg" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#BFDFFF'">
<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='../images/tree_line1.gif' width='17' height='16' valign='abvmiddle'>"
else
response.write "<img src='../images/tree_line2.gif' width='17' height='16' valign='abvmiddle'>"
end if
else
if arrShowLine(i)=True then
response.write "<img src='../Images/tree_line3.gif' width='17' height='16' valign='abvmiddle'>"
else
response.write "<img src='../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&"?CID=" & rsClass("ParentPath") & "' title='收起栏目'><img src='../images/tree_folder3.gif' width='15' height='15' valign='abvmiddle' border=0>" & rsClass("ClassName") & "</a> (" & rsClass("Child") & ")"
else
response.write "<a href='"&FileName&"?CID=" & rsClass("ParentPath") & "," & sClassID & "' title='展开栏目'><img src='../images/tree_folder4.gif' width='15' height='15' valign='abvmiddle' border=0>" & rsClass("ClassName") & "</a> (" & rsClass("Child") & ")"
end if
else
response.write "<img src='../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='ClassID' type='checkbox' id='ClassID' value='" & sClassID & "'"
if Action="Modify" then
if Instr("," & arrClassID & ",",","&sClassID&",")>0 then response.write " checked"
end if
response.write ">"
%>
</td>
</tr>
<%
rsClass.movenext
loop
Set rsClass=nothing
%>
</table>
</form>
<%
End Sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -