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



    Public Property Get HtmlIntro
        HtmlIntro=TransferHTML(Intro,"[html-format]")
    End Property

    Public Property Get HtmlName
        HtmlName=TransferHTML(Name,"[html-format]")
    End Property

    Public Property Get RssUrl
        RssUrl = ZC_BLOG_HOST & "sydication.asp?tags=" & ID
    End Property

    Public Function Post()

        Call CheckParameter(ID,"int",0)
        Call CheckParameter(Order,"int",0)

        Name=FilterSQL(Name)
        Name=TransferHTML(Name,"[normalname]")
        If Len(Name)=0 Then Post=False:Exit Function

        Intro=FilterSQL(Intro)
        Intro=TransferHTML(Intro,"[html-format]")


        If ID=0 Then
            objConn.Execute("INSERT INTO [blog_Tag]([tag_Name],[tag_Order],[tag_Intro]) VALUES ('"&Name&"',"&Order&",'"&Intro&"')")
        Else
            objConn.Execute("UPDATE [blog_Tag] SET [tag_Name]='"&Name&"',[tag_Order]="&Order&",[tag_Intro]='"&Intro&"' WHERE [tag_ID] =" & ID)
        End If

        Post=True

    End Function


    Public Function LoadInfoByID(tag_ID)

        Call CheckParameter(tag_ID,"int",0)

        Dim objRS
        Set objRS=objConn.Execute("SELECT [tag_ID],[tag_Name],[tag_Intro],[tag_Order],[tag_Count] FROM [blog_Tag] WHERE [tag_ID]=" & tag_ID)

        If (Not objRS.bof) And (Not objRS.eof) Then

            ID=objRS("tag_ID")
            Name=objRS("tag_Name")
            Intro=objRS("tag_Intro")

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

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