<%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%>
<%dim newssort

if request("action")="add" then
newssort=request("newssort")
if newssort="" then
	response.write "<script>alert('对不起，分类不能为空！');history.go(-1);</Script>"
	Response.End 
end if
set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from dlxf_xxnewssort" 
rs.open sql,conn,1,3
rs.AddNew
rs("dlxf_newssort")=newssort
rs.Update
rs.Close
set rs=nothing
Response.Redirect "news_sort.asp"
end if

if request("action")="edit" then
newssort=request("newssort")
if newssort="" then
	response.write "<script>alert('对不起，分类不能为空！');history.go(-1);</Script>"
	Response.End 
end if
set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from dlxf_xxnewssort where dlxf_id="&request("id")
rs.open sql,conn,1,3
rs("dlxf_newssort")=newssort
rs.Update
rs.Close
set rs=nothing
Response.Redirect "news_sort.asp"
end if

if request("action")="aa" then
set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from dlxf_xxnewssort where dlxf_id="&request("id")
rs.open sql,conn,1,3
rs("dlxf_date")=now()
rs.Update
rs.Close
set rs=nothing
Response.Redirect "news_sort.asp"
end if%>
