asp下tag的实现,简单介绍与部分代码(4)


                s=objRS("log_tag")
                s=Replace(s,"{"& ID &"}","")
                objConn.Execute("UPDATE [blog_Article] SET [log_tag]='"& s &"' WHERE [log_ID] =" & i)
                objRS.MoveNext
            Loop
        End If
        objRS.Close

        objConn.Execute("DELETE FROM [blog_Tag] WHERE [tag_ID] =" & ID)
        Del=True
    End Function


    Public Function MakeTemplate(s)

        s=Replace(s,"<#article/tag/id#>",ID)
        s=Replace(s,"<#article/tag/name#>",HtmlName)
        s=Replace(s,"<#article/tag/intro#>",HtmlIntro)
        s=Replace(s,"<#article/tag/count#>",Count)
        s=Replace(s,"<#article/tag/url#>",HtmlUrl)
        s=Replace(s,"<#article/tag/encodename#>",EncodeName)

        MakeTemplate=s

    End Function


End Class
'*********************************************************


'*********************************************************
' 目的:    Tags读取
'*********************************************************
Function GetTags()

    Dim i,j,k,l

    Dim aryAllData
    Dim arySingleData()

    Erase Tags

    Dim objRS

    Set objRS=objConn.Execute("SELECT TOP 1 [tag_ID] FROM [blog_Tag] ORDER BY [tag_ID] DESC")
    If (Not objRS.bof) And (Not objRS.eof) Then
        i=objRS("tag_ID")
        ReDim Tags(i)
    End If

    Set objRS=objConn.Execute("SELECT [tag_ID],[tag_Name],[tag_Intro],[tag_Order],[tag_Count] FROM [blog_Tag] ORDER BY [tag_ID] ASC")

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/2916.html