<!--#include file="0.asp"--><!--#include file="../../conn/zkconn.asp"-->
<html>
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../../css/css.css" type="text/css">
<body>
<div align="center"><br>
  注意：为了保证网站已发布信息的安全性和合法性，所有产品评论只有经过网店管理员审核或回复后，才能在网店前台显示。<br>
</div>
<table width="650" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC" style="TABLE-LAYOUT: fixed">
  <tr bgcolor="#f1f1f1"> 
    <td width="50" height="25" align="center" valign="middle">ID</td>
    <td height="25" align="center" valign="middle">评论产品</td>
    <td width="100" height="25" align="center" valign="middle">评论人</td>
    <td width="120" align="center" valign="middle">评论时间</td>
    <td width="50" align="center" valign="middle">状态</td>
    <td width="50" align="center" valign="middle">回复</td>
    <td width="50" height="25" align="center" valign="middle">删除</td>
  </tr>
  <%
if request("x")="yes" then
conn.execute("Update ping set zt=1 where id="&request("id")&"")
end if
if request("del")="yes" then
set rs = conn.execute("select id from user_name where name='"&session("www.loogoo.com")&"'")
userid=rs("id")
rs.close
set rs = conn.execute("select userid from ping where id="&Request("id")&"")
userid2=rs("userid")
rs.close
if userid=userid2 then
conn.execute("Delete ping where id="&Request("id")&"")
Response.redirect "ping.asp"
else
Response.Write("对不起，您不能删除该条产品信息。如有疑问请与网站管理员联系。")
end if
end if
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "Select * From ping where userid in(select id from user_name where name='"&session("www.loogoo.com")&"') Order By id DESC", conn, 3, 2
if rs.eof then
Response.Write("<tr bgcolor=#ffffff><td height=25 colspan=7 align=center valign=middle>暂无产品评论</td></tr>")
response.end
end if
rs.pagesize = 8
if request("page")=""  or isempty(request("page")) then
page = 1
else
page=int(request("page"))
end if
if page>rs.pagecount then
page=rs.pagecount
end if
if not rs.BOF then
Rs.Move Rs.PageSize*(page-1)
end if
i=1
do while not rs.eof and i<=rs.pagesize
%>
  <tr bgcolor="#FFFFFF"> 
    <td width="50" height="25" align="center" valign="middle"><font color="#FF0000"><%=i%></font></td>
    <td height="25" valign="middle"><a href="/product.asp?id=<%=rs("cpid")%>" target=_blank><%=rs("cpid")%>号产品</a></td>
    <td width="100" height="25" align="center" valign="middle">
      <%if rs("name")="" then
				  Response.Write("匿名")
				  else
				  Response.Write(""&rs("name")&"")
				  end if%>
    </td>
    <td width="120" align="center" valign="middle"><font color="#666666"><%=rs("sj")%></font></td>
    <td width="50" align="center" valign="middle"><a href="?x=yes&id=<%=rs("id")%>"><% Select case rs("zt")
   case "0"
        Response.Write("<font color=#ff3300>未审核</font>")
   case "1"
	   Response.Write("<font color=#000000>显示</font>")
End Select
 %></a></td>
    <td width="50" align="center" valign="middle"><a href="#" OnClick="Javascript:window.open('hf-ping.asp?id=<%=rs("id")%>','','width=350,height=200,top=20,left=180')">回复</a></td>
    <td width="50" height="25" align="center" valign="middle"> <a href="?del=yes&id=<%=rs("id")%>">删除</a></td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td colspan="7" style="WORD-WRAP: break-word"> <%=rs("ping")%>
      <% if rs("hf")<>"" then Response.Write "<br><font color=#FF6600>【评论回复】"&rs("hf")&"</font>" %> </td>
  </tr>
  <%
i=i+1
 rs.MoveNext                                              
 loop 
%>
  <tr bgcolor="#f1f1f1"> 
    <form name=form method=post action=?>
      <td height="25" colspan="7" align="center" valign="middle"> <%
if rs.recordcount<>0 then
if page-1 mod 10=0 then
		p=(page-1) \ 10
	else
		p=(page-1) \ 10
	end if

	response.write "页次："& page &"/"& rs.pagecount &"页 每页"& rs.pagesize &" 共"& rs.recordcount &"条记录"&_
					" 分页："
        if rs.pagecount>1 and page<>1 then response.write "<a href=?page=1 title='首页'>[|<]</a> "
	if p*10>0 then response.write "<a href='?page="&p*10&"' title=上十页>[&lt;&lt;]</a>   "
    uming_i=1
	for ii=p*10+1 to P*10+10
		   if ii=page then
	          response.write "<font color=#ff0000>["+Cstr(ii)+"]</font> "
		   else
		      response.write "<a href='?page="&ii&"'>["+Cstr(ii)+"]</a>   "
		   end if
		if ii=rs.pagecount then exit for
		 uming_i=uming_i+1
	next
	if ii<=rs.pagecount and uming_i=11 then response.write "<a href='?page="&ii&"' title=下十页>[&gt;&gt;]</a>   "
        if rs.pagecount>1 and page<>rs.pagecount then response.write "<a href=?page="& rs.pagecount &" title='尾页'>[>|]</a>"
response.write(" 　跳页：<input type=text name=page size=2 maxlength=3 class=wenbenkuang> <input type=submit name=Submit value=Go class=go-wenbenkuang>")
end if
rs.close
set rs=nothing%> </td>
    </form>
  </tr>
</table>

</body>
</html>
