LT_BanZhu_CaoZuo.Asp
资源名称:4.rar [点击查看]
上传用户:zhbanny
上传日期:2020-11-04
资源大小:161k
文件大小:4k
源码类别:

手机WAP编程

开发平台:

ASP/ASPX

  1. <!--#Include File="../Inc/Head.Asp"--><%
  2. Private FangWen
  3. Set FangWen=New xkon_FangWen
  4. FangWen.FangWen()
  5. FangWen.BanZhu()
  6. Set FangWen=Nothing
  7. Private c,s
  8. Set c=New xkon_Response
  9. Set s=New xkon_Request
  10. Private ID,l
  11. l=s.QueryString("l")
  12. ID=s.QueryString_Long("ID")
  13. Private Sub j()
  14. c.Writeln("<form method=""post"" action=""LT_BanZhu_CaoZuo.Asp?l=j2"">")
  15. Call BanKuai_LieBiao()
  16. c.Writeln("")
  17. c.Writeln("用户名:<input name=""HuiYuan"" />")
  18. c.Write("<input type=""submit"" value=""增加"" />")
  19. c.Write("</form>")
  20. End Sub
  21. Private Sub j2()
  22. Dim J_ID,MingChen,HuiYuan,Ding,Jing,Shan,JiaHei,JingBi,Suo,ShangJi_ID
  23. HuiYuan=s.Form_Str("HuiYuan",1,250)
  24. Call OpenData()
  25. MingChen=Get_NiChen(HuiYuan)
  26. Call CloseData()
  27. ShangJi_ID=s.Form_Long("ShangJi_ID")
  28. If HuiYuan="" Then
  29. Call xkon_Error("会员用户名不能为空")
  30. Else
  31. Dim Cn1,Cn2,SQL
  32. SQL="Select id From BanZhu Order By Id Desc"
  33. Call OpenData()
  34. Set Cn1=Server.CreateObject("Adodb.Command")
  35. Cn1.ActiveConnection=Conn
  36. Cn1.CommandType=1
  37. Cn1.CommandText=SQL
  38. Set Cn2=Cn1.Execute
  39. If Cn2.Eof Then
  40. J_ID=1
  41. Else
  42. J_ID=Cn2("ID")+1
  43. End If
  44. Set Cn2=Nothing
  45. Set Cn1=Nothing
  46. SQL="Insert Into BanZhu(ID,BanKuai,MingChen,HuiYuan)Values('"&J_ID&"','"&ShangJi_ID&"','"&MingChen&"','"&HuiYuan&"')"
  47. Conn.Execute(SQL)
  48. Call JiLu("增加版主"&J_ID)
  49. Call CloseData()
  50. Response.Write("<script language=javascript>location.href=""LT_BanZhu.Asp"";</script>")
  51. Response.End()
  52. End If
  53. End Sub
  54. Private Sub b()
  55. Call OpenData()
  56. Dim Cn1,Cn2,SQL
  57. SQL="Select * From BanZhu Where ID="&Clng(ID)
  58. Set Cn1=Server.CreateObject("Adodb.Command")
  59. Cn1.ActiveConnection=Conn
  60. Cn1.CommandType=1
  61. Cn1.CommandText=SQL
  62. Set Cn2=Cn1.Execute
  63. If Cn2.Eof Then
  64. Call xkon_Error("该内容不存在")
  65. Response.End()
  66. Else
  67. Dim MingChen,HuiYuan,Ding,Jing,Shan,JiaHei,JingBi,Suo
  68. MingChen=Cn2("MingChen")
  69. HuiYuan=Cn2("HuiYuan")
  70. End If
  71. Set Cn1=Nothing
  72. Set Cn2=Nothing
  73. Call CloseData()
  74. c.Writeln("<form method=""post"" action=""LT_BanZhu_CaoZuo.Asp?l=b2&amp;id="&ID&""">")
  75. Call BanKuai_LieBiao()
  76. c.Writeln("用户名:<input name=""HuiYuan""  value="""&HuiYuan&"""/>")
  77. c.Write("<input type=""submit"" value=""修改"" />")
  78. c.Write("</form>")
  79. End Sub
  80. Private Sub b2()
  81. Dim HuiYuan,Ding,Jing,Shan,JiaHei,Suo,JingBi,BanKuai,MingChen
  82. BanKuai=s.Form_Long("BanKuai")
  83. HuiYuan=s.Form_Str("HuiYuan",1,250)
  84. Call OpenData()
  85. MingChen=Get_NiChen(HuiYuan)
  86. Call CloseData()
  87. If HuiYuan="" Then
  88. Call xkon_Error("会员用户名不能为空")
  89. Else
  90. Dim SQL
  91. SQL="Update BanZhu Set MingChen='"&MingChen&"',BanKuai='"&BanKuai&"',HuiYuan='"&HuiYuan&"' Where ID="&Clng(ID)
  92. Call OpenData()
  93. Conn.Execute(SQL)
  94. Call JiLu("编辑版主"&ID)
  95. Call CloseData()
  96. Response.Write("<script language=javascript>location.href=""LT_BanZhu.Asp"";</script>")
  97. Response.End()
  98. End If
  99. End Sub
  100. Private Sub Delete()
  101. Dim SQL
  102. SQL="Delete From BanZhu Where ID="&Clng(ID)
  103. Call OpenData()
  104. Conn.Execute(SQL)
  105. Call CloseData()
  106. Response.Write("<script language=javascript>location.href=""LT_BanZhu.Asp"";</script>")
  107. Response.End()
  108. End Sub
  109. Call H_Title("版主管理")
  110. Select Case l
  111. Case "j"
  112. Call j()
  113. Case "j2"
  114. Call j2()
  115. Case "b"
  116. Call b()
  117. Case "b2"
  118. Call b2()
  119. Case "s"
  120. Call Delete()
  121. End Select
  122. c.Writeln("<a href=""LT_BanZhu.Asp"">返回版主管理</a>")
  123. Call H_End()
  124. Set c=Nothing
  125. Set s=Nothing
  126. %>