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

📄 delete.asp

📁 711房产管理系统
💻 ASP
字号:
<!--#include file="tc.asp"-->
<!--#include file="conn.asp"-->
<!--#include file="pass.asp"-->
<!--#include file="head.asp"-->
<% 
  id=Request.Querystring("id")
  if id="" or isnull(id) then
     Response.Redirect("login.asp")
  end if
  sql="select news_content from [imgbook] where ID=" & id
  set rs=server.CreateObject("Adodb.recordset")
  rs.open sql,conn,1,1
  if instr(rs("news_content"),"upload/") then
	   imgpath=Replace(Replace(rs("news_content"),"upload",""),"/","")
	   imgpath=trim(imgpath)
	   'response.Write(imgpath)
	   set fso = Server.Createobject("Scripting.FileSystemObject") 
	   path = server.MapPath("../upload/" & imgpath)
	   fso.DeleteFile(path)
	   set fso = nothing 
	   conn.execute("delete * from imgbook where ID=" & id)
  else
       conn.execute("delete * from imgbook where ID=" & id)
  end if

Response.Write"<script language=JavaScript>"
Response.Write"alert(""恭喜!图片删除成功"");"
Response.Write"window.location='add.asp';"
Response.Write"</script>"
%>

⌨️ 快捷键说明

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