<% Option Explicit %>
<!--#include file="../../Inc/Const.asp" -->
<!--#include file="../../Inc/Cls_DB.asp" -->
<%
Dim DBC,Conn
Set DBC = New DataBaseClass
Set Conn = DBC.OpenConnection()
Set DBC = Nothing
'==============================================================================
'软件名称：风讯网站信息管理系统
'当前版本：Foosun Content Manager System 2.0 
'最新更新：2004.12
'==============================================================================
'商业注册联系：028-85098980-601,602 技术支持：028-85098980-606、607,客户支持：608
'产品咨询QQ：159410,655071,66252421
'技术支持:所有程序使用问题，请提问到bbs.foosun.net我们将及时回答您
'程序开发：风讯开发组 & 风讯插件开发组
'论坛支持：风讯在线论坛(http://bbs.foosun.net)
'官方网站：www.Foosun.net  演示站点：test.cooin.com    
'网站建设专区：www.cooin.com
'==============================================================================
'免费版本请在新闻首页保留版权信息，并做上本站LOGO友情连接
'==============================================================================
%>
<!--#include file="../../Inc/Session.asp" -->
<%
    Dim NewsID,Titles,NewsModObj,Url,Types
		Types = Cstr(Request("Types"))
	    NewsID = Request("NewsID")
	Set NewsModObj = Conn.Execute("Select * from News where NewsID='"&NewsID&"'")
		If NewsModObj.Eof then
		   Response.Write("<script>alert(""参数传递错误"");window.close();")
		   Response.End
		End if
		if NewsModObj("HeadNewsTF")<>1 and NewsModObj("PicNewsTF")<>1 then
		   Titles = "新闻修改--文字新闻"
		   Url = "NewsModifyWords.asp?NewsID=" & NewsID
		elseif NewsModObj("HeadNewsTF")=1 then
		   Titles = "新闻修改--标题新闻"
		   Url = "NewsModifyTitle.asp?NewsID=" & NewsID
		else
		   Titles = "新闻修改--图片新闻"
		   Url = "NewsModifyPic.asp?NewsID=" & NewsID
		end if
		if Types = "Dell" then
		   Titles = "删除新闻"
		end if
		
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><% = Titles %></title>
</head>
<link href="../Inc/ModeWindow.css" rel="stylesheet">
<body scrolling=no bgcolor="#E6E6E6" topmargin="0" leftmargin="0">
<%If Types <> "Dell" then%>
<iframe src=<% = Url %> style="width:100%;height:100%;"  frameborder=0></iframe>
<%else%>
<form name="NewsDellForm" action="" method="post">
<table width="100%" border="0" cellspacing="5" cellpadding="0">
  <tr> 
    <td width="7%" height="5">&nbsp;</td>
    <td width="87%" height="5">&nbsp;</td>
    <td width="6%" height="5">&nbsp;</td>
  </tr>
  <tr> 
    <td>&nbsp;</td>
    <td><div align="center"><font color="#0000FF" size="3">您确定要</font><font color="#FF0000" size="3">删除<font color="#0000FF">此新闻?</font></font></div></td>
    <td>&nbsp;</td>
  </tr>
  <tr> 
    <td height="2">&nbsp;</td>
    <td height="2">&nbsp;</td>
    <td height="2">&nbsp;</td>
  </tr>
  <tr> 
    <td>&nbsp;</td>
    <td><div align="center"> 
        <input type="submit" name="Submit" value=" 确 定 ">
        <input type="hidden" name="action" value="trues">
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
        <input type="button" name="Submit2" value=" 取 消 " onClick="window.close();">
      </div></td>
    <td>&nbsp;</td>
  </tr>
  <tr> 
    <td height="5">&nbsp;</td>
    <td height="5">&nbsp;</td>
    <td height="5">&nbsp;</td>
  </tr>
</table>
</form>
<%end if%>
</body>
</html>
<%
  If Request.Form("action")="trues" then
	 Conn.Execute("delete from freejsfile where FileName=(select FileName from news where newsid='"&NewsID&"')")
     Conn.Execute("delete from news where newsid='"&NewsID&"'")
	 '-----------删除新闻文件-----------------------------
	 Response.Write("<script>alert(""新闻删除成功"");dialogArguments.location.reload();window.close();</script>")
  	 Response.End
  End If
%>