 <% 
	data_path="../../" 
	numid="51"
	dir="../err.asp" 
  %>
 <!--#include file="../../conn/conn.asp"--> 
 <!--#include file="../../inc/safe.asp"-->
 <%
if not isempty(request("selAnnounce")) then
newsidlist=request("selAnnounce")
if instr(newsidlist,",")>0 then
dim newsidarr
newsidArr=split(newsidlist)
dim log_newsid
for i = 0 to ubound(newsidarr)
log_newsid=clng(newsidarr(i))
call deleteannounce(log_newsid)
next
else
call deleteannounce(clng(newsidlist))
end if
end if

%>
<%
di=Request("di")
typeid=request("typeid")
set rss=server.CreateObject("adodb.recordset")
sq1="select * from websen_newsType where newsid="&di
rss.open sq1,conn,1,1
typeid=rss("type")
rss.close
set rs=server.CreateObject("adodb.recordset")
sql="select * from websen_Review where pl_newsid="&di&" order by id DESC"
aa=rs("pl_typeid")
cc=rs("pl_newsid")
rs.open sql,conn,1,3

if not rs.eof then
msg_per_page=15 
%>
<html>
<head>
<title>评论信息管理</title>
<SCRIPT language=javascript1.2 src="../css/iXs_Main.js"></SCRIPT>
<script>
var checkflag="false";
function check(field){
if(checkflag=="false"){
for(i=0;i<field.length;i++){
field[i].checked=true;}
checkflag="true";
return "解除全选"; }
else {
for(i=0;i<field.length;i++) {
field[i].checked=false;}
checkflag="false";
return "选择全部";}}
</script>
<script>
function sc(a,b,di)
 {
   if(window.confirm('确定要删除吗？'))
   {     
		window.location.href="delete.asp?cc="+a+"&di="+<%=rs("pl_newsid")%>
		window.location.href="tz.asp?di="+<%=di%>
	}      
		
  }
</script>
</head>
<link href="../../<%=lujing%>css/style.css"  rel="stylesheet" type="text/css">
<body>
<form name="form_reg" method="post" action='chakan.asp?di=<%=Request("di")%>'>
<!--#include file="../../inc/headpage.asp"-->
  <table  border="0" align="center" cellpadding="2" cellspacing="1" class="tableBorder" width="100%">
    <tr >
      <td width="28%" align="center"><font color="ff6600">文章名称</font></td>
      <td width="32%" align="center"><font color="ff6600">评论内容</font>      </td>
      <td width="11%" align="center"><font color="ff6600">评论名称</font></td>
      <td width="19%" align="center"><font color="ff6600">时间</font></td>
      <td width="10%" align="center" class=forumrowHighLight><font color="ff6600"> <font color='ff6600'>删除</font></a><font color="ff6600">
        <input name="submit2" type='submit' value='删除'  >
      </font></font></td>
    </tr>
    <%
	page=request.QueryString("page")
	if IsNumeric(page) then 
page=cint(page) 
if page<1 then page=1 
else 
end if 
if rs.eof or rs.bof then 
rs.close 
set rs=nothing 
response.write "未添加数据" 
response.end()
else 

dim intReCun,intPaCun,icolor
intReCun=rs.Recordcount  
intPage=rs.pagecount 
if page>intPage then page=intPage  end if
rs.absolutepage=page 
do while not rs.eof and rowcount > 0

wz_Application=rs("pl_title")
pL_name=rs("pL_name")
pl_shu=rs("pl_shu")
pl_nrong=rs("pl_nrong")

%>

    <tr>
      <td height="24" align="left" class=forumRow><font color="#135294">〖<a href="<%=HOPE_InstallDir%>info/shownews.asp?newsid=<%=rs("pl_newsid")%>" target="_blank"><strong><%=left(rs("pl_title"),13)%>...</strong></a>〗</font></td>
      <td align="left" class=forumRow  id="aaa" style="word-break:break-all"><a href="#" alt="<%=rs("pl_nrong")%>"><%=pl_nrong%>...</a></td>
      <td align="center" class=forumRow><%=pL_name%></td>
      <td align="center" class=forumRow><font color="#135294"><%=rs("pl_time")%></font></td>
      <td align="center" class=forumRow><font color="#135294">
        <%
	 response.write ("<a href='javascript:sc("&rs("id")&")' ><font color='#135294'>删除</font></a>")%>
      </font><input type='checkbox' name='selAnnounce' value='<%=cstr(rs("id"))%>'></td>
    </tr>
	<%

icolor=icolor+1
if icolor>1 then icolor=0
rowcount=rowcount-1
rs.movenext
loop
end if
%>
    <tr>
      <td class=forumRow align="right" colspan="5"><input name="button" type=button onClick="this.value=check(this.form)" value=" 全部选定 "></td>
    </tr>
    <tr>
      <td class=forumrowHighLight align="center" colspan="5"><%=listPages("chakan.asp?di="&di&"&typeid="&typeid&"")%></td>
    </tr>
  </table>
</form>
</body>
</html>

<%
sub deleteannounce(newsid)
dim rs,sql, RsInfo
set rsk=server.createobject("adodb.recordset")
sqk="delete from [websen_Review] where id="&cstr(newsid)
conn.execute sqk

set rss=server.CreateObject("adodb.recordset")
sq="select * from websen_news where newsid="&cstr(newsid)

End sub


else
response.write "<html><link href='../../"&lujing&"css/style.css'  rel='stylesheet' type='text/css'>"
response.write "<body oncontextmenu='window.event.returnValue=false'><style type='text/css'><!--body {background-color: #C4D8ED;}--></style>"
response.write "<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p>"
response.write"<style type='text/css'>#Layer1 {position:absolute;width:200px;height:33px;z-index:1;}</style>"
response.Write("<script>alert('没有相关评论！');window.location.href='reviewpl_delete.asp?typeid="&typeid&"';</script>")
response.write "</body></html>"

end if

rs.close

response.write "<!--#include file=../../"&lujing&"copy.asp-->"
response.write "<!--#include file=../../"&lujing&"rolecheck.asp-->"
%>