'文字或特定图片模式显示新闻
function shownew(content,ntype)
shownew = ""
if(ntype = 1) then
shownew = shownew &" <ancho de TABLA=100% >"
mostrarnuevo = mostrarnuevo &"<TR>"
shownew = shownew &" <TD ancho=600 estilo='word-break:break-all' valign=top>"&ShowPic(content)&"</TD>"
mostrarnuevo = mostrarnuevo &"</TR>"
mostrarnuevo = mostrarnuevo &"<TR>"
shownew = shownew &" <TD valign=top style='word-break:break-all'>"&OnlyWord(content)&"</TD>"
mostrarnuevo = mostrarnuevo &"</TR>"
mostrarnuevo = mostrarnuevo &"</TABLE>"
elseif (ntipo = 2) entonces
shownew = shownew &" <TABLE width='100%'>"
shownew = shownew &"<TR>"
shownew = shownew &" <TD style='word-break:break-all' valign=top>"&OnlyWord(content)&"</TD>"
mostrarnuevo = mostrarnuevo &"</TR>"
mostrarnuevo = mostrarnuevo &"<TR>"
shownew = shownew &" <TD ancho=600 valign=top style='word-break:break-all'>"&ShowPic(content)&"</TD>"
mostrarnuevo = mostrarnuevo &"</TR>"
shownew = shownew &"</TABLE>"
elseif (ntype = 3) entonces
mostrarnuevo = mostrarnuevo &"<TABLE>"
mostrarnuevo = mostrarnuevo &"<TR>"
shownew = shownew &"<TD width=100 valign=top>"&ShowPic(content)&"</TD>"
shownew = shownew &"<TD width=80% style='word-break:break-all' valign= arriba>"&OnlyWord(contenido)&"</TD>"
mostrarnuevo = mostrarnuevo &"</TR>"
shownew = shownew &"</TABLE>"
elseif (ntype = 4) luego
shownew = shownew &"<TABLE>"
shownew = shownew &"<TR>"
shownew = shownew &"<TD width=80% valign=estilo superior ='palabra-break:break-all'>"&OnlyWord(content)&"</TD>"
shownew = shownew &"<TD width=100 valign=top>"&ShowPic(content)&"</TD>"
shownew = shownew &"</TR>"
mostrarnuevo = mostrarnuevo &"</TABLE>"
demás
shownew = shownew & "<table><tr><td style='word-break:break-all'>"&content&"</td></tr></table>"
finalizar si
finaliza la función
'显示提取的图片
función MostrarPic(cadena)
MostrarPic = ""
ImageUrl= RegExpExecute(strng)
ImageUrls = Split(ImageUrl,"<BR>")
para i = LBound(ImageUrls) a (UBound(ImageUrls) - 1)
ShowPic = ShowPic & ("<a href='"&ImageUrls(i) &"' target=_blank><image src='"&ImageUrls(i)&"' border='0' alt='按此在新窗口浏览图片' onload='javascript:if(this.width>180)this .width=180'></a>")
siguiente
función final
'从内容中提取图fotos
Función RegExpExecute(cadena)
Dim regEx, Match, Matches '建立变量。
Establecer regEx = Nueva RegExp '建立正则表达式。
regEx.Pattern = "(src=)('|"&CHR(34)&"| )?(.[^'|s|"&CHR(34)&"]*)(.)(jpg|gif| png|bmp|jpeg)('|"&CHR(34)&"|s|>)?" '设置模式.
' regEx.Pattern = "(src=)('|"&CHR(34)&"| )?(.[^'| |"&CHR(34)&"]*)(.)(jpg|gif|png |bmp|jpeg)('|"&CHR(34)&"| |>)?" '设置模式.
'regEx.Pattern = "(s|S)(r|R)(c|C)=('|"+CHR(34)+")(w|\|/|.)+(' |"+CHR(34)+"| *|>)?" '设置模式.
regEx.IgnoreCase = true '设置是否区分字符大小写.
regEx.Global = True '设置全局可用性.
Establecer coincidencias = regEx.Execute(string) '执行搜索。
Para cada partido en Partidos '遍历匹配集合。
valores=valores&Match.SubMatches(2)&Match.SubMatches(3)&Match.SubMatches(4)&"<BR>"
Próximo
RegExpExecute = valores
Función final
'删除内容中与图片有关的代码
función SóloPalabra(cadena)
Establecer re=nueva RegExp
re.IgnoreCase =Verdadero
re.Global=Verdadero
re.Pattern = "(<)(.[^<]*)(src=)('|"&CHR(34)&"| )?(.[^'|s|"&CHR(34)&"] *)(.)(jpg|gif|png|bmp|jpeg)('|"&CHR(34)&"|s|>)(.[^>]*)(>)" '设置模式.
OnlyWord=re.Replace(cadena,"")
Establecer re =
función final
de nada