鏍囩锛圱ag锛夋槸浠涔堬紵
鏍囩鏄竴绉嶆洿涓鸿嚜鐢便佺伒娲伙紝瀹屽叏鐢辩敤鎴峰喅瀹氱殑鍒嗙被鏂瑰紡锛岃岄潪浼犵粺鐨勭敱缃戠珯瀹氫箟鐨勫垎绫汇傛偍鍙互鏍规嵁鑷繁鐨勭悊瑙o紝瀵瑰彂琛ㄧ殑鏂囩珷銆佷笂浼犵殑鍥剧墖銆侀煶涔愩 瑙嗛绛夊悇绉嶆枃浠舵坊鍔犱竴涓垨澶氫釜鏍囩锛岃繘琛岀伒娲荤殑鎻忚堪銆 
娣诲姞鏍囩锛圱ag锛夋湁浠涔堜綔鐢紵
鏍囩浣撶幇浜嗙兢浣撶殑鍔涢噺锛屼娇寰楃敤鎴蜂箣闂村彲浠ラ氳繃鐩歌繎鐨勫唴瀹逛骇鐢熸洿澶氱殑鍏宠仈鍜屼簰鍔ㄣ傛偍鍦ㄥ彂琛ㄦ棩蹇楁垨涓婁紶鏂囦欢鏃舵坊鍔犱簡Tag 锛屽氨鍙互鐪嬪埌odweb.cn鎵鏈夊拰鎮ㄤ娇鐢ㄤ簡鐩稿悓Tag 鐨勬棩蹇楀拰鏂囦欢銆 
鏍囩棰戦亾涓笉鍚屽ぇ灏忋佺矖缁嗙殑鏂囧瓧浠h〃浠涔堬紵
浣跨敤涓嶅悓澶у皬銆佺矖缁嗗瓧浣撶殑鏍囩锛屼唬琛ㄧ潃鏍囩涓嶅悓鐨勪娇鐢ㄩ鐜囥傚瓧浣撹秺澶с佽秺绮楋紝璇存槑杩欎簺鏍囩鐨勪娇鐢ㄩ鐜囪秺楂樸 
  娣诲姞鏍囩鏃堕渶瑕佹敞鎰忎簺浠涔堬紵
鈶 澶氫釜鏍囩涔嬮棿璇风敤绌烘牸鍒嗛殧銆 
鈶 姣忎釜鏍囩鐨勬渶澶ч暱搴︿负 10 涓眽瀛椼 
鈶 姣忕瘒鏃ュ織鎴栨瘡涓枃浠舵渶澶氬彧鑳芥坊鍔10涓爣绛撅紝杩欏寘鎷偍鑷繁浠ュ強鍏朵粬鐢ㄦ埛娣诲姞鐨勬爣绛俱 
鎴戝彲浠ュ湪鍒汉鍙戣〃鐨勬棩蹇楀拰鏂囦欢涓坊鍔犳爣绛惧悧锛
鎮 鍙互鏍规嵁娴忚瀵硅薄鐨勯槄璇绘潈闄愭潵鍒ゆ柇鏄惁鍙互娣诲姞鏍囩銆傚叕寮鐨勬棩蹇楁垨鏂囦欢锛屾墍鏈夌敤鎴烽兘鍙互娣诲姞鏍囩锛涗粎渚涘ソ鍙嬫祻瑙堢殑鏃ュ織锛屽彧鏈夊ソ鍙嬪拰浣滆呰兘娣诲姞鏍囩锛涗粎浣滆 鍙互娴忚鐨勬棩蹇楁垨鏂囦欢锛屽彧鏈変綔鑰呰兘澶熸坊鍔犳爣绛俱傚綋鐒讹紝鏃犺鏄皝娣诲姞鐨勬爣绛撅紝閮藉彧鏈夎鏃ュ織鎴栨枃浠剁殑浣滆呭彲浠ヤ慨鏀规垨鍒犻櫎杩欎簺鏍囩銆 
鎵浠ュ憿鎴戞壘浜嗕簺瀹炵幇tag鍔熻兘鐨刟sp浠g爜,浠呬緵鍙傝
[澶嶅埗姝や唬鐮乚CODE:
<%
'*********************************************************
' 鐩殑锛    瀹氫箟TTag绫
' 杈撳叆锛    鏃
' 杩斿洖锛    鏃
'*********************************************************
Class TTag
    Public ID
    Public Name
    Public Intro
    Public Order
    Public Count

    Public Property Get EncodeName
        EncodeName = Server.URLEncode(Name)
    End Property
    Public Property Get Url
        Url = ZC_BLOG_HOST & "catalog.asp?"& "tags=" & Server.URLEncode(Name)
    End Property
    Public Property Get HtmlUrl
        HtmlUrl=TransferHTML(Url,"[html-format]")
    End Property
    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")
            Order=objRS("tag_Order")
            Count=objRS("tag_Count")
            LoadInfoByID=True
        End If
        objRS.Close
        Set objRS=Nothing
        If IsNull(Intro) Then Intro=""
    End Function
    Public Function LoadInfoByArray(aryTagInfo)
        If IsArray(aryTagInfo)=True Then
            ID=aryTagInfo(0)
            Name=aryTagInfo(1)
            Intro=aryTagInfo(2)
            Order=aryTagInfo(3)
            Count=aryTagInfo(4)
        End If
        If IsNull(Intro) Then Intro=""
        LoadInfoByArray=True
    End Function

    Public Function Del()
        Call CheckParameter(ID,"int",0)
        If (ID=0) Then Del=False:Exit Function
        Dim s
        Dim i
        Dim objRS
        Set objRS=Server.CreateObject("ADODB.Recordset")
        objRS.CursorType = adOpenKeyset
        objRS.LockType = adLockReadOnly
        objRS.ActiveConnection=objConn
        objRS.Source=""
        objRS.Open("SELECT [log_ID],[log_tag] FROM [blog_Article] WHERE [log_Tag] LIKE '%{" & ID & "}%'")
        If (Not objRS.bof) And (Not objRS.eof) Then
            Do While Not objRS.eof
                i=objRS("log_ID")
                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")
    If (Not objRS.bof) And (Not objRS.eof) Then
        aryAllData=objRS.GetRows(objRS.RecordCount)
        objRS.Close
        Set objRS=Nothing
        k=UBound(aryAllData,1)
        l=UBound(aryAllData,2)
        For i=0 To l
            Set Tags(aryAllData(0,i))=New TTag
            Tags(aryAllData(0,i)).LoadInfoByArray(Array(aryAllData(0,i),aryAllData(1,i),aryAllData(2,i),aryAllData(3,i),aryAllData(4,i)))
        Next
    End If
    GetTags=True

End Function

%>


浠ヤ笂灏辨槸ASP濡備綍瀹炵幇Tags鏍囩锛宼ags绠鍗曚粙缁嶄笌閮ㄥ垎浠g爜鐨勮缁嗗唴瀹癸紝鏇村淇℃伅璇峰叧娉∣D浜戝叾瀹冪浉鍏虫枃绔狅紒



鏈枃URL锛http://www.odweb.cn/news_show.html?id=176