<%@ Language=VBScript %><!--#INCLUDE FILE="conn.asp" -->

<%
if request("ID")=""  then
response.write "<script>alert('请选择相关论评!!');location.href='javascript:history.back(1)';</Script>"
end if
if IsNumeric(request.QueryString("id"))=False then
response.write "<script>alert('请勿输入非法字符!!');location.href='javascript:history.back(1)';</Script>"
response.end
end if
%>
<html>
<head>


<%
dim rs
dim sql
dim page
sql = "Select * FROM ly Where newsID='"&Request("ID")&"' Order By ID Desc"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "没有此新闻的相关评论。"
response.end
end if
'----------------------------------------------
IF not IsNumeric(Request("page")) Or IsEmpty(Request("page")) Then
page=1
Else
Page=Int(Abs(Request("page")))
End if
rs.pagesize = 10'------------------每页显示评论数
total  = rs.RecordCount
mypagesize     = rs.pagesize
rs.absolutepage = page

%>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="style.css" type="text/css">

<title></title>

<base target="_top">
<link href="css.css" rel="stylesheet" type="text/css">
</head>
<body text="#000000">

<table width="587" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#999999">
  <tr>
    <td width="486" height="25" bgcolor="#FFFFFF"><font color="#000000"> 
      <%
If not rs.eof then
%>
      <b>&nbsp; 共有:</b><%=total%>条论评 
      <%  
end if 
%>
      </font></td> 
</tr> 
</table> 
<font color="#000000"> 
<br> <%
if rs.eof then
response.write "<P align=center>还没有评论"
end if
do while not rs.eof  and mypagesize>0
name=rs("name")
tel=rs("tel")
nr=rs("nr")
rdate=rs("date")
%>
</font>
<table width="587" height="167" border="0" align="center" cellpadding="" cellspacing="1" bordercolorlight="" bordercolordark="" bgcolor="#999999">
  <tr bgcolor="#efefef"> 
    <td width="574" valign="middle" height="25" colspan="3"><b><font color="#000000">《<a href="view.asp?newsid=<%=newsid%>&classID=<%=classid%>"><%=title%></a>》<%=Reviewtitle%></font></b></td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td  valign="middle" width="574" height="22">&nbsp; <b><font color="#008000">&nbsp;发表人：<%=name%></font></b></td>
    <td  valign="middle" width="574" height="22"> 
      <p align="center"><b>电话：<%=tel%></b> </td>
    <td width="574" valign="middle" height="22"> 
      <p align="center">发表时间:<%=rdate%></p></td>
  </tr>
  <tr> 
    <td width="574" colspan="3" valign="middle" bgcolor="#FFFFFF"> <p align="left">&nbsp;&nbsp;<%=nr%></p></td>
  </tr>
</table>                                                   
<br> <%                                                 
mypagesize=mypagesize-1                                                 
rs.movenext                                                 
loop                                                 
%> <center>                                                 
<table width="587" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#999999">
  <tr>                                                 
    <td width="567" height="20" bgcolor="#FFFFFF"><B>页数:</B> 
      <%                                                                             
if page>1 then%>
      <a href='rview.asp?page=<%=page-1%>&ID=<%=Request("ID")%>'>上一页</a> 
      <%                                                                             
end if                                                      
%>
      <%                                                                             
if rs.pagecount <= 8 then                                                      
for j=1 to rs.pagecount                                                      
response.write "[<a href='rview.asp?page="&j&"&ID="&Request("ID")&"'>"&j&"</a>]"'--------------暂时先用这吧                                                      
next                                                      
else                                                      
for j=1 to 8                                                      
response.write "[<a href='rview.asp?page="&j&"&ID="&Request("ID")&"'>"&j&"</a>]&nbsp;"                                                      
next                                                      
response.write  "[<a href='rview.asp?page="&rs.pagecount&"&ID="&Request("ID")&"' title='最后一页'>&gt;&gt;</a>]"                                                      
end if                                                      
%>
      <%                                                                             
if page<rs.pagecount   then%>
      <a href='rview.asp?page=<%=page+1%>&ID=<%=Request("ID")%>'>下一页</a> 
      <%                                                                             
end if                                                      
%>
    </td>                                                      
</tr>                                                      
<tr>                                                      
    <td width="567" height="20" align="center" bgcolor="#FFFFFF"> 
      <DIV align=center> </DIV>                                                       
      </td>                                                      
</tr>                                                      
</table>                                                      
</body>                                                      
                                                      
</html>                                                      
<%                                                      
rs.close                                                      
set rs=nothing                                                      
conn.close                                                      
set conn=nothing'--------------------------真是糊涂啊~~~~~~~~~~~~~~~~~                                                      
%>                                                      
