<!--#include file="../conn.asp"-->
<!--#include file="../inc/const.asp"-->
<!--#include file="../inc/classmenu.asp"-->
<%
Dim HtmlContent
Newasp.LoadTemplates 9999, 7, 0

HtmlContent = Newasp.HtmlContent
HtmlContent = Replace(HtmlContent,"{$InstallDir}", Newasp.InstallDir)
HtmlContent = Replace(HtmlContent, "{$ChannelID}", 0)
HtmlContent = Replace(HtmlContent,"{$PageTitle}",Newasp.HtmlSetting(5))
HtmlContent = ReadClassMenu(HtmlContent)
HtmlContent = ReadClassMenubar(HtmlContent)
HtmlContent = Replace(HtmlContent,"{$TempContent}", SiteClassMap)
HtmlContent = Replace(HtmlContent,"{$SiteName}", Newasp.SiteName)
HtmlContent = Replace(HtmlContent,"{$SiteUrl}", Newasp.SiteUrl)
Response.Write HtmlContent
CloseConn

Public Function SiteClassMap()
	Dim strTemp,ClassName
	Dim SQL,Rs,i
	Dim LinkTarget,strClass,ThisChannelDir,Rssfeed
	LinkTarget = " target=""_blank"""
	strClass = " class=menubar"
	Newasp.Name = "SiteClassMap"
	If Newasp.ObjIsEmpty() Then
		SQL = "SELECT C.ChannelID,C.ClassID,C.depth,C.ClassName,C.Readme,C.Child,C.LinkTarget,C.TurnLink,C.TurnLinkUrl,C.HtmlFileDir,C.UseHtml,C.ShowCount,B.ChannelName,B.ChannelDir,B.StopChannel,B.ModuleName,B.IsCreateHtml,B.HtmlExtName,B.HtmlPath FROM [NC_Classify] C INNER JOIN [NC_Channel] B On C.ChannelID=B.ChannelID WHERE B.StopChannel=0 ORDER BY C.ChannelID, C.rootid,C.orders"
		Set Rs = Newasp.Execute(SQL)
		i = 0
		strTemp = Newasp.HtmlSetting(6)
		Do While Not Rs.EOF
			ClassName = Rs("ClassName")
			If Rs("TurnLink") <> 0 Then
				ClassName = "<a href='" & Rs("TurnLinkUrl") & "'" & LinkTarget & strClass & ">" & ClassName & "</a>"
				Rssfeed = "#"
			Else
				ThisChannelDir = Newasp.GetChannelDir(Rs("ChannelID"))
				If Rs("IsCreateHtml") <> 0 Then
					ClassName = "<a href='" & ThisChannelDir & Rs("HtmlFileDir") & "'" & LinkTarget & strClass & " title='" & Rs("Readme") & "&#13;&#10;" & Rs("ModuleName") & "Êý£º" & Rs("ShowCount") & "'>" & ClassName & "</a>"
				Else
					ClassName = "<a href='" & ThisChannelDir & "list.asp?classid=" & Rs("ClassID") & "'" & LinkTarget & strClass & "  title='" & Rs("Readme") & "&#13;&#10;" & Rs("ModuleName") & "Êý£º" & Rs("ShowCount") & "'>" & ClassName & "</a>"
				End If
				Rssfeed = ThisChannelDir & "rssfeed.asp?classid=" & Rs("ClassID")
			End If
			If Rs("depth") = 0 Then
				If i > 0 Then  strTemp = strTemp & Newasp.HtmlSetting(7)
				strTemp = strTemp & Newasp.HtmlSetting(8)
				strTemp = Replace(strTemp, "{$ClassName}", ClassName)
			Else
				strTemp = strTemp & Newasp.HtmlSetting(9)
				strTemp = Replace(strTemp, "{$ClassName}", ClassName)
			End If
				strTemp = Replace(strTemp, "{$ClassID}", Rs("ClassID"))
				strTemp = Replace(strTemp, "{$Rssfeed}", Rssfeed)
			Rs.movenext
			i = i + 1
		Loop
		strTemp = strTemp & Newasp.HtmlSetting(10)
		Rs.Close
		Set Rs = Nothing
		Newasp.Value = strTemp
	End If
	SiteClassMap = Newasp.Value
End Function
%>