网址和邮件地址的转换函数
<%
FunctionUrlConvert (STR)
convertsstr = str
Urllocation = instr (convertstr, "http: //")
if (UrLlocation = 0) et (Maillocation = 0) alors
Urlconvert = convertstr
sortie
endire
ifurllocation <> 0Then
Rightstr = str
DowHileUrLlocation <> UrllocationEnd
Urllocation = instr (Rightstr, "http: //")
UrLlocationEnd = Instrev (Rightstr, "http: //")
finalstr = finalstr & gauche (droitestr, urllocation-1)
midurlstr = mid (droitestr, Urllocation + 1,1)
Dowhile (ASC (MidUrlstr)> = 45) et (ASC (MidUrlstr) <= 126)
loopint = loopint + 1
midUrlstr = mid (droitestr, urllocation + loopint, 1)
ifmidurlstr = "" therexitdo
boucle
ENDURLSTR = MID (Rightstr, Urllocation, Loopint)
Urlstr = "<ahref =" & endurlstr & ">" & endurlstr & "</a>"
Rightstr = mid (droitestr, Urllocation + Loopint)
finalstr = finalstr & urlstr
loopint = 1
Boucle
endire
finalstr = finalstr & droite
convertsstr1 = finalstr
finalstr = ""
Maillocation = instr (convertstr1, "@")
ifmaillocation <> 0Then
DowHilemaIllocation <> MaillocationEnd
Maillocation = instr (convertstr1, "@")
MaillocationEnd = Instrev (convertstr1, "@")
mainmidmailstr = mid (convertsstr1, Maillocation + 1,1)
midmailstr = mainmidmailstr
Dowhile (ASC (Midmailstr)> = 45) et (ASC (Midmailstr) <= 126)
loopint1 = loopint1 + 1
midmailstr = mid (convertsstr1, Maillocation-Loopint1,1)
boucle
Firststr = mid (convertstr1, Maillocation-Loopint1 + 1, Loopint1-1)
finalstr = finalstr & Left (convertstr1, Maillocation-Loopint1)
midmailstr1 = mainmidmailstr
Dowhile (ASC (Midmailstr1)> = 45) et (ASC (Midmailstr1) <= 126)
loopint2 = loopint2 + 1
midmailstr1 = mid (convertsstr1, Maillocation + loopint2,1)
ifmidmailstr1 = "" therexitdo
boucle
secondstr = mid (convertstr1, Maillocation, loopint2)
EndMailstr = Firststr & Secondstr
mailstr = "<Ahref = MailTo:" & EndMailstr & ">" & endmailstr & "</a>"
finalstr = finalstr & mailstr
convertstr1 = mid (convertsstr1, Maillocation + Loopint2)
loopint1 = 1
loopint2 = 1
Boucle
endire
finalstr = finalstr & convertstr1
UrlConvert = finalstr
finition de fin
%>