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

📄 admin_channel.asp

📁 个人网站比较简短
💻 ASP
📖 第 1 页 / 共 5 页
字号:
<!--#include file="Admin_Common.asp"-->
<!--#include file="Admin_CommonCode_Content.asp"-->
<!--#include file="../Include/PowerEasy.FSO.asp"-->
<%
'**************************************************************
' Software name: PowerEasy SiteWeaver
' Web: http://www.powereasy.net
' Copyright (C) 2005-2008 佛山市动易网络科技有限公司 版权所有
'**************************************************************

Const NeedCheckComeUrl = True   '是否需要检查外部访问

Const PurviewLevel = 2      '0--不检查,1--超级管理员,2--普通管理员
Const PurviewLevel_Channel = 0   '0--不检查,1--频道管理员,2--栏目总编,3--栏目管理员
Const PurviewLevel_Others = "Channel"   '其他权限

rsGetAdmin.Close
Set rsGetAdmin = Nothing

Response.Write "<html><head><title>频道管理</title>" & vbCrLf
Response.Write "<meta http-equiv='Content-Type' content='text/html; charset=gb2312'>" & vbCrLf
Response.Write "<link href='Admin_Style.css' rel='stylesheet' type='text/css'>" & vbCrLf
Response.Write "</head>" & vbCrLf
Response.Write "<body leftmargin='2' topmargin='0' marginwidth='0' marginheight='0'>" & vbCrLf
Response.Write "<table width='100%' border='0' align='center' cellpadding='2' cellspacing='1' class='border'>" & vbCrLf
Call ShowPageTitle("频 道 管 理", 10002)
Response.Write "  <tr class='tdbg'>" & vbCrLf
Response.Write "    <td width='70' height='30'><strong>管理导航:</strong></td>" & vbCrLf
Response.Write "    <td><a href='Admin_Channel.asp'>频道管理首页</a>&nbsp;|&nbsp;<a href='Admin_Channel.asp?Action=Add'>添加新频道</a>&nbsp;|&nbsp;<a href='Admin_Channel.asp?Action=Order'>频道排序</a>"
Response.Write "    </td>" & vbCrLf
Response.Write "  </tr>" & vbCrLf
Response.Write "</table>" & vbCrLf

Action = Trim(Request("Action"))
Select Case Action
Case "Add"
    Call AddChannel
Case "SaveAdd"
    Call SaveAdd
Case "Modify"
    Call Modify
Case "SaveModify"
    Call SaveModify
Case "Disabled"
    Call DisabledChannel(0)
Case "UnDisabled"
    Call DisabledChannel(1)
Case "Del"
    Call DelChannel
Case "Order"
    Call order
Case "UpOrder"
    Call UpOrder
Case "DownOrder"
    Call DownOrder
Case "UpdateData"
    Call UpdateData
Case "UpdateChannelFiles"
    Call UpdateChannelFiles
Case Else
    Call main
End Select
If FoundErr = True Then
    Call WriteEntry(2, AdminName, "频道管理操作失败,失败原因:" & ErrMsg)
    Call WriteErrMsg(ErrMsg, ComeUrl)
End If
Response.Write "</body></html>"
Call CloseConn

