%
Sub Content
Response.Write( ContentText )
End Sub
Function GetCategoryText( Cid )
Dim ObjParent, ObjArticle
Dim ErrNum
Dim IdArray, Index, IndexMax
Dim ThisText, ImgText
Dim DisplayOrderPrevCid, DisplayOrderNextCid
Dim TotalCountInParent
Dim DisplayPrevUrl
GetCategoryText = ""
ThisText = ""
ImgText = ""
Set ObjArticle = Server.CreateObject( "MathboxTools.Article" )
Set ObjParent = Server.CreateObject( "MathboxTools.Article" )
ErrNum = ObjArticle.Category.SelectById( Cid )
If ErrNum = 0 Then
If ObjArticle.Category.Record.IsEnabled Then
If ObjArticle.Category.Record.ParentId Then
ErrNum = ObjParent.Category.SelectById( ObjArticle.Category.Record.ParentId )
If ErrNum = 0 Then
If ObjParent.Category.Record.IsEnabled Then
ObjArticle.SortCode = 6
IdArray = ObjArticle.GetIdArray( Cid, 1 )
If IsNull( IdArray ) = False Then
IndexMax = UBound( IdArray, 2 )
For Index = 0 To IndexMax
ErrNum = ObjArticle.SelectById( IdArray( 0, Index ) )
If ErrNum = 0 Then
ImgText = ImgText & "
" & ObjArticle.Record.Title & "
"
ObjArticle.ImageList.Design = ""
ObjArticle.ImageList.DesignColumnCount = 2
ObjArticle.ImageList.DesignEmptyResult = ""
ObjArticle.ImageList.DesignItem = " | "
ObjArticle.ImageList.DesignItemTag = ""
ObjArticle.ImageList.DesignList = "
" & vbCrLf
ObjArticle.ImageList.DesignListTag = ""
ObjArticle.ImageList.SortCode = 2
ImgText = ImgText & ObjArticle.ImageList.ProcessDesignByParent( IdArray( 0, Index ) )
ObjArticle.ImageList.Design = ""
ObjArticle.ImageList.DesignColumnCount = 2
ObjArticle.ImageList.DesignEmptyResult = ""
ObjArticle.ImageList.DesignItem = "/"" alt="""" title=""""> | "
ObjArticle.ImageList.DesignItemTag = ""
ObjArticle.ImageList.DesignList = "
" & vbCrLf
ObjArticle.ImageList.DesignListTag = ""
ObjArticle.ImageList.SortCode = 2
ImgText = ImgText & ObjArticle.ImageList.ProcessDesignByParent( IdArray( 0, Index ) )
End If
Next
End If
DisplayOrderPrevCid = 0
DisplayOrderNextCid = 0
DisplayPrevUrl = ""
If ObjArticle.Category.Record.DisplayOrder > 1 Then
ErrNum = ObjParent.Category.SelectById( ObjArticle.Category.Record.Id )
Do While DisplayOrderPrevCid = 0
If ObjParent.Category.Record.DisplayOrder > 1 Then
ErrNum = ObjParent.Category.SelectByDisplayOrder( ObjParent.Category.Record.ParentId, ObjParent.Category.Record.DisplayOrder - 1 )
If ErrNum Then Exit Do
If ObjParent.Category.Record.IsEnabled Then
DisplayOrderPrevCid = ObjParent.Category.Record.Id
Exit Do
End If
Else
Exit Do
End If
Loop
Else
ErrNum = ObjParent.Category.LinkList.SelectFirstAvailable( ObjParent.Category.Record.Id, 200 )
If ErrNum = 0 Then
DisplayPrevUrl = ObjParent.Category.LinkList.Record.Url
End If
End If
TotalCountInParent = ObjParent.Category.TotalCountInCategory( ObjArticle.Category.Record.SubId, ObjArticle.Category.Record.ParentId, 1 )
ErrNum = ObjParent.Category.SelectById( ObjArticle.Category.Record.Id )
Do While DisplayOrderNextCid = 0
If TotalCountInParent > ObjParent.Category.Record.DisplayOrder Then
ErrNum = ObjParent.Category.SelectByDisplayOrder( ObjParent.Category.Record.ParentId, ObjParent.Category.Record.DisplayOrder + 1 )
If ErrNum Then Exit Do
If ObjParent.Category.Record.IsEnabled Then
DisplayOrderNextCid = ObjParent.Category.Record.Id
Exit Do
End If
Else
Exit Do
End If
Loop
ThisText = ThisText & ObjArticle.Category.ReplaceTags( "" )
ThisText = ThisText & ImgText
ThisText = ThisText & "" & ObjArticle.Category.ReplaceTags( "" ) & "
"
ThisText = ThisText & ""
ThisText = ThisText & ""
ThisText = ThisText & ""
If DisplayOrderPrevCid Then
ThisText = ThisText & ""
ElseIf DisplayPrevUrl <> "" Then
ThisText = ThisText & ""
End If
ThisText = ThisText & " | "
ThisText = ThisText & ""
If DisplayOrderNextCid Then
ThisText = ThisText & ""
End If
ThisText = ThisText & " | "
ThisText = ThisText & "
"
ThisText = ThisText & "
"
GetCategoryText = ThisText
End If
End If
End If
End If
End If
Set ObjParent = Nothing
Set ObjArticle = Nothing
End Function
Dim CategoryId
Dim ContentText
CategoryId = 0
ContentText = ""
If Request.QueryString( "Cid" ) <> "" Then
If IsNumeric( Request.QueryString( "Cid" ) ) = True Then
CategoryId = CLng( Request.QueryString( "Cid" ) )
End If
End If
If CategoryId = 0 Then
ContentText = "Invalid Parameter!"
Else
ContentText = GetCategoryText( CategoryId )
End If
Template ArticleTitle, ArticleKeywords, ArticleMetaTags
%>