网址和邮件地址的转换函数
<%
FunctionUrlConvert (STR)
convertstr = str
urllocation = instr (convertstr, "http: //")
if (urlloclocation = 0) und (maillocation = 0) dann
UrlConvert = convertstr
Ausgangsfunktion
Endif
IfurLloclocation <> 0Then
rightstr = str
DowhileurLloclocation <> UrLloclocationDe
urlloclocation = instr (rightstr, "http: //")
UrLlocationend = Instrrev (rechter "http: //")
Finalstr = Finalstr & links (rechte Strick-, Urllokation-1)
Midurlstr = MID (rechte, Urtlokation+1,1)
Dowhile (ASC (Midurlstr)> = 45) und (ASC (Midurlstr) <= 126)
Loopint = Loopint+1
MidUrlstr = MID (rechte, Urllokation+Loopint, 1)
IFMIDURLSTR = "" Thenexitdo
Schleife
Endurlstr = MID (rechte, Urtlokation, Loopint)
Urlstr = "<ahref =" & endurlstr & ">" & endurlstr & "</a>"
rightstr = mid (rightstr, urlyllocation+Loopint)
Finalstr = Finalstr & urlstr
Loopint = 1
Schleife
Endif
Finalstr = Finalstr & Rightstr
ConvertStr1 = Finalstr
Finalstr = ""
Maillocation = instr (convertStr1, "@")
ifmaillocation <> 0Then
Dowhilemillocation <> maillocationSend
Maillocation = instr (convertStr1, "@")
MAILLOCATIONEND = Instrrev (convertStr1, "@")
MainMidmailStr = Mid (ConvertStr1, Maillokation+1,1)
Midmailstr = MainMidmailstr
Dowhile (ASC (Midmailstr)> = 45) und (ASC (Midmailstr) <= 126)
Loopint1 = Loopint1+1
Midmailstr = Mid (ConvertStr1, Maillocation-Loopint1,1)
Schleife
Firststr = Mid (ConvertStr1, Maillocation-Loopint1+1, Loopint1-1)
Finalstr = Finalstr & links (ConvertStr1, Maillocation-Loopint1)
MidmailStr1 = MainMidmailstr
Dowhile (ASC (Midmailstr1)> = 45) und (ASC (Midmailstr1) <= 126)
Loopint2 = Loopint2+1
MidmailStr1 = Mid (ConvertStr1, Maillokation+Loopint2,1)
ifMidmailStr1 = "" SheatExitdo
Schleife
Secondstr = Mid (ConvertStr1, Maillokation, Loopint2)
EndmailStr = Firststr & Secondstr
mailstr = "<aHref = mailto:" & endmailstr & ">" & endmailstr & "</a>"
Finalstr = Finalstr & Mailstr
ConvertStr1 = Mid (ConvertStr1, Maillokation+Loopint2)
Loopint1 = 1
Loopint2 = 1
Schleife
Endif
Finalstr = Finalstr & convertStr1
UrlConvert = Finalstr
Endfunktion
%>