<%
'=======================================================
' 欢迎使用《阿赛大型门户网站系统V3.0》，简称“AsaiMHV3”
' 技术支持、商业版咨询、官方唯一指定联系QQ“4941172”
' 官方网站：http://77ya.com      程序负责人：阿赛
'=======================================================

Sub Menu_Type()
	Dim aMenus, Aii
	Dim ChannelMenus, Mii
	Dim sChannelIDs
	Dim aChannelIDs,aMenuName
	aMenus = Cls.Cache_Get("amh_menu")
'----------------------------系统管理菜单开始----------------------
  Response.Write "Tree.add(10002,0,'系统管理',null,'','','Images/Tree/panel.gif','Images/Tree/panel.gif');"&vbcrlf
	For Aii = 0 To Ubound(aMenus,2)
		If aMenus(1,Aii) = 0 And Not aMenus(6,Aii) Then
      Response.Write "Tree.add("&aMenus(0,Aii)&"+1000,10002,'"&aMenus(2,Aii)&"','"&aMenus(5,Aii)&"','','AMF');"&vbcrlf
    End If
	Next
'----------------------------系统管理菜单结束----------------------
'----------------------------内容管理菜单开始----------------------
	ChannelMenus = Cls.Cache_Get("web_menu")
	For Mii=0 To Ubound(ChannelMenus,2)
		If Int(ChannelMenus(8,Mii)) < 2 Then
	    Response.Write "Tree.add("&ChannelMenus(0,Mii)&",0,'"&ChannelMenus(13,Mii)&"管理',null,'','AMF');"&vbcrlf
	    Aii = 0
			For Aii = 0 To Ubound(aMenus,2)
				If (Int(aMenus(1,Aii)) = Int(ChannelMenus(0,Mii)) And Not aMenus(6,Aii)) Or (Int(ChannelMenus(8,Mii)) = 1 And Int(aMenus(1,Aii)) = Int(ChannelMenus(11,Mii)) And Not aMenus(6,Aii)) Then
					sChannelIDs = aMenus(5,Aii)
					aMenuName = aMenus(2,Aii)
					If Int(aMenus(1,Aii)) > 0 Then
					  aChannelIDs = Int(aMenus(1,Aii))
					  If Int(aMenus(1,Aii)) = Int(ChannelMenus(11,Mii)) Then
					    aChannelIDs = Int(ChannelMenus(0,Mii))
					    aMenuName = Replace(aMenuName,Cls.Get_ChannelRes(aMenus(1,Aii),13),ChannelMenus(13,Mii))
					  End If
						If Instr(sChannelIDs,"?") <> 0 Then
							sChannelIDs = sChannelIDs & "&ChannelIDs=" & aChannelIDs
						Else
							sChannelIDs = sChannelIDs & "?ChannelIDs=" & aChannelIDs
						End If
					End If
	        Response.Write "Tree.add("&aMenus(0,Aii)&"+100,"&ChannelMenus(0,Mii)&",'"&aMenuName&"','"&sChannelIDs&"','','AMF');"&vbcrlf
				End If
			Next
			If Cls.Get_ChannelSetup(ChannelMenus(18,Mii),1) = 1 Then
	      Response.Write "Tree.add("&ChannelMenus(0,Mii)&"+1001,"&ChannelMenus(0,Mii)&",'"&ChannelMenus(13,Mii)&"分类','AMH_Class.asp?ChannelIDs="&ChannelMenus(0,Mii)&"','','AMF');"&vbcrlf
			End If
			If Cls.Get_ChannelSetup(ChannelMenus(18,Mii),2) = 1 Then
	      Response.Write "Tree.add("&ChannelMenus(0,Mii)&"+1002,"&ChannelMenus(0,Mii)&",'评论管理','AMH_Review.asp?ChannelIDs="&ChannelMenus(0,Mii)&"','','AMF');"&vbcrlf
			End If
			If Cls.Get_ChannelSetup(ChannelMenus(18,Mii),5) = 1 Then
	      Response.Write "Tree.add("&ChannelMenus(0,Mii)&"+1003,"&ChannelMenus(0,Mii)&",'报错管理','AMH_Err.asp?ChannelIDs="&ChannelMenus(0,Mii)&"','','AMF');"&vbcrlf
			End If
			If Cls.Get_ChannelSetup(ChannelMenus(18,Mii),13) = 1 Then
	      Response.Write "Tree.add("&ChannelMenus(0,Mii)&"+1004,"&ChannelMenus(0,Mii)&",'公告管理','AMH_Cast.asp?ChannelIDs="&ChannelMenus(0,Mii)&"','','AMF');"&vbcrlf
			End If
			If ChannelMenus(11,Mii) = 1 or ChannelMenus(11,Mii) = 2 Or ChannelMenus(11,Mii) = 3 Or ChannelMenus(11,Mii) = 5 Or ChannelMenus(11,Mii) = 6 Or ChannelMenus(11,Mii) = 8 Or ChannelMenus(11,Mii) = 11 Then
	    Response.Write "Tree.add("&ChannelMenus(0,Mii)&"+1011,"&ChannelMenus(0,Mii)&",'预置管理','AMH_Preset.asp?ChannelIDs="&ChannelMenus(0,Mii)&"&skintype=1','','AMF');"&vbcrlf			
	        End If
		Response.Write "Tree.add("&ChannelMenus(0,Mii)&"+1005,"&ChannelMenus(0,Mii)&",'模板管理','AMH_Template.asp?ChannelIDs="&ChannelMenus(0,Mii)&"&skintype=1','','AMF');"&vbcrlf
	    Response.Write "Tree.add("&ChannelMenus(0,Mii)&"+1010,"&ChannelMenus(0,Mii)&",'频道设置','AMH_Channel.asp?Action=Edit&ChannelIDs="&ChannelMenus(0,Mii)&"','','AMF');"&vbcrlf		
			If Cls.Get_ChannelSetup(ChannelMenus(18,Mii),3) = 1 Then
	      Response.Write "Tree.add("&ChannelMenus(0,Mii)&"+1006,"&ChannelMenus(0,Mii)&",'专题管理','AMH_Special.asp?ChannelIDs="&ChannelMenus(0,Mii)&"','','AMF');"&vbcrlf
			End If
			If Cls.Get_ChannelSetup(ChannelMenus(18,Mii),4) = 1 Then
	      Response.Write "Tree.add("&ChannelMenus(0,Mii)&"+1007,"&ChannelMenus(0,Mii)&",'关键字管理','AMH_Keyword.asp?ChannelIDs="&ChannelMenus(0,Mii)&"','','AMF');"&vbcrlf
			End If
			'If  ChannelMenus(11,Mii)=1 Then
			If  ChannelMenus(11,Mii)=1 OR ChannelMenus(11,Mii)=8 Then
	      Response.Write "Tree.add("&ChannelMenus(0,Mii)&"+1008,"&ChannelMenus(0,Mii)&",'采集管理','AMH_"&GetChannelFile(ChannelMenus(11,Mii))&"Gather.asp?ChannelIDs="&ChannelMenus(0,Mii)&"','','AMF');"&vbcrlf
		    End If
		   If ChannelMenus(34,Mii)<>0 Then
	      Response.Write "Tree.add("&ChannelMenus(0,Mii)&"+1009,"&ChannelMenus(0,Mii)&",'Html生成管理','AMH_Create"&GetChannelFile(ChannelMenus(11,Mii))&".asp?ChannelIDs="&ChannelMenus(0,Mii)&"','','AMF');"&vbcrlf
			End If
		End If
	Next
'----------------------------内容管理菜单结束----------------------
	Erase aMenus
	Erase ChannelMenus
End Sub
Function GetChannelFile(ctype)
        Select Case ctype
		case 1
		GetChannelFile="Article"
		case 2
		GetChannelFile="Soft"
		case 3
		GetChannelFile="Shop"		
		case 5
		GetChannelFile="Photo"
		case 6
		GetChannelFile="Movie"
		case 8
		GetChannelFile="News"
		case 11
		GetChannelFile="Music"
		case 12
		GetChannelFile="Pages"				
		End Select
End Function 
%>
