⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ad_setclasspurview.asp

📁 该软件是帮助大学生更好的生活
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
option explicit
response.buffer=true	
Const PurviewLevel=1    '操作权限
Const CheckChannelID=0    '所属频道,0为不检测所属频道
%>
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="ad_ChkPurview.asp"-->
<%
dim ChannelID,UserID,rs,sql
dim Action,FoundErr,ErrMsg
dim AdminPurview_Channel
Action=Trim(request("Action"))
ChannelID=trim(request("ChannelID"))
UserID=trim(request("UserID"))
if ChannelID="" then
	FoundErr=True
	ErrMsg=ErrMsg & "<br><li>请指定频道ID</li>"
else
	ChannelID=Clng(ChannelID)
end if
if Action="Modify" then
	if UserID="" then
		FoundErr=True
		ErrMsg=ErrMsg & "<br><li>请指定要修改的用户ID</li>"
	else
		UserID=Clng(UserID)
		sql="Select * from Admin where ID=" & UserID
		Set rs=Server.CreateObject("Adodb.RecordSet")
		rs.Open sql,conn,1,3
		if rs.Bof and rs.EOF then
			FoundErr=True
			ErrMsg=ErrMsg & "<br><li>不存在此用户!</li>"
		else
			AdminName=rs("UserName")
			AdminPurview=rs("Purview")
			select case ChannelID
			case 2
				AdminPurview_Channel=rs("AdminPurview_Article")
			case 3
				AdminPurview_Channel=rs("AdminPurview_Soft")
			case 4
				AdminPurview_Channel=rs("AdminPurview_Photo")
			end select
		end if
		rs.close
		set rs=nothing
	end if
end if
if FoundErr=True then
	call WriteErrMsg()
	call CloseConn()
	response.end
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="ad_Style.css" rel="stylesheet" type="text/css">
<title>设置栏目权限</title>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<%
dim arrShowLine(10)
for i=0 to ubound(arrShowLine)
	arrShowLine(i)=False
next
dim sqlClass,rsClass,i,iDepth
select case ChannelID
case 2
	sqlClass="select * From ArticleClass order by RootID,OrderID"
case 3
	sqlClass="select * From SoftClass order by RootID,OrderID"
case 4
	sqlClass="select * From PhotoClass order by RootID,OrderID"
end select
set rsClass=server.CreateObject("adodb.recordset")
rsClass.open sqlClass,conn,1,1
%>
<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 
%>
  <tr class="tdbg">
    <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 
	  	response.write "<img src='Images/tree_folder4.gif' width='15' height='15' valign='abvmiddle'>" 
	  else 
	  	response.write "<img src='Images/tree_folder3.gif' width='15' height='15' valign='abvmiddle'>" 
	  end if 
	  if rsClass("Depth")=0 then 
	  	response.write "<b>" 
	  end if 
	  response.write rsClass("ClassName")
	  %>
    </td>
    <td width="30" align="center"><%
	response.write "<input name='Purview_Add' type='checkbox' id='Purview_Add' value='" & rsClass("ClassID") & "'"
	if Action="Modify" and AdminPurview_Channel=3 then
		if CheckClassMaster(rsClass("ClassInputer"),AdminName)=True then response.write " checked"
	end if
	response.write ">"
	%>
	</td>
    <td width="30" align="center"><%
	response.write "<input name='Purview_Check' type='checkbox' id='Purview_Check' value='" & rsClass("ClassID") & "'"
	if Action="Modify" and AdminPurview_Channel=3 then
		if CheckClassMaster(rsClass("ClassChecker"),AdminName)=True then response.write " checked"
	end if
	response.write ">"
	%></td>
    <td width="30" align="center"><%
	response.write "<input name='Purview_Manage' type='checkbox' id='Purview_Manage' value='" & rsClass("ClassID") & "'"
	if Action="Modify" and AdminPurview_Channel=3 then
		if CheckClassMaster(rsClass("ClassMaster"),AdminName)=True then response.write " checked"
	end if
	response.write ">"
	%></td>
  </tr>
<% 
	rsClass.movenext 
loop 
%>
</table>
</form>
</body>
</html>
<%
rsClass.close
set rsClass=nothing
call CloseConn()
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -