谁帮忙解决一下!最好说的清楚具体一点!先谢过了!
<title> 留言板</title> <% function changechr(str) changechr=replace(replace(replace(replace(str,"<","<"),">",">"),chr(13),"<br>")," "," ") end function
Function LinkURLs(strInput) Dim iCurrentLocation Dim iLinkStart Dim iLinkEnd Dim strLinkText Dim strOutPut strLinkText="" strOutput="" iCurrentLocation=1 Do while Instr(iCurrentLocation,strInput,"[url]",1)<>0 iLinkStart=Instr(iCurrentLocation,strInput,"[url]",1) iLinkEnd=Instr(iCurrentLocation+1,strInput,"[/url]",1) If iLinkEnd=0 then iLinkEnd=len(strINput)+1 select case Mid(strInput,iLinkEnd-1,1) case ".","!","?" iLinkEnd=iLinkEnd-1 end select stroutput=strOutput & Mid(strInput,iCurrentLocation,iLinkStart-iCurrentLocation) strLinkText=replace(Mid(strInput,iLinkStart+5,iLinkEnd-iLinkStart-5),"[/url]","") strOutput=strOutput & "<A href=""" & strLinkText & """ target=_blank>" & strLinkText & "</A>" iCurrentLocation=iLinkEnd Loop
strOutput=strOutput & Mid(strInput,iCurrentLocation) LinkURLs=replace(strOutput,"[/url]","",1,-1,1) End Function
Function LinkIMGs(strInput) Dim iCurrentLocation Dim iLinkStart Dim iLinkEnd Dim strLinkText Dim strOutPut strLinkText="" strOutput="" iCurrentLocation=1 Do while Instr(iCurrentLocation,strInput,"[img]",1)<>0 iLinkStart=Instr(iCurrentLocation,strInput,"[img]",1) iLinkEnd=Instr(iCurrentLocation+1,strInput,"[/img]",1) If iLinkEnd=0 then iLinkEnd=len(strINput)+1 select case Mid(strInput,iLinkEnd-1,1) case ".","!","?" iLinkEnd=iLinkEnd-1 end select stroutput=strOutput & Mid(strInput,iCurrentLocation,iLinkStart-iCurrentLocation) strLinkText=replace(Mid(strInput,iLinkStart+5,iLinkEnd-iLinkStart-5),"[/img]","") strOutput=strOutput & "<img src=""" & strLinkText & """>" iCurrentLocation=iLinkEnd Loop
strOutput=strOutput & Mid(strInput,iCurrentLocation) LinkIMGs=replace(strOutput,"[/img]","",1,-1,1) End Function
Function LinkEmail(strInput) Dim iCurrentLocation Dim iLinkStart Dim iLinkEnd Dim strLinkText Dim strOutPut strLinkText="" strOutput="" iCurrentLocation=1 Do while Instr(iCurrentLocation,strInput,"[email]",1)<>0 iLinkStart=Instr(iCurrentLocation,strInput,"[email]",1) iLinkEnd=Instr(iCurrentLocation+1,strInput,"[/email]",1) If iLinkEnd=0 then iLinkEnd=len(strINput)+1 select case Mid(strInput,iLinkEnd-1,1) case ".","!","?" iLinkEnd=iLinkEnd-1 end select stroutput=strOutput & Mid(strInput,iCurrentLocation,iLinkStart-iCurrentLocation) strLinkText=replace(Mid(strInput,iLinkStart+7,iLinkEnd-iLinkStart-7),"[/email]","") strOutput=strOutput & "<A href=""mailt" & strLinkText & """><font color=blue>" & strLinkText & "</font></A>" iCurrentLocation=iLinkEnd Loop
strOutput=strOutput & Mid(strInput,iCurrentLocation) LinkEmail=replace(strOutput,"[/email]","",1,-1,1) End Function function encrypt(ecode) Dim texts dim i for i=1 to len(ecode) texts=texts & chr(asc(mid(ecode,i,1))+i) next encrypt = texts end function function UBB(str) str=LinkURLs(str) str=LinkIMGs(str) str=LinkEmail(str) UBB=str end function %>