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

📄 del.asp

📁 这是一套基于WEB的网站管理系统
💻 ASP
字号:
<!--#include file="config.asp"-->
<%
If Newasp.CheckPost = False Then
	Call OutAlertScript("<li>您提交的数据不合法,请不要从外部提交。</li>")
	Response.End
End If

If Cint(Newasp.membergrade) = 999 Or Trim(Session("AdminName")) <> "" Then
	If Newasp.ChkNumeric(Request("guestid")) > 0 Then
		If Newasp.ChkNumeric(Request("replyid")) > 0 Then
			Call DelGuestReply
		Else
			Call DelGuestBook
		End If
	Else
		Call OutAlertScript("错误的系统参数!")
	End If
Else
	Call OutAlertScript("本页面为管理专用,您没有权限登陆本页!")
End If
CloseConn
'================================================
'过程名:DelGuestBook
'作  用:删除留言
'================================================
Sub DelGuestBook()
	Dim guestid
	If Not IsNumeric(Request("guestid")) Then
		Call OutAlertScript("错误的系统参数!")
		Exit Sub
	Else
		guestid = CLng(Request("guestid"))
	End If
	Newasp.Execute("DELETE FROM NC_GuestBook WHERE guestid="& guestid)
	Newasp.Execute("DELETE FROM NC_GuestReply WHERE guestid="& guestid)
	Call OutputScript("删除留言成功!","index.asp")
End Sub
'================================================
'过程名:DelGuestReply
'作  用:删除回复留言
'================================================
Sub DelGuestReply()
	Dim replyid,guestid
	If Not IsNumeric(Request("replyid")) Or Not IsNumeric(Request("guestid")) Then
		Call OutAlertScript("错误的系统参数!")
		Exit Sub
	Else
		replyid = CLng(Request("replyid"))
		guestid = CLng(Request("guestid"))
	End If
	Newasp.Execute("DELETE FROM NC_GuestReply WHERE id="& replyid)
	Newasp.Execute ("UPDATE NC_GuestBook SET ReplyNum=ReplyNum-1 WHERE guestid="& guestid)
	Call OutputScript("删除回复成功!","index.asp")
End Sub
%>

⌨️ 快捷键说明

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