sub smilies(temp)
if Request("smilies")="" then
temp =replace(temp,"/:)","")
temp =replace(temp,"/:d","")
temp =replace(temp,"/:o","")
temp =replace(temp,"/:p","")
temp =replace(temp,"/;)","")
temp =replace(temp,"/:(","")
temp =replace(temp,"/:s","")
temp =replace(temp,"/:|","")
temp =replace(temp,"/:$","")
content=temp
end if
end sub
%>
function ybbcode(temp) {
//自动识别网址
temp = temp.replace(/&/ig,"&");
temp = temp.replace(/^((http|ftp|rtsp|mms):(\/\/|\\\\)[A-Za-z0-9/\.\-_?=&:@%]+)/ig,"$1");
temp = temp.replace(/( |)((http|ftp|rtsp|mms):(\/\/|\\\\)[A-Za-z0-9/\.\-_?=&:@%]+)(| |)/ig,"$1$2$5");
temp = temp.replace(/(\[IMG\])(http:\/\/.[^\[ ]*)(\[\/IMG\])/ig,"");
temp = temp.replace(/(\[IMG\])(.[^\[ ]*)(\[\/IMG\])/ig,"");
temp = temp.replace(/(\[FLASH\])(http:\/\/.[^\[]*)(\[\/FLASH\])/ig,"");
temp = temp.replace(/(\[b\])(.[^\[]*)(\[\/b\])/ig,"$2");
temp = temp.replace(/(\[i\])(.[^\[]*)(\[\/i\])/ig,"$2");
temp = temp.replace(/(\[u\])(.[^\[]*)(\[\/u\])/ig,"$2");
temp = temp.replace(/(\[strike\])(.[^\[]*)(\[\/strike\])/ig,"$2");
temp = temp.replace(/(\[center\])(.[^\[]*)(\[\/center\])/ig,"$2");
temp = temp.replace(/(\[fly\])(.[^\[]*)(\[\/fly\])/ig,"$2");
temp = temp.replace(/(\[marquee\])(.[^\[]*)(\[\/marquee\])/ig,"$2");
temp = temp.replace(/(\[URL\])((http|ftp|rtsp|mms):\/\/(.[^\[]*))(\[\/URL\])/ig,"$2");
temp = temp.replace(/(\[URL=)((http|ftp|rtsp|mms):\/\/(.[^\[]*))(\])((.[^\[]*))(\[\/URL\])/ig,"$6");
temp = temp.replace(/(\[EMAIL\])(\S+\@.[^\[]*)(\[\/EMAIL\])/ig,"$2");
temp = temp.replace(/(\[font=)(.[^.:;`'"=]*)(\])(.[^\[]*)(\[\/font\])/ig,"$4");
temp = temp.replace(/(\[size=)(.[^.:;`'"=]*)(\])(.[^\[]*)(\[\/size\])/ig,"$4");
temp = temp.replace(/(\[COLOR=)(.[^.:;`'"=]*)(\])(.[^\[]*)(\[\/COLOR\])/ig,"$4");
temp = temp.replace(/(\[code\])(.[^\[]*)(\[\/code\])/ig,"代码:$2");
temp = temp.replace(/(\[QUOTE\])(.[^\[]*)(\[\/QUOTE\])/ig,"引用:$2");
return (temp);
}