<% '首页名称 dim ChannelTitle '初始化参数 sub InitGlobal() dim rsGlobal Set rsGlobal = Server.CreateObject("ADODB.Recordset") rsGlobal.open "select channelname from channel where ChannelID = "& ChannelID,conn,1,1 if not rsGlobal.eof then ChannelTitle = rsGlobal(0) end if rsGlobal.close set rsGlobal = nothing end sub 'class文件名 function ClassFileName(ClassID) dim rsGlobal Set rsGlobal = Server.CreateObject("ADODB.Recordset") rsGlobal.open "select L.LayoutFileName From ArticleClass C inner join Layout L on C.LayoutID=L.LayoutID where C.ClassID=" & ClassID,conn,1,1 if not rsGlobal.eof then ClassFileName = rsGlobal(0) end if rsGlobal.close set rsGlobal = nothing end function 'class路径 function ClassFilePath(ClassID) ClassFilePath = ClassFileName(ClassID) & "?ClassID="& ClassID end function 'Article文件名 function ArticleFileName(ArticleID) dim rsGlobal Set rsGlobal = Server.CreateObject("ADODB.Recordset") rsGlobal.open "select L.LayoutFileName From Article A inner join Layout L on A.LayoutID=L.LayoutID where A.ArticleID=" & ArticleID,conn,1,1 if not rsGlobal.eof then ArticleFileName = rsGlobal(0) end if rsGlobal.close set rsGlobal = nothing end function 'Article文件路径 function ArticleFilePath(ArticleID) ArticleFilePath = ArticleFileName(ArticleID) & "?ArticleID="& ArticleID end function 'Special文件名 function SpecialFileName(ArticleID) dim rsGlobal Set rsGlobal = Server.CreateObject("ADODB.Recordset") rsGlobal.open "SELECT L.LayoutFileName FROM (Article AS A INNER JOIN Special AS S ON A.SpecialID = S.SpecialID) INNER JOIN Layout AS L ON S.LayoutID = L.LayoutID WHERE A.ArticleID=" & ArticleID,conn,1,1 if not rsGlobal.eof then SpecialFileName = rsGlobal(0) end if rsGlobal.close set rsGlobal = nothing end function 'Special文件路径 function SpecialFilePath(ArticleID) SpecialFilePath = SpecialFileName(ArticleID) & "?ArticleID="& ArticleID end function '返回会父类名 function ParentClassName(ClassID) dim TClassID if ParentID > 0 then TClassID = ParentID else TClassID = ClassID end if ParentClassName = GetClassName(TClassID) end Function 'class名 function GetClassName(ClassID) dim rsGlobal Set rsGlobal = Server.CreateObject("ADODB.Recordset") rsGlobal.open "select ClassName From ArticleClass where ClassID=" & ClassID,conn,1,1 if not rsGlobal.eof then GetClassName = rsGlobal(0) end if rsGlobal.close set rsGlobal = nothing end function %>