<%dbdns="../../"%>
<!--#include file="../../inc/conn.asp"-->
<!--#include file="../cook.asp"-->
<%if fla3<>1 then
response.write "<script>alert('操作权限出错，您没有权限操作些功能');history.go(-1);</Script>"
Response.End 
end if%>
<%dim scasort

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

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

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