📄 manudel.asp
字号:
<!-- #include file = "include/conndb.asp" -->
<!-- #include file = "include/checkuser.asp" -->
<%
dim strSQL, rsObj, rsProduct
dim intID
intID = RealString(Request.QueryString("id"))
'如果参数非法,防止传入类似 manuDel.asp?id=3 or 1=1
if not IsNumeric(intID) then
Response.Write "<script language = Javascript>"
Response.Write "alert('您输入的数据不合法!');"
Response.Write "window.history.go(-1);"
Response.Write "</script>"
Response.End
end if
strSQL = "SELECT * FROM ProductType WHERE SuperID = "&intID
set rsObj = Server.CreateObject("ADODB.RecordSet")
rsObj.Open strSQL, conn, adOpenKeyset, adLockReadOnly
if rsObj.eof then
strSQL = "SELECT * FROM Product WHERE ProductType = "&intID
set rsProduct = Server.CreateObject("ADODB.RecordSet")
rsProduct.open strSQL,conn,1,1
if rsProduct.eof then
strSQL = "DELETE FROM ProductType WHERE id = "&intID
'Response.Write strSQL
conn.Execute ( strSQL )
%>
<script language = Javascript>
<!--
alert("删除成功!");
this.document.location = "manuList.asp?id=<%=Request.Form("SuperID")%>";
-->
</script>
<%
else
%>
<script language = Javascript>
<!--
alert("该目录下有资料,请先删除资料");
window.history.go(-1);
-->
</script>
<%
end if
%>
<%
else
%>
<script language = Javascript>
<!--
alert("该目录下有子目录,请先删除子目录");
window.history.go(-1);
-->
</script>
<%
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -