<!--#include file="Conn.asp"-->
<!--#include file="cookies.asp"-->
<%
IF request("C")="D" THEN
id=trim(request("id"))
ArrayID = Split(id,",")
For i=0 TO ubound(ArrayID)
conn.execute("delete from [sd_pinglun] where id="&CInt(ArrayID(i))&"")'删除评论ID
Next
For i=0 TO ubound(ArrayID)
conn.execute"update [sd_show] set sd_pinglun=sd_pinglun-1 where id="&CInt(ArrayID(i)) '评论数减1
Next
Response.redirect"sd_listping.asp"
Response.end
END IF
%>
<HTML>
<HEAD>
<title>狗扑社区 www.gope.cn</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"> 
<LINK href="images/Admin_css.css" type=text/css rel=stylesheet>
<SCRIPT language=javascript>
function loadThreadFollow(t_id,b_id){
	var targetImg =eval("document.all.followImg" + t_id);
	var targetDiv =eval("document.all.follow" + t_id);
	
	if ("object"==typeof(targetImg)){
		if (targetDiv.style.display!='block'){
			targetDiv.style.display="block";
			
		}else{
			targetDiv.style.display="none";
		}
	}
}
function CheckAll(form)
  {
  for (var i=0;i<form.elements.length;i++)
    {
    var e = form.elements[i];
    if (e.name != 'chkall')
       e.checked = form.chkall.checked;
    }
  }
function INtitle(addtitle) { 
var revisedtitle; 
revisedtitle = addtitle; 
document.form1.title.value=revisedtitle + document.form1.title.value; 
document.form1.title.focus(); 
return; 
}
function loadForm()
{
  editor.HtmlEdit.document.body.innerHTML=document.form1.Content.value;
  return true
}
</SCRIPT>
</HEAD>
<BODY>
<table width="95%" border="0" cellspacing="2" cellpadding="3"  align=center class="admintable" style="margin-bottom:5px;">
    <tr>
      <td height="25" bgcolor="f7f7f7">
    <FORM name="sou1" action="?seo=1" method="POST">
    按评论IP查找：
    <input type="text" name="T1" size="10" class="s26">
    <input type="submit" value="查 找" name="B1" class="bnt">
    </form></td>
    </tr>
</table>
<FORM name="thisForm" action="?C=D" method="POST">
<%
dim ThisPage,Pagesize,Allrecord,Allpage
if request("page")="" then
  ThisPage=1		
else
  ThisPage=request("page")
end if
seo=request("seo")
set rs = Server.CreateObject("ADODB.RecordSet")
set rs1 = Server.CreateObject("ADODB.RecordSet")
Select Case seo
Case "1"
sql = "select * from [sd_pinglun] where sd_ip like '%"&trim(request("T1"))&"%' order by sd_datas desc"
Case "2"
sql = "select * from [sd_pinglun] where sd_shenhe=0 order by sd_datas desc"
Case Else
sql="select * from [sd_pinglun] order by sd_datas desc"
End Select
rs.open sql,conn,1,1
if rs.eof then
response.write "<li>还没有用户数据！"
response.end
end if
rs.Pagesize=20
Pagesize=rs.Pagesize
Allrecord=rs.Recordcount
Allpage=rs.Pagecount
if ThisPage<1 then                           
ThisPage=1
end if
On Error Resume Next
rs.move (ThisPage-1)*Pagesize
k=0
%>
<table height="1" border="0" cellpadding="3"  cellspacing="1" bgcolor="#F2F9E8" class="admintable1">
  <tr>
    <td colspan="11" class="admintitle">所有评论语管理</td>
  </tr>
  <tr bgcolor="E8FBD1" align="center">
    <td width="4%" height="30">序号</td>
    <td width="21%">商家名称</td>
    <td width="18%">评测人|评论IP|所属地区</td>
    <td width="25%">评测标题</td>
    <td width="8%">评测时间</td>
    <td width="4%">速度</td>
    <td width="4%">性价</td>
    <td width="4%">服务</td>
    <td width="4%">安全</td>
    <td width="4%">操作</td>
    <td width="4%">选择</td>
  </tr>
  <%
  dim id
  do while not rs.eof
  id=rs("id")
  %>
	<tr align="center" bgcolor="#FFFFFF">
	<td height="30"><%=k+1%></td>
	<td><%set rsc = Server.CreateObject("ADODB.RecordSet")
