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

手机WAP编程

开发平台:

ASP/ASPX

  1. <!--#Include File="../Inc/Head.Asp"--><%
  2. Private FangWen
  3. Set FangWen=New xkon_FangWen
  4. FangWen.FangWen()
  5. FangWen.Admin_Help()
  6. Set FangWen=Nothing
  7. Private c,s
  8. Set c=New xkon_Response
  9. Set s=New xkon_Request
  10. Private Lei,l,ID
  11. ID=s.QueryString_Long("ID")
  12. l=s.QueryString("l")
  13. Lei=s.QueryString("Lei")
  14. Private Sub j()
  15. c.Writeln("<form method=""post"" action=""SZ_Help_CaoZuo.Asp?Lei="&Lei&"&amp;l=j2"">标题:<input name=""Title"" />")
  16. c.Writeln("内容:<textarea cols=""50"" rows=""10"" name=""neirong""></textarea>")
  17. c.Write("<input type=""submit"" value=""增加"" /></form>")
  18. End Sub
  19. Private Sub j2()
  20. Dim J_ID,Title,NeiRong,Cn1,Cn2
  21. Title=s.Form_Str("Title",1,250)
  22. NeiRong=s.Form_Str("NeiRong",1,100000)
  23. If Title="" Or NeiRong="" Then
  24. Call xkon_Error("所有填写项不能为空")
  25. Else
  26. Call OpenData()
  27. Set Cn1=Server.CreateObject("Adodb.Command")
  28. Cn1.ActiveConnection=Conn
  29. Cn1.CommandType=1
  30. Cn1.CommandText="Select id From Help Order By ID DESC"
  31. Set Cn2=Cn1.Execute
  32. If Cn2.Eof Then
  33. J_ID=1
  34. Else
  35. J_ID=Cn2("ID")+1
  36. End If
  37. Set Cn2=Nothing
  38. Set Cn1=Nothing
  39. Conn.Execute("Insert Into Help(ID,Lei,TiTle,NeiRong)Values('"&J_ID&"','"&Lei&"','"&Title&"','"&NeiRong&"')")
  40. Call JiLu("增加帮助"&J_ID)
  41. Call CloseData()
  42. Response.Write("<script language=javascript>location.href=""SZ_Help.Asp?Lei="&Lei&""";</script>")
  43. Response.End()
  44. End If
  45. End Sub
  46. Private Sub b()
  47. Call OpenData()
  48. Dim Cn1,Cn2
  49. Set Cn1=Server.CreateObject("Adodb.Command")
  50. Cn1.ActiveConnection=Conn
  51. Cn1.CommandType=1
  52. Cn1.CommandText="Select * From Help Where ID="&Clng(ID)
  53. Set Cn2=Cn1.Execute
  54. If Cn2.Eof Then
  55. Call xkon_Error("该内容不存在")
  56. Response.End()
  57. Else
  58. c.Writeln("<form method=""post"" action=""SZ_Help_CaoZuo.Asp?l=b2&amp;Lei="&Lei&"&amp;id="&id&""">标题:<input name=""Title"" value="""&Cn2("Title")&""" />")
  59. c.Writeln("内容:<textarea cols=""50"" rows=""10"" name=""neirong"">"&Cn2("NeiRong")&"</textarea>")
  60. c.Write("<input type=""submit"" value=""修改"" /></form>")
  61. End If
  62. Set Cn1=Nothing
  63. Set Cn2=Nothing
  64. Call CloseData()
  65. End Sub
  66. Private Sub b2()
  67. Dim Title,Neirong
  68. Title=s.Form_Str("Title",1,250)
  69. NeiRong=s.Form_Str("NeiRong",1,100000)
  70. If Title="" Or NeiRong="" Then
  71. Call xkon_Error("所有填写项不能为空")
  72. Else
  73. Call OpenData()
  74. Conn.Execute("Update Help Set Title='"&Title&"',Neirong='"&NeiRong&"' Where ID="&Clng(ID))
  75. Call JiLu("编辑帮助"&ID)
  76. Call CloseData()
  77. Response.Write("<script language=javascript>location.href=""SZ_Help.Asp?Lei="&Lei&""";</script>")
  78. Response.End()
  79. End If
  80. End Sub
  81. Private Sub Delete()
  82. Call OpenData()
  83. Conn.Execute("Delete From Help Where ID="&Clng(ID))
  84. Call JiLu("删除帮助"&ID)
  85. Call CloseData()
  86. Response.Write("<script language=javascript>location.href=""SZ_Help.Asp?Lei="&Lei&""";</script>")
  87. Response.End()
  88. End Sub
  89. Call H_Title("操作")
  90. Select Case l
  91. Case "j"
  92. Call j()
  93. Case "j2"
  94. Call j2()
  95. Case "b"
  96. Call b()
  97. Case "b2"
  98. Call b2()
  99. Case "s"
  100. Call Delete()
  101. End Select
  102. c.Write("<a href=""SZ_Help.Asp?Lei="&Lei&""">返回列表</a>")
  103. Call H_End()
  104. Set c=Nothing
  105. Set s=Nothing
  106. %>