ubb代码_ubb 转换成html代码

时间:2015-03-12  来源:Ubuntu  阅读:

<%
function unhtml(s_string)
 s_string=replace(s_string,"&","&")
 "s_string=replace(s_string," "," ")
 s_string=replace(s_string,"<","<")
 unhtml=replace(s_string,">",">")
end function
function ubbimg(s_string)
 s_string=replace(s_string,"[img]","  ubbimg=replace(s_string,"[/img]","">")
end function
function ubb_url(s_string)
 str_len=len(s_string)
 start_pos=instr(s_string,"[url]")
 if start_pos>0 then
  end_pos=instr(start_pos,s_string,"[/url]")
  if end_pos>0 then
   url=mid(s_string,start_pos+5,end_pos-start_pos-5)
   s_string=left(s_string,start_pos-1)&""&url&""&right(s_string,str_len-end_pos-5)
   call ubb_url(s_string)
  end if
 end if
 ubb_url=s_string
end function
function ubburl(s_string)
 s_string=ubb_url(s_string)
 str_len=len(s_string)
 start_pos=instr(s_string,"[url=")
 if start_pos>0 then
  end_pos=instr(start_pos,s_string,"]")
  end_pos2=instr(start_pos,s_string,"[/url]")
  if end_pos>0 and end_pos2>end_pos then
   url=mid(s_string,start_pos+5,end_pos-start_pos-5)
   s_string=left(s_string,start_pos-1)&""&right(s_string,str_len-end_pos)
   call ubburl(s_string)
  end if
 end if
 ubburl=replace(s_string,"[/url]","")
end function
function unquot(s_string)
 s_string=replace(s_string,chr(34),chr(34)&chr(34))
 unquot=replace(s_string,chr(39),chr(39)&chr(39))
end function
function fbdwords(s_string,s_fbdwords)
 a_string=split(s_fbdwords," ")
 n=ubound(a_string)
 for i=0 to n
  if trim(a_string(i))<>"" then
   s_string=replace(s_string,trim(a_string(i)),"*")
  end if
 next
 fbdwords=s_string
end function
function existswords(s_string,s_fbdwords)
 isexist=false
 a_string=split(s_fbdwords," ")
 n=ubound(a_string)
 for i=0 to n
  if trim(a_string(i))<>"" and instr(s_string,a_string(i))>0 then
   isexist=true
   exit for
  end if
 next
 existswords=isexist
end function
%>

ubb代码_ubb 转换成html代码

http://m.bbyears.com/caozuoxitong/13579.html

推荐访问:ubuntu dubbo通信协议 ubb换行 ubbp ubantu1404怎样破解密码 ubisoft服务目前不可用 ubuntu环境变量 ubuntu版本 uboot命令
相关阅读 猜你喜欢
本类排行 本类最新