<!-- #include file="../../Include/Conno.asp" -->
<%
'===========================================


'==============
id=request("mid")
if Request("Count")=empty then
Count=300
else
Count=int(Request("Count"))
end if
	sqln="select top 10 * from info_mcomment where f_materid="&id&" order by f_regtime"
	Set rsn=Conn.Execute(sqln)
	i=0
	do while Not rsn.Eof
	i=i+1
	topic=ReplaceText(rsn("f_text"),"<[^>]*>","")
	list=list&"<TABLE style=FONT-SIZE: 9pt cellSpacing=1 cellPadding=2 width=100% bgColor=#cccccc border=0><tr width=562><TD width=80 bgColor=#efefef align=center>最新第"&i&"条</TD><TD width=93 bgColor=#efefef align=middle>"&rsn("f_username")&"</TD><TD bgColor=#efefef width=258>"&left(topic,Count)&"</TD><TD bgColor=#efefef width=112 align=middle>"&formatdatetime(rsn("f_regtime"),2)&"</TD><tr></TABLE>"
	RSn.MoveNext
	Loop
	set rsn=nothing
	conn.close
	set conn=nothing
''''''''''替换模块START''''''''''''
Function ReplaceText(fString,patrn,replStr)
Set regEx = New RegExp  ' 建立正则表达式。
regEx.Pattern = patrn   ' 设置模式。
regEx.IgnoreCase = True ' 设置是否区分大小写。
regEx.Global = True     ' 设置全局可用性。 
ReplaceText = regEx.Replace(fString, replStr) ' 作替换。
Set reg=nothing
End Function
''''''''''替换模块END''''''''''''
%>
<%=Request("id")%>.innerHTML='<%=list%>'