<%dbdns="../../"%>
<!--#include file="../../inc/conn.asp"-->
<!--#include file="../cook.asp"-->
<%if fla15<>1 then
response.write "<script>alert('操作权限出错，您没有权限操作些功能');history.go(-1);</Script>"
Response.End 
end if%>
<%
if request("action")="del" then
conn.execute("delete from dlxf_xxnewssort where dlxf_id=" & request("id"))

set Fs = Server.CreateObject("Scripting.FileSystemObject")
set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from dlxf_xxnews where dlxf_newssort=" & request("id")
rs.open sql,conn,1,1
do while not rs.eof
filename="../../html/xxnews/"&year(rs("dlxf_date"))&month(rs("dlxf_date"))&"/"&replace(replace(replace(rs("dlxf_date"),"-",""),":","")," ","")&".html"
If Fs.FileExists(server.mappath(filename)) Then
set Os = Fs.GetFile(server.mappath(filename))
Os.Delete
end if
conn.execute("delete from dlxf_leaveword where dlxf_book_sort=6 and dlxf_book_table="&rs("dlxf_id")&"")
rs.movenext
loop
rs.close
set rs=nothing
set fs=nothing

conn.execute("delete from dlxf_xxnews where dlxf_newssort=" & request("id"))
end if%>
<%=citycss%>
<br>
<table width="95%" height="0" border="1" align="center" cellpadding="0" cellspacing="0" bordercolorlight="#6C90D1" bordercolordark="#FFFFFF">
  <form name="form1" method="post" action="news_sort_save.asp?action=add">
    <tr align="center" bgcolor="#D6DFF7"> 
      <td width="29%" height="25">添加分类</td>
      <td width="37%"><input type="text" name="newssort"></td>
      <td width="34%"><input type="submit" name="Submit" value="添加" class=input1></td>
    </tr>
  </form>
</table>
<br>
<!--#######################################################################-->
<table width="95%" height="0" border="1" align="center" cellpadding="0" cellspacing="0" bordercolorlight="#6C90D1" bordercolordark="#FFFFFF">
<tr align=center>
<%sql="select * from dlxf_xxnewssort order by dlxf_date desc"
set rs=Server.CreateObject("ADODB.Recordset")                                                    
rs.open sql,conn,1,1 
if (rs.eof and rs.bof) then
	response.write "<td height=20 colspan=3>暂无内容</td>"
else                                                 
n=0
do while not rs.eof
n=n+1%>
<td width="20%" height="25"><a href=news_sort.asp?id=<%=rs("dlxf_id")%>&newssort=<%=rs("dlxf_newssort")%>><%=rs("dlxf_newssort")%></a> <a href=news_sort_save.asp?id=<%=rs("dlxf_id")%>&action=aa><font color=#6C90D1>排序</font></a></td>
<%if n mod 5=0 then response.write("</tr><tr align=center>")
rs.movenext
loop
end if
rs.close
set rs=nothing%>
</tr>
</table>
<!--#######################################################################-->
<%if request("newssort")<>"" then%>
<br>
<table width="95%" height="0" border="1" align="center" cellpadding="0" cellspacing="0" bordercolorlight="#6C90D1" bordercolordark="#FFFFFF">
  <form name="form1" method="post" action="news_sort_save.asp?action=edit&id=<%=request("id")%>">
    <tr align="center" bgcolor="#D6DFF7"> 
      <td width="29%" height="25">修改分类</td>
      <td width="37%"><input type="text" name="newssort" value="<%=request("newssort")%>"></td>
      <td width="34%"><input type="submit" name="Submit" value="修改" class=input1>　　<a href=news_sort.asp?id=<%=request("id")%>&action=del>删除</a></td>
    </tr>
  </form>
</table>
<%end if%>