马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
Windows本身的所有问题都会一成不变的也累加到了它的身上。安全性、稳定性、跨平台性都会因为与NT的捆绑而显现出来;ubb|函数asp的ubb函数(保举)
functionunHtml(content)
unHtml=content
ifcontent""then
unHtml=replace(unHtml,"&","&")
unHtml=replace(unHtml,"<","<")
unHtml=replace(unHtml,">",">")
unHtml=replace(unHtml,chr(34),""")
unHtml=replace(unHtml,chr(13),"<br>")
unHtml=replace(unHtml,chr(32),"")
unHtml=ubb(unHtml)
endif
endfunction
functionubb(content)
Dimnowtime,i
ubb=content
nowtime=now()
UBB=Convert(ubb,"code")
UBB=Convert(ubb,"html")
UBB=Convert(ubb,"url")
UBB=Convert(ubb,"color")
UBB=Convert(ubb,"font")
UBB=Convert(ubb,"size")
UBB=Convert(ubb,"quote")
UBB=Convert(ubb,"email")
UBB=Convert(ubb,"img")
UBB=Convert(ubb,"swf")
UBB=AutoURL(ubb)
ubb=replace(ubb,"","<b>",1,-1,1)
ubb=replace(ubb,"","</b>",1,-1,1)
ubb=replace(ubb,"","<i>",1,-1,1)
ubb=replace(ubb,"","</i>",1,-1,1)
ubb=replace(ubb,"","<u>",1,-1,1)
ubb=replace(ubb,"","</u>",1,-1,1)
ubb=replace(ubb,"[blue]","<fontcolor=#000099>",1,-1,1)
ubb=replace(ubb,"[/blue]","</font>",1,-1,1)
ubb=replace(ubb,"[red]","<fontcolor=#990000>",1,-1,1)
ubb=replace(ubb,"[/red]","</font>",1,-1,1)
fori=1to28
ubb=replace(ubb,"{:em"&i&"}","<IMGSRC=http://www.163design.net/a/z/emot/emotface/em"&i&".gif></img>",1,6,1)
ubb=replace(ubb,"{:em"&i&"}","",1,-1,1)
next
ubb=replace(ubb,"["&chr(176),"[",1,-1,1)
ubb=replace(ubb,chr(176)&"]","]",1,-1,1)
ubb=replace(ubb,"/"&chr(176),"/",1,-1,1)
ubb=replace(ubb,"{;em","{:em",1,-1,1)
endfunction
functionConvert(ubb,CovT)
DimcText,startubb,endubb,Lcovt,text,codetext
cText=ubb
startubb=1
dowhileCovt="url"orCovt="color"orCovt="font"orCovt="size"
startubb=instr(startubb,cText,"["&CovT&"=",1)
ifstartubb=0thenexitdo
endubb=instr(startubb,cText,"]",1)
ifendubb=0thenexitdo
Lcovt=Covt
startubb=startubb+len(lCovT)+2
text=mid(cText,startubb,endubb-startubb)
codetext=replace(text,"[","["&chr(176),1,-1,1)
codetext=replace(codetext,"]",chr(176)&"]",1,-1,1)
codetext=replace(codetext,"{:em","{;em",1,-1,1)
codetext=replace(codetext,"/","/"&chr(176),1,-1,1)
selectcaseCovT
case"color"
cText=replace(cText,"","<fontcolor="&text&">",1,1,1)
cText=replace(cText,"","</font>",1,1,1)
case"font"
cText=replace(cText,"","<fontface="&text&">",1,1,1)
cText=replace(cText,"","</font>",1,1,1)
case"size"
ifIsNumeric(text)then
iftext>6thentext=6
iftext<1thentext=1
cText=replace(cText,"","<fontsize="&text&">",1,1,1)
cText=replace(cText,"","</font>",1,1,1)
endif
case"url"
cText=replace(cText,"","<ahref="&codetext&"target=_blank>",1,1,1)
cText=replace(cText,"","</a>",1,1,1)
case"email"
cText=replace(cText,"["&CovT&"="&text&"]","<ahref=mailto:"&text&">",1,1,1)
cText=replace(cText,"[/"&CovT&"]","</a>",1,1,1)
endselect
loop
startubb=1
do
startubb=instr(startubb,cText,"["&CovT&"]",1)
ifstartubb=0thenexitdo
endubb=instr(startubb,cText,"[/"&CovT&"]",1)</p>想法是和程序员的想法不一样的.至于为什么.大家去想一想.跟心理学有关的 |