<%
'商易仿淘宝4.0(多用户)
'ACCESS版演示网站：http://www.ftaobao.com(商易仿淘宝商城)
'SQL版演示网站：http://sql.ftaobao.com
'电话：0571-56907100
'QQ：1147100
%>
<%qx=4%>
<!--#include file="top.asp"-->
<!--#include file="check.asp"-->
<!--#include file="../include/conn.asp"-->
<!--#include file="../include/page.asp"-->
<!--#include file="../include/money.asp"-->
<link href="../include/css.css" rel="stylesheet" type="text/css">
<br />

    <table width="100%" border="0" align="center" cellpadding="4" cellspacing="1" class="tableborder">
<tr>
  <td height="25" align="center" valign="middle" background="images/admin_bg_4.gif" bgcolor="#FFFFFF"><span class="White_txt"><strong>评论管理</strong></span></td>
</tr>
<%
if request("abc")="zt" then
if request("zt")=1 then
conn.execute("Update huiyuan set je2=je2+1 where huiyuan=(select huiyuan from pinglun where id="&shopnet("id")&")")
else
conn.execute("Update huiyuan set je2=je2-1 where huiyuan=(select huiyuan from pinglun where id="&shopnet("id")&")")
end if
conn.execute("Update pinglun set zt="&shopnet("zt")&" where id="&shopnet("id")&"")
end if
if request("abc")="del" then
conn.execute("Delete * from pinglun where id="&shopnet("id")&"")
end if
Set rs=Server.CreateObject("ADODB.Recordset")
if request("lx")="" or isempty(request("lx")) then
lx=""
else
lx=" where lx="&clng(request("lx"))&""
end if
if request("key")="" then
key=""
else
key="where huiyuan like '%"&shopnet("key")&"%' or ping like '%"&shopnet("key")&"%'"
end if
sql="select * from pinglun "&lx&" "&key&" order by zt,id desc"
rs.open sql,conn,3,1 
if rs.eof then
response.Write("<tr><td height=""21"" bgcolor=""#FFFFFF""  align=""center"">暂时没有评论！</td></tr>")

else
page1("5")
i=1
do while not rs.eof and i<=rs.pagesize%>
    <tr>
    <td height=25 bgcolor="#fcfcfc">作者：<b><a href="leaguer/user.asp?abc=xs&page=1&id=<%=conn.execute("select id from huiyuan where huiyuan='"&rs("huiyuan")&"'")(0)%>"><%=rs("huiyuan")%></a></b>&nbsp;&nbsp;时间：<%=rs("sj")%>&nbsp;&nbsp;IP：<%=rs("ip")%>&nbsp;&nbsp;审核：<%if rs("zt")<>0 then
        response.write "<a href=?lx="&request("lx")&"&key="&request("key")&"&id="&rs("id")&"&cpid="&rs("cpid")&"&zt=0&page="&page&"&abc=zt><font color=red>已</font></a>"
      else
	response.write "<a href=?lx="&request("lx")&"&key="&request("key")&"&id="&rs("id")&"&cpid="&rs("cpid")&"&zt=1&page="&page&"&abc=zt>否</a>"
      End if
	  	response.write "|<a href=?lx="&request("lx")&"&key="&request("key")&"&id="&rs("id")&"&page="&page&"&abc=del>删</a>"
%></td>
  </tr>
  <tr>
    <td height=45 bgcolor="#FFFFFF">[<%=rs("lx")%>]<%=rs("ping")%><%If rs("hf")<>"" Then Response.Write("<br><font color=#ff6600>回复："&rs("hf")&"</font>")%></td>
  </tr>

<%i=i+1
rs.MoveNext                                              
loop 
Response.Write("<tr><td height=21 align=center bgcolor=#FFFFFF  ")
page2("lx="&request("lx")&"&key="&request("key")&"&")
end if
rs.close
set rs=nothing
conn.close
set conn=nothing

Response.Write("</td></tr>")%>
</table>
<table width="650" border="0" align="right" cellpadding="0" cellspacing="0">
    <tr align="center" valign="middle"> 
      
    <td width="33%" height="35">&nbsp;</td>
      <form name="form1" method="post" action="?">
      <td width="33%" height="35">作者、内容: 
        <input name="key" type="text" class="wenbenkuang" id="key" size="10"> <input name="Submit2" type="submit" class="go-wenbenkuang" value="查找"> 
      </td></form>
    </tr>
</table>
