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

📄 admin_showpurview.asp

📁 个人网站比较简短
💻 ASP
📖 第 1 页 / 共 3 页
字号:
    If ChannelID > 0 Then
        Set rsChannel = Conn.Execute("select * from PE_Channel where ChannelID=" & ChannelID)
        If Not (rsChannel.BOF Or rsChannel.EOF) Then
            ChannelDir = rsChannel("ChannelDir")
            ChannelName = rsChannel("ChannelName")
            ChannelShortName = rsChannel("ChannelShortName")
            ModuleType = rsChannel("ModuleType")
            Set rsAdmin = Conn.Execute("select AdminPurview_" & ChannelDir & ",arrClass_View,arrClass_Input,arrClass_Check,arrClass_Manage from PE_Admin where AdminName='" & AdminName & "'")
            If Not (rsAdmin.BOF And rsAdmin.EOF) Then
                Channel_Purview = rsAdmin(0)
                arrClass_View = rsAdmin("arrClass_View")
                arrClass_Input = rsAdmin("arrClass_Input")
                arrClass_Check = rsAdmin("arrClass_Check")
                arrClass_Manage = rsAdmin("arrClass_Manage")
            End If
            rsAdmin.Close
            Set rsAdmin = Nothing
        End If
        rsChannel.Close
        Set rsChannel = Nothing
    End If

    Response.Write "<table width='100%' border='0' align='center' cellpadding='2' cellspacing='1' class='border'>"
    Response.Write "  <tr class='title'>"
    Response.Write "    <td colspan='2' height='22'><strong>" & ChannelName & "</strong> "
    If Channel_Purview = 1 Then Response.Write "(频道管理员)"
    If Channel_Purview = 2 Then Response.Write "(栏目总编)"
    If Channel_Purview = 3 Then Response.Write "(栏目管理员)"
    If Channel_Purview = 4 Then Response.Write "(无权限)"
    Response.Write "    </td>"
    Response.Write "  </tr>"
    Response.Write "  <tr class='tdbg'>"
    Response.Write "    <td width='30%'>栏目管理、专题管理、生成管理权限</td>"
    Response.Write "    <td align='center' width='20%'>"
    If AdminPurview = 1 Or Channel_Purview = 1 Then
        Response.Write "<font color=blue>√</font>"
    Else
        Response.Write "<font color=red>×</font>"
    End If
    Response.Write "    </td>"
    Response.Write "  </tr>"
    Response.Write "  <tr class='tdbg'>"
    Response.Write "    <td width='30%'>专题" & ChannelShortName & "管理权限</td>"
    Response.Write "    <td align='center' width='20%'>"
    If AdminPurview = 1 Or Channel_Purview <= 2 Then
        Response.Write "<font color=blue>√</font>"
    Else
        Response.Write "<font color=red>×</font>"
    End If
    Response.Write "    </td>"
    Response.Write "  </tr>"
    Response.Write "  <tr class='tdbg'>"
    Response.Write "    <td width='30%'>" & ChannelShortName & "评论、回收站及其它管理权限</td>"
    Response.Write "    <td align='center' width='20%'>"
    If AdminPurview = 1 Or Channel_Purview = 1 Then
        Response.Write "<font color=blue>√</font>"
    Else
        Response.Write "<font color=red>×</font>"
    End If
    Response.Write "    </td>"
    Response.Write "  </tr>"
    Response.Write "  <tr class='tdbg'>"
    Response.Write "    <td width='30%'>各栏目" & ChannelShortName & "录入、审核、管理权限</td>"
    Response.Write "    <td align='center' width='20%'>"
    If Channel_Purview <= 2 Then
        Response.Write "<font color=blue>全部权限</font>"
    ElseIf Channel_Purview = 3 Then
        Response.Write "<font color=blue>部分权限</font>"
    Else
        Response.Write "<font color=red>无权限</font>"
    End If
    Response.Write "    </td>"
    Response.Write "  </tr>"
    Response.Write "</table>"
    Response.Write "<br>"

    Response.Write "<table width='100%' border='0' align='center' cellpadding='2' cellspacing='1' class='border'>"
    Response.Write "  <tr class='title'>"
    Response.Write "    <td height='22'><strong>更多权限:</strong></td>"
    Response.Write "  </tr>"
    Response.Write "  <tr class='tdbg'>"
    Response.Write "    <td>"
    Response.Write "模板管理&nbsp;" & ShowPurview("Template_" & ChannelDir) & "&nbsp;&nbsp;"
    Response.Write "JS文件管理&nbsp;" & ShowPurview("JsFile_" & ChannelDir) & "&nbsp;&nbsp;"
    Response.Write "顶部菜单&nbsp;" & ShowPurview("Keyword_" & ChannelDir) & "&nbsp;&nbsp;"
    Response.Write "关键字管理&nbsp;" & ShowPurview("Template_" & ChannelDir) & "&nbsp;&nbsp;"
    If ModuleType = 5 Then
        Response.Write "厂商管理&nbsp;" & ShowPurview("Producer_" & ChannelDir) & "&nbsp;&nbsp;"
        Response.Write "品牌管理&nbsp;" & ShowPurview("Trademark_" & ChannelDir) & "&nbsp;&nbsp;"
    Else
        Response.Write "作者管理&nbsp;" & ShowPurview("Author_" & ChannelDir) & "&nbsp;&nbsp;"
        Response.Write "来源管理&nbsp;" & ShowPurview("Copyfrom_" & ChannelDir) & "&nbsp;&nbsp;"
    End If
    Response.Write "更新XML&nbsp;" & ShowPurview("XML_" & ChannelDir) & "&nbsp;&nbsp;"
    Response.Write "自定义字段&nbsp;" & ShowPurview("Field_" & ChannelDir) & "&nbsp;&nbsp;"
    Response.Write "广告管理&nbsp;" & ShowPurview("AD_" & ChannelDir) & "&nbsp;&nbsp;"
    Response.Write "    </td>"
    Response.Write "  </tr>"
    Response.Write "</table>"
    Response.Write "<br>"

    If Channel_Purview = 3 Then
        Dim arrShowLine(20)
        Dim sqlClass, rsClass, i, iDepth
        For i = 0 To UBound(arrShowLine)
            arrShowLine(i) = False
        Next
        sqlClass = "select * from PE_Class where ChannelID=" & ChannelID & " order by RootID,OrderID"
        Set rsClass = Server.CreateObject("adodb.recordset")
        rsClass.Open sqlClass, Conn, 1, 1

        Response.Write "<table width='100%' border='0' cellspacing='1' cellpadding='2' class='border'>"
        Response.Write "  <tr align='center' class='title'>"
        Response.Write "    <td height='22'><strong>栏目名称</strong></td>"
        Response.Write "    <td width='100'><strong>查看</strong></td>"
        Response.Write "    <td width='100'><strong>录入</strong></td>"
        Response.Write "    <td width='100'><strong>审核</strong></td>"
        Response.Write "    <td width='100'><strong>管理</strong></td>"
        Response.Write "  </tr>"
        Do While Not rsClass.EOF
            Response.Write "     <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")
            Response.Write "</td><td align='center'>"
            If FoundInArr(arrClass_View, rsClass("ClassID"), ",") = True Then
                Response.Write "<font color=blue>√</font>"
            Else
                Response.Write "<font color=red>×</font>"
            End If
            Response.Write "</td><td align='center'>"
            If FoundInArr(arrClass_Input, rsClass("ClassID"), ",") = True Then
                Response.Write "<font color=blue>√</font>"
            Else
                Response.Write "<font color=red>×</font>"
            End If
            Response.Write "</td><td align='center'>"
            If FoundInArr(arrClass_Check, rsClass("ClassID"), ",") = True Then
                Response.Write "<font color=blue>√</font>"
            Else
                Response.Write "<font color=red>×</font>"
            End If
            Response.Write "</td><td align='center'>"
            If FoundInArr(arrClass_Manage, rsClass("ClassID"), ",") = True Then
                Response.Write "<font color=blue>√</font>"
            Else
                Response.Write "<font color=red>×</font>"
            End If
            Response.Write "</td></tr>"
        rsClass.MoveNext
        Loop
        rsClass.Close
        Set rsClass = Nothing
        Response.Write "</table>"
    End If
