commentpass.asp
上传用户:saigedz
上传日期:2019-10-14
资源大小:997k
文件大小:2k
源码类别:

中间件编程

开发平台:

HTML/CSS

  1. <%@ CODEPAGE=65001 %>
  2. <% Option Explicit %>
  3. <% On Error Resume Next %>
  4. <% Response.Charset="UTF-8" %>
  5. <% Response.Buffer=True %>
  6. <!-- #include file="../../c_option.asp" -->
  7. <!-- #include file="../../function/c_function.asp" -->
  8. <!-- #include file="../../function/c_function_md5.asp" -->
  9. <!-- #include file="../../function/c_system_lib.asp" -->
  10. <!-- #include file="../../function/c_system_base.asp" -->
  11. <!-- #include file="../../function/c_system_event.asp" -->
  12. <!-- #include file="../../function/c_system_plugin.asp" -->
  13. <!-- #include file="../../plugin/p_config.asp" -->
  14. <%
  15. Call System_Initialize()
  16. '检查非法链接
  17. Call CheckReference("")
  18. '检查权限
  19. If BlogUser.Level>1 Then Call ShowError(6) 
  20. If CheckPluginState("Totoro")=False Then Call ShowError(48)
  21. Dim i,j
  22. Dim s,t
  23. Dim aryArticle()
  24. s=Request.Form("edtBatch")
  25. t=Split(s,",")
  26. ReDim Preserve aryArticle(UBound(t))
  27. For j=0 To UBound(t)-1
  28. aryArticle(j)=0
  29. Next
  30. Dim objComment
  31. Dim objArticle
  32. For i=0 To UBound(t)-1
  33. Set objComment=New TComment
  34. If objComment.LoadInfobyID(t(i)) Then
  35. objComment.log_ID=-1-objComment.log_ID
  36. If objComment.log_ID>0 Then
  37. Dim objTestArticle
  38. Set objTestArticle=New TArticle
  39. If objTestArticle.LoadInfobyID(objComment.log_ID) Then
  40. For j=0 To UBound(t)-1
  41. If aryArticle(j)=0 Then
  42. aryArticle(j)=objComment.log_ID
  43. End If
  44. If aryArticle(j)=objComment.log_ID Then Exit For
  45. Next
  46. If Not((objComment.AuthorID=BlogUser.ID) Or (objTestArticle.AuthorID=BlogUser.ID) Or (CheckRights("Root")=True)) Then Response.End
  47. Else
  48. Call ShowError(9)
  49. End If
  50. Set objTestArticle=Nothing
  51. Else
  52. If Not((objComment.log_ID=0) And (CheckRights("GuestBookMng")=True)) Then Response.End
  53. End If
  54. objComment.Post
  55. End If
  56. Set objComment=Nothing
  57. Next
  58. For j=0 To UBound(t)-1
  59. If aryArticle(j)>0 Then
  60. Call BuildArticle(aryArticle(j),False,False)
  61. End If
  62. Next
  63. BlogReBuild_Comments
  64. BlogReBuild_GuestComments
  65. Response.Redirect "setting1.asp"
  66. %>
  67. <%
  68. Call System_Terminate()
  69. If Err.Number<>0 then
  70.   Call ShowError(0)
  71. End If
  72. %>