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

📄 delmsg.asp

📁 网络教学管理系统
💻 ASP
字号:
<!--#include file="inc/conn.asp" -->
<!--#include file = "CheckLogin.asp" -->
<!--#include file = "inc/zhuru.asp" -->
<%
	Dim strID ,strSql ,rs ,rs1 ,strType ,strUrl
	strID = Request.QueryString("ID")
	strType = Request.QueryString("Type")
	If strType = "" Then
		strType = "r"
	End If
	
	If strType = "r" Then
		strUrl = "Index_Msg.asp"
	ElseIf strType = "s" Then
		strUrl = "Index_Msg_s.asp"
	End If
	If strID & "" = "" Then
		Response.Write("参数错误!")
		Response.End
	End If
	Set rs = Server.CreateObject("ADODB.RecordSet")
	strSql = "SELECT * FROM Msg WHERE ID ="& strID 
	rs.open strSql,conn,1,1
	If rs.EOF Then
		Response.Write("对不起,无此短信息!")
		Response.End
	Else
		If rs("ManTo") <> Session("UserName")  Then
			If rs("ManFrom") <> Session("UserName") Then
				Response.Write("对不起,你没有权限删除此短信息!")
				Response.End
			End If
		End If
	End If
	strSql = "DELETE FROM Msg  WHERE ID = "& strID
	Set rs1 = Server.CreateObject("ADODB.RecordSet")
	rs1.open strSql,conn,3,1
	Response.Redirect(strUrl)
%>

⌨️ 快捷键说明

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