'======================================
'函 数 名:TC711com_Code
'作 用:给文章内容加入版权 (函数中的<BR></P>为替换的指定代码、<SAMP <SMALL为加入的,你也可以改为其他的。)
'参 数:无
'Date:2012-7-1
'保留出处:WWW.TC711.COM
'======================================
Function TC711com_Code(str,Str1,Result)
Dim i, j, k, Site, SiteName, SiteUrl
If Isnull(str) Then
TC711com_Code = ""
Exit Function
End If
Randomize
k = Instr(str,"</P>")
Do While k>0
Result = ""
For i = 0 To 19
j = Int(128 * Rnd) + 1
If j = 60 or j = 62 then
j = j + 1
End If
Result = Result & Chr(j)
Next
Result="<SAMP style='DISPLAY: none;'>[711网络: www.tc711.com,转载请注明出处]</SAMP>"
str=Replace(str,"</P>", Result &"<'/P>", 1, 1)
k=Instr(str,"</P>")
Loop
str = Replace(str,"<'/P>","</P>")
k = Instr(str,"<BR>")
Do While k > 0
Result = ""
For i = 0 to 19
j = Int(128 * Rnd) + 1
If j = 60 or j = 62 Then
j = j + 1
End If
Result = Result & Chr (j)
Next
Result = "<SMALL style='DISPLAY: none;'>[711网络: www.tc711.com,转载请注明出处]</SMALL>"
str = Replace(str,"<BR>", Result & "<'BR>", 1, 1)
k = Instr(str,"<BR>")
Loop
str = Replace(str,"<'BR>","<BR>")
TC711com_Code = str
End Function