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

📄 goodsdelt.asp

📁 一个比较好的
💻 ASP
字号:
<!--#include File="../conndb.asp"-->
<!--#include file="isAdmin.asp"-->
<html>

<head>
<title>删除商品信息</title>
</head>
<body>
<%
  Dim ids
  ids = Request.QueryString("id")
  sql = "Select * From Goods Where id In ("&ids&")"
    
  Set Rs = Conn.Execute(sql)
  Do While Not Rs.Eof
    '删除图片
    filename = Server.MapPath("images\"&Rs("imageFile"))
    Set MyFileObject=Server.CreateObject("Scripting.FileSystemObject")
    If (MyFileObject.FileExists(trim(filename))) Then
      MyFileObject.DeleteFile trim(filename)
    End If
    Rs.MoveNext()
  Loop
  '删除商品记录
  sql = "Delete From Goods Where id In ("&ids&")"
  Conn.Execute(sql)

  Set Rs = Nothing
  Conn.Close()
%>
</body>
<script language="JavaScript">
  alert("成功删除!");
  location.href = "GoodsList.asp?flag=0";
</script>

</html>

⌨️ 快捷键说明

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