g_admin.asp
上传用户:comthink
上传日期:2021-05-06
资源大小:1280k
文件大小:3k
源码类别:

WEB源码(ASP,PHP,...)

开发平台:

HTML/CSS

  1. <!--#include file="conn.asp"-->
  2. <!-- #include file="inc/const.asp" -->
  3. <%
  4. stats="留言管理"
  5. dim candel,canistop,cannotop
  6. dim id,postid,postuser,postuserid
  7. candel=false
  8. canistop=false
  9. cannotop=false
  10. if not founduser then
  11. founderr=true
  12. Errmsg=Errmsg+"<br>"+"<li>请登陆后进行操作。"
  13. end if
  14. if request("id")="" then
  15. founderr=true
  16. Errmsg=Errmsg+"<br>"+"<li>请指定相关贴子。"
  17. elseif not isInteger(request("id")) then
  18. founderr=true
  19. Errmsg=Errmsg+"<br>"+"<li>非法的贴子参数。"
  20. else
  21. id=request("id")
  22. end if
  23. if not founderr then
  24. set rs=conn.execute("select postid,postuser,postuserid from gbook where postid="&id)
  25. if rs.eof and rs.bof then
  26. Errmsg=Errmsg+"<br><li>没有找到相关留言!"
  27. founderr=true
  28. else
  29. postid=CheckStr(rs(0))
  30. postuser=CheckStr(rs(1))
  31. postuserid=CheckStr(rs(2))
  32. end if
  33. if master or supermaster then
  34. candel=true
  35. canistop=true
  36. cannotop=true
  37. elseif postuser=membername then
  38. candel=true
  39. canistop=false
  40. cannotop=false
  41. end if
  42. end if
  43. if founderr then
  44. call head()
  45. call head_var("错误信息",Request.ServerVariables("HTTP_REFERER"))
  46. call txl_error()
  47. else
  48. call head()
  49. call head_var("","")
  50. select case request("action")
  51. case "del"
  52. if not candel then
  53. Errmsg=Errmsg+"<br><li>您没有执行此操作的权限。"
  54. founderr=true
  55. else
  56. stats="删除留言"
  57. call del()
  58. end if
  59. case "istop"
  60. if not canistop then
  61. Errmsg=Errmsg+"<br><li>您没有执行此操作的权限。"
  62. founderr=true
  63. else
  64. stats="固顶留言"
  65. call istop()
  66. end if
  67. case "notop"
  68. if not cannotop then
  69. Errmsg=Errmsg+"<br><li>您没有执行此操作的权限。"
  70. founderr=true
  71. else
  72. stats="解顶留言"
  73. call notop()
  74. end if
  75. end select
  76. if founderr then 
  77. call txl_error()
  78. else
  79. call suc()
  80. end if
  81. end if
  82. call foot()
  83. sub del()
  84. conn.execute("delete from gbook where postid="&postid)
  85. conn.execute("update [user] set bookcount=bookcount-1,usermoney=usermoney-"&txl_user(8)&" where userid="&postuserid)
  86. end sub
  87. sub istop()
  88. conn.execute("update gbook set istop=1 where postid="&postid)
  89. end sub
  90. sub notop()
  91. conn.execute("update gbook set istop=0 where postid="&postid)
  92. end sub
  93. sub  suc()
  94. %>
  95. <meta http-equiv=refresh content="3;URL=g_index.asp">
  96. <table width="<%=txl_body(0)%>" cellpadding="0" cellspacing="0" align="center" style="border:1px <%=txl_body(9)%> solid; border-top-width: 0px; border-right-width: 1px; border-bottom-width: 0px; border-left-width: 1px;">  
  97. <tr> 
  98. <td  bgcolor=<%=txl_body(10)%>><br>
  99. <table cellpadding=3 cellspacing=1 align=center class=tableborder1 style="width:75%">
  100. <tr align=center>
  101. <th width="100%">状态:<%=stats%>成功</th>
  102. </tr>
  103. <tr>
  104. <td width="100%" class=tablebody1>本页面将在3秒后自动返回班级留言,<b>您可以选择以下操作:</b><br><ul>
  105. <li><a href="index.asp">返回首页</a></li>
  106. <li><a href="g_index.asp">班级留言</a></li>
  107. </ul></td>
  108. </tr>
  109. </table>
  110. <br>
  111. </td>
  112. </tr>
  113. </table>
  114. <%
  115. end sub
  116. %>