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

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

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

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