<% 
data_path="../../" 
numid="51"
dir="../err.asp" 
  %>

 <!--#include file="../../conn/conn.asp"-->
<%
Dim codeKey
codeKey = Int(Timer()*10)
set rss=server.CreateObject("adodb.recordset")
sp1="select   *  from  websen_news where newsid="&id
rss.open sp1,conn,1,3
set rs=server.CreateObject("adodb.recordset")
spl="select   *  from  websen_Review where pl_newsid="&id&" order by id desc"
rs.open spl,conn,1,3
if rs("pl_nrong")="" then 
Response.Write "<div align='center'><font color='#A0A0A4'>暂无评论</font></div>"
else

rs.PageSize =5 //每页显示条数 
dim intReCun,intPaCun 
intReCun=rs.Recordcount  
intPage=rs.pagecount
iCount=rs.RecordCount 
iPageSize=rs.PageSize 
maxpage=rs.PageCount 
page=request("page") 
if Not IsNumeric(page) or page="" then 
page=1 
else 
page=cint(page) 
end if 
if page<1 then 
page=1 
elseif page>maxpage then 
page=maxpage 
end if 
rs.AbsolutePage=Page 
if page=maxpage then 
x=iCount-(maxpage-1)*iPageSize 
else 
x=iPageSize 
end if 
b=0
i=1
do while not rs.eof and i<=5
pl_name=rs("pl_name")
addtime=rs("pl_time")
content=rs("pl_nrong")
content=replace(content,"""","'")
content=replace(content,chr(10),"")
content=replace(content,chr(13),"<BR>")
if b=1 then
	bbb="style='background-color: #F8FCFC'"
	b=0
else
	b=b+1
	bbb=""
end if
    
Response.Write "<tr "&bbb&">"   
Response.Write "<td style='font-size:9pt;word-break:break-all'>"
Response.Write "<font color=66666>"&"用户名:"&pl_name&"&nbsp;"&addtime&"</font>"
Response.Write "<br><img border='0' src='bbstitle.gif' width='16' height='15'>"&content&"</td>"
Response.Write "</tr>"
rs("pl_shu")=intReCun
rs.update
rss("pl_shu")=intReCun
rss.update
rss.close
if rs.recordcount=0 then
	Response.Write "<tr><td>暂时无评论</td></tr>"
end if
i=i+1
rs.movenext 
  loop
Response.Write "</table></div>"
Dim query, a, x, temp 
action = "http://" & Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("SCRIPT_NAME") 

query = Split(Request.ServerVariables("QUERY_STRING"), "&") 
For Each x In query 
a = Split(x, "=") 
If StrComp(a(0), "page", vbTextCompare) <> 0 Then 
temp = temp & a(0) & "=" & a(1) & "&" 
End If 
Next 

Response.Write("<table align='right' " & Table_style & ">" & vbCrLf ) 
Response.Write("<TR>" & vbCrLf ) 
Response.Write("<TD align=right>" & vbCrLf ) 
Response.Write(font_style & vbCrLf ) 
response.write "<span >共评论"&intReCun&"条</span>&nbsp;"
if page<=1 then 
Response.Write ("<a href='asb.asp?id="&id&"'>第一页</a>    " & vbCrLf) 
Response.Write ("<a href='asb.asp?id="&id&"&page="&page-1&"'>上一页</a>     " & vbCrLf) 
else 
Response.Write("<A HREF=" & action & "?" & temp & "Page=1><span class=plus>第一页</span></A>     " & vbCrLf) 
Response.Write("<A HREF=" & action & "?" & temp & "Page=" & (Page-1) & "><span class=plus>上一页</span></A>     " & vbCrLf) 
end if 

if page>=pagecount then 
Response.Write ("<a  href='asb.asp?id="&id&"&page="&page+1&"''>下一页</a>     " & vbCrLf) 
Response.Write ("<a href='asb.asp?id="&id&"&page="&intPage&"''>最后页</a>     ") 
else 
Response.Write("<a  href='asb.asp?id="&id&"&page="&page+1&"''>下一页</A>     " & vbCrLf) 
Response.Write("<a href='asb.asp?id="&id&"&page="&intPage&"''>最后页</A>     " & vbCrLf)
end if 

Response.Write("</span></TD>" & vbCrLf ) 
Response.Write("</TR>" & vbCrLf ) 
Response.Write("</table>" ) 
Response.Write "<br>"
end if
rs.close
%>