sql = "select id,sd_name from sd_show where id="&rs("sd_show_id")&""
rsc.open sql, conn,1,1
%>
<a href="../sd_show.asp?id=<%=rsc("id")%>" target="_blank"><%=rsc("sd_name")%></a>
<%rsc.close
set rsc=nothing%></td>
	<td><%=rs("sd_name")%>|<a title="<%=rs("sd_dq")%>"><%=rs("sd_ip")%></a></td>
	<td><%=rs("sd_biaoti")%></td>
	<td><%=datevalue(rs("sd_datas"))%></td>
	<td><%=rs("sd_sd")%></td>
	<td><%=rs("sd_xj")%></td>
	<td><%=rs("sd_fu")%></td>
	<td><%=rs("sd_aq")%></td>
	<td><font color="#FF0000"><span id="followImg<%=k%>" style="CURSOR: hand" onclick="loadThreadFollow(<%=k%>,5)">面版</span></font></td>
	<td><input type="checkbox" name="id" value="<%=rs("id")%>"></td>
	</tr>
  <tr style="display:none" id="follow<%=k%>" height="30">
    <td colspan="6">&nbsp;内容：<%=rs("sd_content")%></td>
    <td colspan="5"><div align="center"><a href="sd_Manage.asp?C=E&id=<%=rs("sd_show_id")%>">设置管理密码</A>&nbsp; <a onclick='{if(confirm("您确定删除吗？！")){return true;}return false;}' href="?C=D&id=<%=trim(rs("id"))%>&cid=<%=trim(rs("sd_show_id"))%>">直接删除</a></div></td>
  </tr>
    <%
    k=k+1
    rs.movenext
    if k>=Pagesize then exit do
	loop
	rs.close
    set rs=nothing
    set rs1=nothing
    closedb
	%>
<tr>
<td height="30" colspan="11"><input type="checkbox" name="chkall" onClick="javascript:CheckAll(this.form)"> 
  全选记录
  <input type="submit" value="删除" name="action" onClick="{if(confirm('确定删除选定的吗?')){this.document.thisForm.submit();return true;}return false;}">
  共有&nbsp;<font color="#CC5200"><%=Allrecord%></font>&nbsp;条记录 共 <font color="#CC5200"><%=Allpage%></font> 页 现在是第 <font color="#CC5200"><%=ThisPage%></font> 页
<%
if ThisPage<2 then     
response.write "<font color=""#808080"">首页</font>&nbsp;"
response.write "<font color=""#808080"">上一页</font>&nbsp;"     
else     
response.write "<a href=?page=1&t1="&trim(request("t1"))&"&seo="&seo&">首页</a>&nbsp;"
response.write "<a href=?page=1&t1="&trim(request("t1"))&"&seo="&seo&">上一页</a>&nbsp;"     
end if
if Allpage-ThisPage<1 then     
response.write "<font color=""#808080"">下一页</font>&nbsp;"
response.write "<font color=""#808080"">尾页</font>&nbsp;"  
else     
response.write "<a href=?page="&(ThisPage+1)&"&t1="&trim(request("t1"))&"&seo="&seo&">下一页</a>&nbsp;"   
response.write "<a href=?page="&Allpage&"&t1="&trim(request("t1"))&"&seo="&seo&">尾页</a>&nbsp;"     
end if
%></td></tr>
</table>
</form>
<!--#include file="sd_copy.asp"-->
</BODY> 
</HTML>
