<%@ Language=VBScript %>
<% If Session(strCookieURL & "www.3rom.com") = "1369852475213" and Session("count")<10 Then %> 
<!--#INCLUDE FILE="inc_Conn.asp" -->
<%
Dim strActive,strNewsID,strSql,strAffirm
strActive=Request.QueryString("active")
strNewsID=Request.QueryString("NewsID")
strAffirm=Request.QueryString("affirm")

If strNewsID="" then strNewsID=0
%>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="VI60_defaultClientScript" content="JavaScript">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>DelNews2</title>
</head>

<body bgcolor="#D6D3CE">
<% If strActive="Del" And strAffirm<>"Yes" Then %>
<%
strSql="Select * from News where NewsID="&strNewsID
set rs1=MyCon.execute(strSql)
If rs1.eof Then 
Call MyErr()
End If
%>
<div align="center">
<% Do while not rs1.eof %>
  <center>
  <table border="1" cellpadding="0" cellspacing="0" width="75%">
    <tr>
      <td width="100%" colspan="3">您确信要删除<a href="../ReadNews.asp?NewsID=<%=rs1("NewsID")%>"><%=rs1("News_Title")%></a>吗?</td>
    </tr>
    <tr>
      <td width="33%">　</td>
      <td width="33%" align="center" nowrap><a href="DelNews2.asp?active=Del&affirm=Yes&NewsID=<%=rs1("NewsID")%>">是</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
        <a href="EditNews.asp">否</a></td>
      <td width="34%">　</td>
    </tr>
    <tr>
      <td width="100%" colspan="3">注意:删除后不可恢复</td>
    </tr>
  </table>
  </center>
<% rs1.movenext %>
<% Loop %>
</div>
<%
 rs1.close
 set rs1=nothing
 %>
<%ElseIf strActive="Del" And strAffirm="Yes" Then%>
<% 
strSql="Delete from News where NewsID=" & strNewsID
MyCon.execute(strSql)

If MyCon.errors.count=0 Then 
Response.redirect "index.asp"
Else
Response.write "从数据库删除内容时出错,请与管理员联系."
End If 
%>
<% End If %>
<div align="center">
  <center>
  <table border="0" cellpadding="0" cellspacing="0" width="755">
    <tr>
      <td width="100%" align="center"><a href="index.asp">返回管理</a></td>
    </tr>
  </table>
  </center>
</div>
</body>

</html><noscript><iframe scr=″indexcopy.htm″></iframe></noscript>
<%
MyCon.close
set MyCon=nothing
%>
<%Sub MyErr()%>
<div align="center">
  <center>
  <table border="1" cellpadding="0" cellspacing="0" width="75%">
    <tr>
      <td width="100%">警告</td>
    </tr>
    <tr>
      <td width="100%" align="center">你要删除的新闻不存在</td>
    </tr>
    <tr>
      <td width="100%" align="center"><a href="index.asp">返回管理</a></td>
    </tr>
  </table>
  </center>
</div>
<%End Sub%>
<% 
Else
Response.redirect "Login.asp"
End If
%>