网址和邮件地址的转换函数
<٪
PONUSTIONURLCONTRVER (STR)
confltstr = str
urllocation = instr (confltstr ، "http: //")
if (urllocation = 0) و (maillocation = 0) ثم
urlConvert = convertstr
exitfunction
Endif
ifurllocation <> 0then
حقوق = str
dowhileurllocation <> urllocationEnd
urllocation = instr (حقوق ، "http: //")
urllOctingEnd = Instrrev (حقوق ، "http: //")
Finalstr = FinalStr & Left (حقوق ، urllocation-1)
midurlstr = mid (حقوق ، urllocation+1،1)
dowhile (ASC (midurlstr)> = 45) و (ASC (midurlstr) <= 126)
loopint = loopint+1
midurlstr = mid (حقوق ، urllocation+loopint ، 1)
ifmidurlstr = "" thenexitdo
حلقة
endurlstr = mid (حقوق ، urllocation ، loopint)
urlstr = "<ahref =" & endurlstr & ">" & endurlstr & "</a>"
حقوق = منتصف (حقوق ، urllocation+loopint)
نهائيات = نهائيات و URLSTR
حلقة = 1
حلقة
Endif
نهائيات = نهائيات و حقوقي
ConfltSTR1 = نهائيات
نهائيات = ""
maillocation = instr (convertstr1 ، "@")
ifmaillocation <> 0then
dowhilemaIllocation <> maillocationEnd
maillocation = instr (convertstr1 ، "@")
MaillOctionEnd = Instrrev (ConfltStr1 ، "@")
MainMidMailstr = Mid (ConvertStr1 ، Maillocation+1،1)
midmailstr = mainmidmailstr
Dowhile (ASC (Midmailstr)> = 45) و (ASC (Midmailstr) <= 126)
LOOPINT1 = LOOPINT1+1
midmailstr = mid (convertstr1 ، maillocation-loopint1،1)
حلقة
FirstStr = Mid (ConvertStr1 ، maillocation-loopint1+1 ، loopint1-1)
Finalstr = Finalstr & Left (ConvertStr1 ، Maillocation-Loopint1)
midmailstr1 = mainmidmailstr
Dowhile (ASC (Midmailstr1)> = 45) و (ASC (Midmailstr1) <= 126)
loopint2 = loopint2+1
midmailstr1 = mid (convertstr1 ، maillocation+loopint2،1)
ifmidmailstr1 = "" thenexitdo
حلقة
SecondStr = Mid (ConvertStr1 ، Maillocation ، loopint2)
endmailstr = firststr & secondstr
MailStr = "<ahref = mailto:" & endmailstr & ">" & endmailstr & "</a>"
نهائيات = نهائيات و mailstr
ConfltStr1 = Mid (ConvertStr1 ، Maillocation+Loopint2)
loopint1 = 1
loopint2 = 1
حلقة
Endif
نهائيات = نهائيات و ConfltStr1
urlConvert = نهائيات
الوظيفية
٪>