鏍囩鏄竴绉嶆洿涓鸿嚜鐢便佺伒娲伙紝瀹屽叏鐢辩敤鎴峰喅瀹氱殑鍒嗙被鏂瑰紡锛岃岄潪浼犵粺鐨勭敱缃戠珯瀹氫箟鐨勫垎绫汇傛偍鍙互鏍规嵁鑷繁鐨勭悊瑙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浜戝叾瀹冪浉鍏虫枃绔狅紒