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

📄 del.asp

📁 gmaple软件下载系统1.0Beta 具有一下功能: 1.模板功能,前台的呈现更加灵活. 2.支持静态生成,可在动态与静态间随时切换. 3.在静态模式下,可自定义生成目录,生成方式灵活.
💻 ASP
字号:
<!--#include file="admin_include.asp"-->
<%
del_id = request.QueryString("del_id")
n = request.QueryString("n")
if del_id="" then
	call ShowErr("参数错误!","1")
end if
if n = 1 then		'删除分类,然后将被删除分类下的下载项目放入回收软件中
	sql="select SD_S_Class_Name from [S_Class] where SD_S_Class_Id in ("& del_id &")"
	rs.open sql,conn,1,1
	Class_Name=""
	while not rs.eof
		Class_Name=rs("SD_S_Class_Name")&";"&Class_Name
		rs.movenext
	wend
	rs.close
	sql="update [Soft] set SD_Soft_Del=0 where SD_Soft_id in ("& del_id &")"
	application.Lock()
	conn.execute(sql)
	application.UnLock()
	sql="delete * from [S_Class] where SD_S_Class_Id in ("& del_id &")"
	application.Lock()
	conn.execute(sql)
	application.UnLock()
	response.Redirect("Soft_Class.asp")
	
elseif n = 2 then		'删除软件
	sql="select SD_Soft_Name from [Soft] where SD_Soft_id in ("& del_id &")"
	rs.open sql,conn,1,1
	Soft_Name=""
	while not rs.eof
		Soft_Name=rs("SD_Soft_Name")&";"&Soft_Name
		rs.movenext
	wend
	rs.close
	sql="update [Soft] set SD_Soft_Del=0 where SD_Soft_id in ("& del_id &")"
	application.Lock()
	conn.execute(sql)
	application.UnLock()
	response.Redirect("Soft.asp")
	'response.Write("删除成功,删除项目可在软件回收中找回!")
	
elseif n = 3 then		'回收软件
	sql="select SD_Soft_Name from [Soft] where SD_Soft_id in ("& del_id &")"
	rs.open sql,conn,1,1
	Soft_Name=""
	while not rs.eof
		Soft_Name=rs("SD_Soft_Name")&";"&Soft_Name
		rs.movenext
	wend
	rs.close
	sql="update [Soft] set SD_Soft_Del=1 where SD_Soft_id in ("&del_id&")"
	application.Lock()
	conn.execute(sql)
	application.UnLock()
	response.Redirect("Soft_re.asp")
	
elseif n = 4 then		'彻底删除软件 
	sql="select SD_Soft_Name from [Soft] where SD_Soft_id in ("& del_id &")"
	rs.open sql,conn,1,1
	Soft_Name=""
	while not rs.eof
		Soft_Name=rs("SD_Soft_Name")&";"&Soft_Name
		rs.movenext
	wend
	rs.close
	sql="delete * from [Soft] where SD_Soft_id in ("& del_id &")"
	application.Lock()
	conn.execute(sql)
	application.UnLock()
	response.Redirect("Soft_Re.asp")
	
elseif n = 5 then	'删除管理员
	sql="select SD_Admin_Login from [Admin] where SD_Admin_Id in ("& del_id &") and SD_Admin_Id<>"&Session("Admin_Id")
	rs.open sql,conn,1,1
	Admin_Login=""
	while not rs.eof
		Admin_Login=rs("SD_Admin_Login")&";"&Admin_Login
		rs.movenext
	wend
	rs.close
	sql="delete * from [Admin] where SD_Admin_Id in ("&del_id&")"
	application.Lock()
	conn.execute(sql)
	application.UnLock()
	response.Redirect("Admin.asp")
elseif n = 6 then	'下载服务器
	sql="delete * from [Server] where SD_Server_Id in ("&del_id&")"
	application.Lock()
	conn.execute(sql)
	application.UnLock()
	response.Redirect("Soft_Server.asp")
elseif n = 7 then	'友情链接
	sql="delete * from [Link] where friend_id in ("&del_id&")"
	application.Lock()
	conn.execute(sql)
	application.UnLock()
	response.Redirect("Link.asp")
elseif n = 8 then	'删除专题
	sql="delete * from [SD_Topic] where SD_Topic_id in ("&del_id&") or SD_Topic_Parent in ("&del_id&")"
	application.Lock()
	conn.execute(sql)
	application.UnLock()
	sql="delete * from [Templet] where SD_templet_type='Topic' and SD_templet_project in ("&del_id&")"
	application.Lock()
	conn.execute(sql)
	application.UnLock()
	response.Redirect("Topic.asp")
end if
%>

⌨️ 快捷键说明

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