End Sub

Function ShowPurview(strPurview)
    If CheckPurview_Other(AdminPurview_Others, strPurview) = True Then
        ShowPurview = "<font color=blue>√</font>"
    Else
        ShowPurview = "<font color=red>×</font>"
    End If
End Function

Function ShowChannelOtherPurview(Channel_Purview, strPurview)
    If ChannelPurview = 1 And CheckPurview_Other(AdminPurview_Others, strPurview) = True Then
        ShowChannelOtherPurview = "<font color=blue>√</font>"
    Else
        ShowChannelOtherPurview = "<font color=red>×</font>"
    End If
End Function

Function GetChannelList()
    Dim rsChannel, sqlChannel, strChannel, i
    If ChannelID = 0 Then
        strChannel = "<a href='" & strFileName & "?iChannelID=0'><font color=red>所有管理权限</font></a> | "
    Else
        strChannel = "<a href='" & strFileName & "?iChannelID=0'>所有管理权限</a> | "
    End If
    sqlChannel = "select * from PE_Channel where ChannelType<=1 and Disabled=" & PE_False & " order by OrderID"
    Set rsChannel = Server.CreateObject("adodb.recordset")
    rsChannel.Open sqlChannel, Conn, 1, 1
    If rsChannel.BOF And rsChannel.EOF Then
        strChannel = strChannel & "没有任何频道"
    Else
        i = 1
        Do While Not rsChannel.EOF
            If rsChannel("ChannelID") = ChannelID Then
                strChannel = strChannel & "<a href='" & strFileName & "?iChannelID=" & ChannelID & "'><font color=red>" & rsChannel("ChannelName") & "权限</font></a>"
            Else
                strChannel = strChannel & "<a href='" & strFileName & "?iChannelID=" & rsChannel("ChannelID") & "'>" & rsChannel("ChannelName") & "权限</a>"
            End If
            strChannel = strChannel & " | "
            i = i + 1
            If i Mod 10 = 0 Then
                strChannel = strChannel & "<br>"
            End If
            rsChannel.MoveNext
        Loop
    End If
    rsChannel.Close
    Set rsChannel = Nothing
    GetChannelList = strChannel
End Function

Function GetManagePath()
    Dim strPath, sqlPath, rsPath
    strPath = "您现在的位置:查看管理权限&nbsp;&gt;&gt;&nbsp;"
    If ChannelID = 0 Then
        strPath = strPath & "所有管理权限"
    Else
        sqlPath = "select ChannelID,ChannelName from PE_Channel where ChannelID=" & ChannelID
        Set rsPath = Server.CreateObject("adodb.recordset")
        rsPath.Open sqlPath, Conn, 1, 1
        If rsPath.BOF And rsPath.EOF Then
            strPath = strPath & "错误的频道参数"
        Else
            strPath = strPath & "<a href='" & strFileName & "?iChannelID=" & rsPath(0) & "'>" & rsPath(1) & "权限</a>"
        End If
        rsPath.Close
        Set rsPath = Nothing
    End If
    GetManagePath = strPath
End Function
%>

⌨️ 快捷键说明

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