Sub main()
    Dim rsChannelList, sqlChannelList
    sqlChannelList = "select * from PE_Channel Where 1=1"
    If Not (FoundInArr(AllModules, "Supply", ",")) Then
        sqlChannelList = sqlChannelList & " And ModuleType<>6"
    End If
    If Not (FoundInArr(AllModules, "Job", ",")) Then
        sqlChannelList = sqlChannelList & " And  ModuleType<>8"
    End If
    If Not (FoundInArr(AllModules, "House", ",")) Then
        sqlChannelList = sqlChannelList & " And  ModuleType<>7"
    End If
    sqlChannelList = sqlChannelList & " order by OrderID "
    Set rsChannelList = Conn.Execute(sqlChannelList)
    
    Response.Write "<br>"
    Response.Write "<table width='100%' border='0' align='center' cellpadding='2' cellspacing='1' class='border'>"
    Response.Write "  <tr class='title' height='22'>"
    Response.Write "    <td width='30' align='center'><strong>ID</strong></td>"
    Response.Write "    <td align='center'><strong>频道名称</strong></td>"
    Response.Write "    <td width='54' align='center'><strong>打开方式</strong></td>"
    Response.Write "    <td width='60' align='center'><strong>频道类型</strong></td>"
    Response.Write "    <td width='120' align='center'><strong>频道目录/链接地址</strong></td>"
    Response.Write "    <td width='60' align='center'><strong>项目名称</strong></td>"
    Response.Write "    <td width='54' align='center'><strong>功能模块</strong></td>"
    Response.Write "    <td width='60' align='center'><strong>生成HTML方式</strong></td>"
    Response.Write "    <td width='54' align='center'><strong>频道状态</strong></td>"
    Response.Write "    <td width='110' align='center'><strong>操作</strong></td>"
    Response.Write "    <td width='65' align='center'><strong>频道更新</strong></td>"
    Response.Write "  </tr>" & vbCrLf
    Do While Not rsChannelList.EOF
        Response.Write "  <tr class='tdbg' onmouseout=""this.className='tdbg'"" onmouseover=""this.className='tdbgmouseover'"">"
        Response.Write "    <td align='center'>" & rsChannelList("ChannelID") & "</td>"
        Response.Write "    <td align='center'><a href='Admin_Channel.asp?Action=Modify&iChannelID=" & rsChannelList("ChannelID") & "' title='" & rsChannelList("ReadMe") & "'>" & rsChannelList("ChannelName") & "</a></td>"
        Response.Write "<td width='54' align='center'>"
        If rsChannelList("OpenType") = 0 Then
            Response.Write "<font color=green>原窗口</font>"
        Else
            Response.Write "新窗口"
        End If
        Response.Write "</td>"
        Response.Write "<td width='60' align='center'>"
        Select Case rsChannelList("ChannelType")
        Case 0
            Response.Write "<font color=blue>系统频道</font>"
        Case 1
            Response.Write "<font color=green>内部频道</font>"
        Case 2
            Response.Write "<font color=red>外部频道</font>"
        End Select
        Response.Write "</td>"
        Response.Write "<td width='120' style='word-wrap:break-word'>"
        If rsChannelList("ChannelType") <= 1 Then
            Response.Write "目录:" & rsChannelList("ChannelDir")
        Else
            Response.Write "<font color=red>链接:" & rsChannelList("LinkUrl") & "</font>"
        End If
        Response.Write "</td>"
        Response.Write "    <td width='60' align='center'>"
        If rsChannelList("ChannelType") <= 1 Then
            Response.Write rsChannelList("ChannelShortName")
        Else
            Response.Write "&nbsp;"
        End If
        Response.Write "</td>"
        Response.Write "<td width='54' align='center'>"
        If rsChannelList("ChannelType") <= 1 Then
            Response.Write GetModuleTypeName(rsChannelList("ModuleType"))
        Else
            Response.Write "&nbsp;"
        End If
        Response.Write "</td>"
        Response.Write "<td width='60' align='center'>"
        Select Case rsChannelList("UseCreateHTML")
        Case 0
            Response.Write "不生成"
        Case 1
            Response.Write "全部生成"
        Case 2
            Response.Write "部分生成1"
        Case 3
            Response.Write "部分生成2"
        End Select
        Response.Write "</td>"
        Response.Write "<td width='54' align='center'>"
        If rsChannelList("Disabled") = True Then
            Response.Write "<font color=red>已禁用</font>"
        Else
            Response.Write "正常"
        End If
        Response.Write "</td>"
        Response.Write "<td width='110' align='center'>"
        Response.Write "<a href='Admin_Channel.asp?Action=Modify&iChannelID=" & rsChannelList("ChannelID") & "'>修改</a>&nbsp;&nbsp;"
        If rsChannelList("Disabled") = True Then
            Response.Write "<a href='Admin_Channel.asp?Action=UnDisabled&iChannelID=" & rsChannelList("ChannelID") & "'>启用</a>&nbsp;&nbsp;"
        Else
            Response.Write "<a href='Admin_Channel.asp?Action=Disabled&iChannelID=" & rsChannelList("ChannelID") & "'>禁用</a>&nbsp;&nbsp;"
        End If
        If rsChannelList("ChannelType") > 0 Then
            Response.Write "<a href='Admin_Channel.asp?Action=Del&iChannelID=" & rsChannelList("ChannelID") & "' onClick=""return confirm('确定要删除此频道吗?');"">删除</a>"
        Else
            Response.Write "&nbsp;&nbsp;&nbsp;&nbsp;"
        End If
        Response.Write "</td>"
        Response.Write "<td width='65' align='center'>"
        If rsChannelList("ChannelType") < 2 And rsChannelList("ModuleType") <> 4 And rsChannelList("ModuleType") <> 8 Then
            Response.Write "<a href='Admin_Channel.asp?Action=UpdateData&iChannelID=" & rsChannelList("ChannelID") & "'>数据</a>&nbsp;"
        Else
            Response.Write "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"

⌨️ 快捷键说明

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