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

📄 delscontent.asp

📁 网络教学管理系统
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
body,td,th {
	font-size: 12px;
}
body {
	background-color: #B1DB99;
}
-->
</style>
</head>
<!--#include file="inc/conn.asp" -->
<!--#include file = "CheckLogin.asp" -->
<!--#include file = "inc/zhuru.asp" -->
<%	
	strID = Request.QueryString("ID")
	If strID &"" = "" Then
		Response.Write("参数错误!")
		Response.End
	End If 
	
	If Session("UserType") <> "教师" Then
		Response.Write("对不起,您没有权限进行此操作!")
		Response.End
	End If
	
	Dim rs ,strSql 
	strSql = "DELETE FROM StudyMaterial WHERE ID = "& strID
	Set rs = Server.CreateObject("ADODB.Recordset")
	rs.open strSql,conn,3,1
	
	Dim struploadfiles , action
	struploadfiles=trim(request.querystring("File"))
	action=trim(request.querystring("action"))
	response.write "成功删除<font color=red>"&struploadfiles&"</font>文件!"
	call delfiles(struploadfiles & "")
	sub delfiles(struploadfiles)
		if struploadfiles="" then exit sub
		dim fso,arruploadfiles,i
		set fso = createobject("scripting.filesystemobject")
		fso.deletefile(server.mappath("./") & "/upload/files/"& struploadfiles)
		If err Then 
			  Response.Write("<BR><BR><BR><Div align=center>删除文件失败,可能该文件不存在!<Br><BR><a href='Content.asp'>返回</a></div>")
			  Response.End
		End If
		set fso = nothing
		response.write"<script language=javascript>alert('成功删除文件,将返回上一页!');"
		Response.Redirect("Content.asp")
	end sub

%>
<body>
</body>
</html>

⌨️ 快捷键说明

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