<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="Admin.asp" -->
<!--#include file="cf.asp" -->
<!--#include file="conn.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link rel="stylesheet" href="../include/css.css" type="text/css">
<script type="text/javascript" src="include/admin.js"></script>
<style type="text/css">
<!--
body {
	margin-top: 5px;
}
-->
</style></head>
<body>
<table width="99%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#FFFFFF">
<form name="form1" method="post" action="admin_infodel.asp?action=delarticle">
<%action=request.QueryString("action")
  page=clng(request("page"))
		set rs=server.CreateObject("adodb.recordset") 
		if action="all" then
		rs.open "select * from shop_pinglun where id="&clng(request("id"))&" order by pinglundate desc",conn,1,1 
		else
		rs.open "select * from shop_pinglun  order by pinglundate desc",conn,1,1 
		end if
		if rs.eof and rs.bof then 
		response.write"暂无相关评论！"
		else
rs.pagesize=30
if page=0 then page=1 
pages=rs.pagecount
if page > pages then page=pages
rs.absolutepage=page
for j=1 to rs.pagesize 
%>
  <tr>
    <td width="7%" height="22" align="left" bgcolor="#CCCCCC">&nbsp;评论人</td>
    <td width="16%" align="left" bgcolor="#CCCCCC"><b><%=rs("pinglunname")%></b></td>
    <td width="8%" align="left" bgcolor="#CCCCCC">所评论文章</td>
    <td width="51%" align="left" bgcolor="#CCCCCC"><%
set rsnews=server.createobject("adodb.recordset") 
sql="select * from news where id="&rs("id")
rsnews.open sql,conn,1,1
newstitle=rsnews("title")
rsnews.close
set rsnews=nothing
%>
    <a href="../Articlenews.asp?id=<%=rs("id")%>" target="_blank" title="<%=newstitle%>"><%=left(newstitle,28)%></a></td>
    <td width="18%" align="center" bgcolor="#CCCCCC"><input name="DelID" type="checkbox" id="DelID" value="<%=rs("id")%>"><%if session("aleave")="check" then%>
      删除
        <%else%>
      <a href="javascript:DoEmpty('admin_pinglundel.asp?id=<%=rs("pinglunid")%>&amp;url=2');">删除</a>
    <%end if%> <a href="?action=all&amp;id=<%=rs("id")%>">查看所有评论</a></td>
  </tr>
  <tr>
    <td height="28" colspan="5" align="left" bgcolor="#F3F3F3"><font color="#FF0000"> &nbsp;<%=rs("pingluncontent")%></font> (<%=rs("pinglundate")%>)</td>
  </tr>
  <%
rs.movenext
if rs.eof then exit for
next
%>
<tr><td colspan="6"> <p align="center">
    <input type="checkbox" name="chkall" onClick="CheckAll(this.form)">
    全部选中 
    <input type="submit" name="Submit" value="删除所选文章" onClick="{if(confirm('该操作不可恢复！\n\n确实删除选定的留言？')){this.document.Prodlist.submit();return true;}return false;}">
  </p>
</td></tr></form>
  <tr valign="bottom">
    <td height="100%" colspan="6" align="center" ><form method="post" action="?newsid=<%= newsid %>">
      <%if page<2 then      
    response.write "首页 上一页&nbsp;"
  else
    response.write "<a href=?newsid="&newsid&"&page=1>首页</a>&nbsp;"
    response.write "<a href=?newsid="&newsid&"&page=" & page-1 & ">上一页</a>&nbsp;"
  end if
  if rs.pagecount-page<1 then
    response.write "下一页 尾页"
  else
    response.write "<a href=?newsid="&newsid&"&page=" & (page+1) & ">"
    response.write "下一页</a> <a href=?newsid="&newsid&"&page="&rs.pagecount&">尾页</a>"
  end if
   response.write "&nbsp;页次：<strong><font color=red>"&page&"</font>/"&rs.pagecount&"</strong>页 "
    response.write "&nbsp;共<b><font color='#ff0000'>"&rs.recordcount&"</font></b>条记录 <b>"&rs.pagesize&"</b>条记录/页"
   response.write " 转到：<input type='text' name='page' size=4 maxlength=10 value="&page&">"
   response.write " <input class=input type='submit'  value=' goto '  name='cndok'></span></p>"     
%>
    </form></td>
  </tr>
  <% 
end if
rs.close
set rs=nothing
%>
</table>
</body>
</html>
