yns_del.asp
上传用户:yjkj1008
上传日期:2020-10-17
资源大小:1496k
文件大小:2k
源码类别:

电子政务应用

开发平台:

HTML/CSS

  1. <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
  2. <!--#include file="Connections/conn_news.asp" --> <% '请尊重作者劳动成果不要删除以上信息 '业一新闻系统3.0正式版 '主页:http://yeyi.net '论坛:http://bbs.yeyi.net '业一网络 承接各种网站制作 '程序开发 软件开发业务 '业务联系 '电话: 13007310512 '联系人:郝亚平 'QQ:24344842 (只谈业务,技术问题请访问论坛) '请尊重作者劳动成果不要删除以上信息 %>
  3. <%
  4. ' *** Restrict Access To Page: Grant or deny access to this page
  5. MM_authorizedUsers="3"
  6. MM_authFailedURL="default.asp"
  7. MM_grantAccess=false
  8. If Session("MM_Username") <> "" Then
  9.   If (false Or CStr(Session("MM_UserAuthorization"))="") Or _
  10.          (InStr(1,MM_authorizedUsers,Session("MM_UserAuthorization"))>=1) Then
  11.     MM_grantAccess = true
  12.   End If
  13. End If
  14. If Not MM_grantAccess Then
  15.   MM_qsChar = "?"
  16.   If (InStr(1,MM_authFailedURL,"?") >= 1) Then MM_qsChar = "&"
  17.   MM_referrer = Request.ServerVariables("URL")
  18.   if (Len(Request.QueryString()) > 0) Then MM_referrer = MM_referrer & "?" & Request.QueryString()
  19.   MM_authFailedURL = MM_authFailedURL & MM_qsChar & "accessdenied=" & Server.URLEncode(MM_referrer)
  20.   Response.Redirect(MM_authFailedURL)
  21. End If
  22. %>
  23. <%
  24. if(request("n_id") <> "") then Command1__varid = request("n_id")
  25. %>
  26. <%
  27. set Command1 = Server.CreateObject("ADODB.Command")
  28. Command1.ActiveConnection = MM_conn_news_STRING
  29. Command1.CommandText = "DELETE FROM t_news  WHERE n_id = " + Replace(Command1__varid, "'", "''") + ""
  30. Command1.CommandType = 1
  31. Command1.CommandTimeout = 0
  32. Command1.Prepared = true
  33. Command1.Execute()
  34. %>
  35. <%
  36. dim fname
  37. dim fpath
  38. fname=request.Form("n_fname")
  39. fpath=request.Form("n_fpath")
  40.    
  41.     filepath = Server.MapPath(".")& "" & fpath& "" &fname
  42. Set fso = CreateObject("Scripting.FileSystemObject")
  43. fso.DeleteFile(filepath)
  44.     Set fso = nothing
  45. response.redirect "yns_ok.htm" 
  46. %>