<!--#include file="inc/config.asp"-->
<!--#include file="inc/conn.asp"-->
<%
dim rs,sql,classid,bytype,num,max
if(request.QueryString("id")<>"") then
	id=Clng(request.QueryString("id"))
else
	id=0
end if
if(request.QueryString("num")<>"") then
	num=Cint(request.QueryString("num"))
else
	num=10
end if
if(request.QueryString("max")<>"") then
	max=Cint(request.QueryString("max"))
else
	max=10
end if
sql="select top "&num&" id,username,userip,content,moditime from commen where articleid="&id
sql=sql&" order by id desc"
set rs=server.CreateObject("adodb.recordset") 
rs.open sql,conn,3,1
while not rs.eof
	response.Write("document.write('<table width=""100%""  border=""0"" cellspacing=""0"" cellpadding=""0"" style=""border:1px solid #EDECE9; "">');"&Chr(10))
	response.Write("document.write('	<tr>');"&Chr(10))
    response.Write("document.write('    	<td height=""18"" bgcolor=""#EDECE9"">¡¤ÍøÓÑ["&rs(1)&"] ÓÚ "&rs(4)&" ·¢±íÆÀÂÛ</td>');"&Chr(10))
    response.Write("document.write(' 	</tr>');"&Chr(10))
    response.Write("document.write('  	<tr>');"&Chr(10))
    response.Write("document.write('    	<td>&nbsp;"&left(rs(3),max)&"</td>');"&Chr(10))
    response.Write("document.write('  	</tr>');"&Chr(10))
	response.Write("document.write('</table>');"&Chr(10))	
	rs.movenext
wend
rs.close
set rs=nothing
call connclose
%>
