<!-- #include file="jk_em.asp" -->
<%
dim ubb_flash
ubb_flash=format_mid_num(7)

function code_jk(strers)
  if strers="" or isnull(strers) then
    code_jk=""
    exit function
  end if
  dim strer
  strer=strers
  if joekoe_cms.ishealth then
    strer=joekoe_cms.code_health(strer)
  end if
  strer=replace(strer,"<","&lt;")
  strer=replace(strer,">","&gt;")
  strer=replace(strer," ","&nbsp")		'空格
  strer=replace(strer,CHR(9),"&nbsp")		'table
  strer=replace(strer,"'","&#39;")		'单引号
  strer=replace(strer,"""","&quot;")		'双引号	&#34;
  strer=replace(strer,"&quot;","&#34;")
  strer=replace(strer,"&#34;","<i>&#34;</i>")
  strer=replace(strer,"&#39;","<i>&#39;</i>")
  strer=replace(strer,"[br]","<br>")
  strer=replace(strer,"[BR]","<br>")
  strer=replace(strer,"[b]","<b>",1,-1,0)
  strer=replace(strer,"[/b]","</b>",1,-1,0)
  strer=replace(strer,"[i]","<i>",1,-1,0)
  strer=replace(strer,"[/i]","</i>",1,-1,0)
  strer=replace(strer,"[u]","<u>",1,-1,0)
  strer=replace(strer,"[/u]","</u>",1,-1,0)  
  strer=replace(strer,"[center]","<div align=center>",1,-1,0)
  strer=replace(strer,"[/center]","</div>",1,-1,0)
  strer=code_jk_em(strer)
  dim re
  Set re=new RegExp
  re.IgnoreCase=True
  re.Global=True
  re.Pattern="(script)"
  strer=re.Replace(strer,"<i>script</i>")
  're.Pattern="(js)"
  'strer=re.Replace(strer,"<i>js</i>")
  re.Pattern="(value)"
  strer=re.Replace(strer,"<i>value</i>")
  're.Pattern="(about)"
  'strer=re.Replace(strer,"<i>about</i>")
  're.Pattern="(file)"
  'strer=re.Replace(strer,"<i>file</i>")
  re.Pattern="(document)"
  strer=re.Replace(strer,"<i>document</i>")
  re.Pattern="(vbs)"
  strer=re.Replace(strer,"<i>vbs</i>")
  re.Pattern="(on(mouse|exit|error|click))"	'|key
  strer=re.Replace(strer,"<i>&#111n$2</i>")
  
  're.Pattern="\[IMGS\](.[^\[]*(gif|jpg|bmp|png))\[\/IMGS\]"
  re.Pattern="\[IMGS\](.[^\[]*)\[\/IMGS\]"
  strer=re.Replace(strer,"<img border=0 onload=""javascript:if(this.width>500)this.width=500"" src=$1>")
  're.Pattern="\[IMG\](.[^\[]*(gif|jpg|bmp|png))\[\/IMG\]"
  re.Pattern="\[IMG\](.[^\[]*)\[\/IMG\]"
  strer=re.Replace(strer,"<a href=$1 alt=按此在新窗口浏览图片 target=_blank><img border=0 alt=按此在新窗口浏览图片 onload=""javascript:if(this.width>500)this.width=500"" src=$1></a>")
  'strer=re.Replace(strer,"<img border=0 align=absMiddle src=skin/"&joekoe_cms.web_skin&"/small/image.gif> <a href=$1 alt=按此在新窗口浏览图片 target=_blank>[ 相关贴图 ]</a><br><img src=$1 border=0 onload=""javascript:if(this.width>"&max_width&")this.width="&max_width&""">")
  re.Pattern="\[DIR=*([0-9]*),*([0-9]*)\](.[^\[]*)\[\/DIR]"
  strer=re.Replace(strer,"<object classid=clsid:166B1BCA-3F9C-11CF-8075-444553540000 codebase=http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=7,0,2,0 width=$1 height=$2><param name=src value=$3><embed src=$3 pluginspage=http://www.macromedia.com/shockwave/download/ width=$1 height=$2></embed></object>")
  re.Pattern="\[QT=*([0-9]*),*([0-9]*)\](.[^\[]*)\[\/QT]"
  strer=re.Replace(strer,"<embed src=$3 width=$1 height=$2 autoplay=true loop=false controller=true playeveryframe=false cache=false scale=TOFIT bgcolor=#ededed kioskmode=false targetcache=false pluginspage=http://www.apple.com/quicktime/>")
  re.Pattern="\[MP=*([0-9]*),*([0-9]*)\](.[^\[]*)\[\/MP]"
  strer=re.Replace(strer,"<object align=middle classid=CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95 class=OBJECT id=MediaPlayer width=$1 height=$2 ><param name=ShowStatusBar value=-1><param name=Filename value=$3><embed type=application/x-oleobject codebase=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701 flename=mp src=$3  width=$1 height=$2></embed></object>")
  re.Pattern="\[RM=*([0-9]*),*([0-9]*)\](.[^\[]*)\[\/RM]"
  strer=re.Replace(strer,"<OBJECT classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA class=OBJECT id=RAOCX width=$1 height=$2><PARAM NAME=SRC VALUE=$3><PARAM NAME=CONSOLE VALUE=Clip1><PARAM NAME=CONTROLS VALUE=imagewindow><PARAM NAME=AUTOSTART VALUE=true></OBJECT><br><OBJECT classid=CLSID:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA height=32 id=video2 width=$1><PARAM NAME=SRC VALUE=$3><PARAM NAME=AUTOSTART VALUE=-1><PARAM NAME=CONTROLS VALUE=controlpanel><PARAM NAME=CONSOLE VALUE=Clip1></OBJECT>")
  re.Pattern="(\[FLASH=*([0-9]*),*([0-9]*)\])(.[^\[]*(.swf))(\[\/FLASH\])"
  if ubb_flash=1 then
    strer=re.Replace(strer,"<img border=0 align=absMiddle src=skin/"&joekoe_cms.web_skin&"/small/flash.gif> <a href=$4 target=_blank>[ 全屏欣赏 ]</a><br><OBJECT codeBase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0 classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 width=$2 height=$3><PARAM NAME=movie VALUE=$4><PARAM NAME=quality VALUE=high><embed src=$4 quality=high pluginspage=http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash type=application/x-shockwave-flash width=$2 height=$3>$4</embed></OBJECT>")
  else
    strer=re.Replace(strer,"<img border=0 align=absMiddle src=skin/"&joekoe_cms.web_skin&"/small/flash.gif> <a href=$4 target=_blank>[ 新窗口浏览 Flash 文件 ]</a>")
  end if
  re.Pattern="(\[EMAIL\])(\S+\@.*)(\[\/EMAIL\])"
  strer=re.Replace(strer,"<img border=0 align=absmiddle src=skin/"&joekoe_cms.web_skin&"/small/email.gif><A href=mailto:$2>$2</A>")
  re.Pattern="\[color=(.[^\[]*)\](.[^\[]*)\[\/color\]"
  strer=re.Replace(strer,"<font color=$1>$2</font>")
  re.Pattern="\[face=(.*)\](.*)\[\/face\]"
  strer=re.Replace(strer,"<font face=$1>$2</font>")
  re.Pattern="\[size=([-3-7])\](.*)\[\/size\]"
  strer=re.Replace(strer,"<font size=$1>$2</font>")
  re.Pattern="\[fly\](.*)\[\/fly\]"
  strer=re.Replace(strer,"<marquee width=96% behavior=alternate scrollamount=3>$1</marquee>")
  re.Pattern="\[move\](.*)\[\/move\]"
  strer=re.Replace(strer,"<MARQUEE scrollamount=3>$1</marquee>")
  re.Pattern="(\[DOWNLOAD\]down)(.[^\[]*)(\[\/DOWNLOAD\])"
  strer=re.Replace(strer,"<img border=0 align=absMiddle src=skin/"&joekoe_cms.web_skin&"/small/download.gif> <a href=http$2 target=_blank>[ 点击下载 ]</a>")
  re.Pattern="(\[DOWNLOAD\])(.[^\[]*)(\[\/DOWNLOAD\])"
  strer=re.Replace(strer,"<img border=0 align=absMiddle src=skin/"&joekoe_cms.web_skin&"/small/download.gif> <a href=$2 target=_blank>[ 点击下载 ]</a>")
  re.Pattern="(\[URL=(.[^\[]*)\])(.[^\[]*)(\[\/URL\])"
  strer=re.Replace(strer,"<A href=$2 target=_blank>$3</A>")
  re.Pattern="(\[URL\])(.[^\[]*)(\[\/URL\])"
  strer=re.Replace(strer,"<img border=0 align=absmiddle src=skin/"&joekoe_cms.web_skin&"/small/url.gif><A href=$2 target=_blank>$2</A>")
  re.Pattern ="(http://[A-Za-z0-9\./=\?%\-&_~`@':+!]+)$"
  strer =re.Replace(strer,"<img align=absmiddle src=skin/"&joekoe_cms.web_skin&"/small/url.gif border=0><a target=_blank href=$1>$1</a>")
  re.Pattern ="^(http://[A-Za-z0-9\./=\?%\-&_~`@':+!]+)"
  strer =re.Replace(strer,"<img align=absmiddle src=skin/"&joekoe_cms.web_skin&"/small/url.gif border=0><a target=_blank href=$1>$1</a>")
  re.Pattern ="([^>='])(http://[A-Za-z0-9\./=\?%\-&_~`@':+!]+)"
  strer =re.Replace(strer,"$1<img align=absmiddle src=skin/"&joekoe_cms.web_skin&"/small/url.gif border=0><a target=_blank href=$2>$2</a>")
  re.Pattern="\[align=(.[^\[]*)\](.*)\[\/align\]"
  strer=re.Replace(strer,"<div align=$1>$2</div>")
  re.Pattern="\[QUOTE\](.[^\[]*)\[\/QUOTE\]"
  strer=re.Replace(strer,"<table cellspacing=1 cellpadding=1 align=center class=table><tr><td class=bg><table width=100% border=0 cellspacing=0 cellpadding=2 class=tf><tr><td class=bw><font class=htd>$1</font></td></tr></table></td></tr></table>")
  re.Pattern="\[QUOTE\](.[^\[]*)\[\/QUOTE\]"
  strer=re.Replace(strer,"<table cellspacing=1 cellpadding=1 align=center class=table><tr><td class=bg_td><table width=100% border=0 cellspacing=0 cellpadding=2 class=tf><tr><td class=bw><font class=htd>$1</font></td></tr></table></td></tr></table>")
  re.Pattern="\[QUOTE\](.[^\[]*)\[\/QUOTE\]"
  strer=re.Replace(strer,"<table cellspacing=1 cellpadding=1 align=center class=table><tr><td class=bg_tds><table width=100% border=0 cellspacing=0 cellpadding=2 class=tf><tr><td class=bw><font class=htd>$1</font></td></tr></table></td></tr></table>")
  re.Pattern="\[CODE\](.[^\[]*)\[\/CODE\]"
  strer=re.Replace(strer,"<font class=gray><b>以下为代码内容：</b></font><br><table cellspacing=1 cellpadding=1 align=center class=table><tr><td class=bg><table width=100% border=0 cellspacing=0 cellpadding=2 class=tf><tr><td class=bw><font class=htd style=""font-weight:bold;"">$1</font></td></tr></table></td></tr></table>")
  set re=nothing
  strer=replace(strer,vbCrLf,"<br>")
  code_jk=strer
end function

function code_jk2(strers)
  if strers="" or isnull(strers) then
    code_jk2=""
    exit function
  end if
  dim strer
  strer=strers
  if joekoe_cms.ishealth then
    strer=joekoe_cms.code_health(strer)
  end if
  strer=replace(strer,"<","&lt;")
  strer=replace(strer,">","&gt;")
  'strer=replace(strer," ","&nbsp")		'空格
  'strer=replace(strer,CHR(9),"&nbsp")		'table
  strer=replace(strer,"'","&#39;")		'单引号
  strer=replace(strer,"""","&quot;")		'双引号	&#34;
  strer=replace(strer,"&quot;","&#34;")
  strer=replace(strer,"&#34;","<i>&#34;</i>")
  strer=replace(strer,"&#39;","<i>&#39;</i>")
  strer=replace(strer,"[br]","<br>")
  strer=replace(strer,"[BR]","<br>")
  strer=replace(strer,"[b]","<b>",1,-1,0)
  strer=replace(strer,"[/b]","</b>",1,-1,0)
  strer=replace(strer,"[i]","<i>",1,-1,0)
  strer=replace(strer,"[/i]","</i>",1,-1,0)
  strer=replace(strer,"[u]","<u>",1,-1,0)
  strer=replace(strer,"[/u]","</u>",1,-1,0)
  strer=replace(strer,"[center]","<div align=center>",1,-1,0)
  strer=replace(strer,"[/center]","</div>",1,-1,0)
  
  dim re
  Set re=new RegExp
  re.IgnoreCase=True
  re.Global=True
  re.Pattern="(script)"
  strer=re.Replace(strer,"<i>script</i>")
  re.Pattern="(js)"
  strer=re.Replace(strer,"<i>js</i>")
  re.Pattern="(value)"
  strer=re.Replace(strer,"<i>value</i>")
  re.Pattern="(about)"
  strer=re.Replace(strer,"<i>about</i>")
  're.Pattern="(file)"
  'strer=re.Replace(strer,"<i>file</i>")
  re.Pattern="(document)"
  strer=re.Replace(strer,"<i>document</i>")
  re.Pattern="(vbs)"
  strer=re.Replace(strer,"<i>vbs</i>")
  re.Pattern="(on(mouse|exit|error|click|key))"
  strer=re.Replace(strer,"<i>&#111n$2</i>")
  
  re.Pattern="\[IMG\](.[^\[]*(gif|jpg|bmp|png))\[\/IMG\]"
  strer=re.Replace(strer,"<img border=0 onload=""javascript:if(this.width>300)this.width=300"" src=$1>")
  re.Pattern="(\[EMAIL\])(\S+\@.*)(\[\/EMAIL\])"
  strer=re.Replace(strer,"<img border=0 align=absmiddle src=skin/"&joekoe_cms.web_skin&"/small/email.gif><A href=mailto:$2>$2</A>")
  re.Pattern="\[color=(.[^\[]*)\](.[^\[]*)\[\/color\]"
  strer=re.Replace(strer,"<font color=$1>$2</font>")
  re.Pattern="\[face=(.[^\[]*)\](.*)\[\/face\]"
  strer=re.Replace(strer,"<font face=$1>$2</font>")
  re.Pattern="\[size=(.[^\[]*)\](.*)\[\/size\]"
  strer=re.Replace(strer,"<font size=$1>$2</font>")
  re.Pattern="\[fly\](.*)\[\/fly\]"
  strer=re.Replace(strer,"<marquee width=96% behavior=alternate scrollamount=3>$1</marquee>")
  re.Pattern="\[move\](.*)\[\/move\]"
  strer=re.Replace(strer,"<MARQUEE scrollamount=3>$1</marquee>")
  re.Pattern="(\[URL=(.[^\[]*)\])(.[^\[]*)(\[\/URL\])"
  strer=re.Replace(strer,"<A href=$2 target=_blank>$3</A>")
  re.Pattern="(\[URL\])(.[^\[]*)(\[\/URL\])"
  strer=re.Replace(strer,"<img border=0 align=absmiddle src=skin/"&joekoe_cms.web_skin&"/small/url.gif><A href=$2 target=_blank>$2</A>")
  re.Pattern ="(http://[A-Za-z0-9\./=\?%\-&_~`@':+!]+)$"
  strer=re.Replace(strer,"<img align=absmiddle src=skin/"&joekoe_cms.web_skin&"/small/url.gif border=0><a target=_blank href=$1>$1</a>")
  re.Pattern="\[align=(.[^\[]*)\](.*)\[\/align\]"
  strer=re.Replace(strer,"<div align=$1>$2</div>")
  set re=nothing
  strer=replace(strer,vbCrLf,"<br>")
  strer=code_jk_em(strer)
  code_jk2=strer
end function
%>