sca_sort_save.asp

来自「一个诚信信息港门户网 功能: 系统设置  企业会员  个人」· ASP 代码 · 共 52 行

ASP
52
字号
<%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 SMT_scasort" 
rs.open sql,conn,1,3
rs.AddNew
rs("SMT_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 SMT_scasort where SMT_id="&request("id")
rs.open sql,conn,1,3
rs("SMT_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 SMT_scasort whereSMT_ id="&request("id")
rs.open sql,conn,1,3
rs("SMT_date")=now()
rs.Update
rs.Close
set rs=nothing
Response.Redirect "sca_sort.asp"
end if%>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?