⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 save_shequ.asp

📁 商城源码程序(上海数字商城整站) 功能列表: 商品管理
💻 ASP
字号:
<!--#include file="conn.asp"-->
<%call time_out()%>
<%
if instr(session("proview"),"s4")=0  then
response.Write "<script language=javascript>alert('您无权操作!');window.location.href='index.asp';</script>"
response.end
end if%>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>

<body>
<%
action=trim(request("action"))
sqid=trim(request("sqid"))
select case action
case "add"
if trim(request("sqname"))="" then
response.Write "<script language=javascript>alert('社区类别不能为空!');window.location.href='shequ.asp';</script>"
response.end
end if

sql="select * from shequ_big"
    set rs=server.CreateObject("adodb.recordset")
	rs.open sql,conn,1,3
	rs.addnew
	rs("sqname")=triM(request("sqname"))
	rs.update
	rs.close
	set rs=nothing
	response.Redirect("shequ.asp")

'修改
case "edit"
sql="select * from shequ_big where sqid="&sqid
    set rs=server.CreateObject("adodb.recordset")
	rs.open sql,conn,1,3
	rs("sqname")=triM(request("sqname"))
	rs.update
	rs.close
	set rs=nothing
	response.Redirect("shequ.asp")
'删除
case "del"
'判断是否可以删除
sql1="select sqid from shequ where sqid="&sqid
set rs=server.createobject("adodb.recordset")
rs.open sql1,conn,1,1
if not rs.eof then
response.Write "<script language=javascript>alert('社区中有该分类信息,不可删除!');window.location.href='shequ.asp';</script>"
response.end
end if
rs.close
set rs=nothing

sql="select * from shequ_big where sqid="&sqid
    set rs=server.CreateObject("adodb.recordset")
	rs.open sql,conn,1,3
    rs.delete
	rs.update
	rs.close
	set rs=nothing
	response.Redirect("shequ.asp")

end select
%>
</body>
</html>

⌨️ 快捷键说明

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