<!--#include file="../conn/conn.asp" -->
<!--#include file="admin_check.asp" -->

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>Flash后台管理</title>
<style>
html,body,div,span,p,a,img,ul,li,dl,dt,dd,ol,form,label,form{ margin:0; padding:0; border:0; outline:0; font-size:100%;}
body{ font-size:12px;font-family:微软雅黑; line-height:150%; background-color:#eeeeee}
a{ font-size:12px; color:#000000; text-decoration:none;}
a:link{ color:#000000;}
a:visited{ color:#000000;}
a:hover{ text-decoration:underline; color:#FF6600;}
a:active{ color:#FF6600;}

a img {
	border:none;
}
.container{ width:1000px; margin:0 auto;}
.title{width:1010px; height:30px; margin-top:10px; background-image:url(img/untitled.png);}
.content{width:990px; background-color:#FFFFFF; padding-left:10px; padding-top:10px;padding-bottom:10px;padding-right:10px; line-height:200%}
.input1 {border-top:1px solid #ABADB3;border-left:1px solid #ABADB3;border-right:1px solid #ddd;border-bottom:1px solid #ddd;height:24px;width:400px;padding:0 5px;}
.input2 {border:1px solid #FFB334;outline:2px solid #ffdc97;*border:2px solid #FFB334;*padding:2px 5px;height:24px;width:400px;padding:0 5px;}
.right{width:150px;float:left}
.left{width:800px; padding-right:10px; float:left}
/********光标说明**************/
#pltsTipLayer
{
	FILTER: alpha(opacity=100);
	opacity: 1;
	background: #ffffff;
	color: #ff6600;
	border: 1px solid #dddddd;
}
.Bttd
{
	font-size:12px;
	border:0;
	padding-top:5px;
	padding-left:5px;
	padding-bottom:5px;
	padding-right:5px;
}



</style>
<SCRIPT LANGUAGE="JavaScript" src="js/help2.js"></SCRIPT>
</head>
<body>
<!--#include file="left.asp" -->
<div class="container">
<div class="title"><img src="img/orange.png" style="margin-left:10px; margin-top:5px; margin-right:10px;"><b>新闻管理</b> >>   <font color="#FF6600">新闻列表</u></font> | <a href="news_add.asp">新增新闻</a> | <a href="Nsort_list.asp">新闻分类列表</a> | <a href="Nsort_add.asp">新增新闻分类</a></div>
<div class="content">
<h2>新闻列表</h2><hr>所有分类 >> |
<%
S_id=Request.QueryString("S_id")
if S_id="" then
aa=""
else
aa="and S_id="&S_id
end if

sql="select * from Nsort order by S_id desc"
		set rs=Server.CreateObject("ADODB.RecordSet")
		rs.open sql,conn,1,1
		if not rs.eof then
		Do while Not rs.eof
		response.Write "<a href='news_list.asp?S_id="&rs("S_id")&"'>"&rs("S_title")&"</a> | "
		rs.movenext
		loop
	end if
set rs=nothing
%>
<hr>
<%
Action=trim(Request("Action"))
N_id=trim(Request("N_id"))


if action="del" then
conn.Execute ("delete from news where N_id="&N_id)
Response.Write"<script>alert('删除成功!');window.location='news_list.asp';</script>"
end if


sql="select N_id,N_title,S_title,N_pic from news,Nsort where N_sort=S_id "&aa&" order by N_id desc"
		set rs=Server.CreateObject("ADODB.RecordSet")
		rs.open sql,conn,1,1
		if not rs.eof then
		response.Write "<table width='100%' bgcolor='#eeeeee'><tr bgcolor='#F7F7F7'><td>ID</td><td>显示名称</td><td>缩图</td><td>所属分类</td><td>编辑</td><td>删除</td></tr>"
		Do while Not rs.eof
		response.Write "<tr onmouseout='this.style.backgroundColor=""""' onmouseover='this.style.backgroundColor=""#F7F7F7""' bgcolor='#ffffff'><td>"&rs("N_id")&"</td><td>"&rs("N_title")&"</td><td><img src='../"&rs("N_pic")&"' width='50' height='50' alt='<img src=../"&rs("N_pic")&">'></td><td>"&rs("S_title")&"</td><td><a href='news_add.asp?N_id="&rs("N_id")&"'><img src='img/iconedit.gif'>编辑</a></td><td><a href='news_list.asp?action=del&N_id="&rs("N_id")&"'><img src='img/icondel.gif'>删除</a></td></tr>"
		rs.movenext
		loop
	end if
	response.Write "</table>"
set rs=nothing
%>
</div>
</div>
</body>
</html>