BiaoQing_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.BiaoQing()
  6. Set FangWen=Nothing
  7. Private c,s
  8. Set c=New xkon_Response
  9. Set s=New xkon_Request
  10. Private Sub b()
  11. Call OpenData()
  12. Dim Cn1,Cn2,SQL
  13. SQL="Select * From BiaoQing Order By Id Desc"
  14. Set Cn1=Server.CreateObject("Adodb.Command")
  15. Cn1.ActiveConnection=Conn
  16. Cn1.CommandType=1
  17. Cn1.CommandText=SQL
  18. Set Cn2=Cn1.Execute
  19. If Cn2.Eof Then
  20. Call xkon_Error("表情管理")
  21. Else
  22. Dim MingChen,Url,KuaiJie
  23. MingChen=Cn2("MingChen")
  24. Url=Cn2("Url")
  25. KuaiJie=Cn2("KuaiJie")
  26. End If
  27. Set Cn1=Nothing
  28. Set Cn2=Nothing
  29. Call CloseData()
  30. c.Write("<form method=""post"" action=""BiaoQing_CaoZuo.Asp?l=b2"">")
  31. c.Writeln("名称:<input type=""text"" name=""MingChen"" value="""&MingChen&""" />")
  32. c.Writeln("地址:<input type=""text"" name=""Url"" value="""&Url&""" />")
  33. c.Writeln("快捷字符:<input type=""text"" name=""KuaiJie"" value="""&KuaiJie&""" />")
  34. c.Write("<input type=""submit"" value=""编辑"" /></form>")
  35. End Sub
  36. Private Sub b2()
  37. Dim MingChen,Url,KuaiJie
  38. MingChen=s.Form_Str("MingChen",1,250)
  39. Url=s.Form_Str("Url",1,250)
  40. KuaiJie=s.Form_Str("KuaiJie",1,250)
  41. If MingChen="" Or Url="" Then
  42. Call xkon_Error("名称和图片URL不能为空")
  43. Else
  44. Dim SQL
  45. SQL="Update BiaoQing Set MingChen='"&MingChen&"',Url='"&Url&"',KuaiJie='"&KuaiJie&"' Where ID="&ID
  46. Call OpenData()
  47. Conn.Execute(SQL)
  48. Call JiLu("编辑表情"&ID)
  49. Call CloseData()
  50. Response.Write("<script language=javascript>location.href=""BiaoQing.Asp"";</script>")
  51. Response.End()
  52. End If
  53. End Sub
  54. Private Sub Delete()
  55. Call OpenData()
  56. Conn.Execute("Delete From BiaoQing Where ID="&Clng(ID))
  57. Call JiLu("删除表情"&ID)
  58. Call CloseData()
  59. Response.Write("<script language=javascript>location.href=""BiaoQing.Asp"";</script>")
  60. Response.End()
  61. End Sub
  62. Private Sub j()
  63. c.Write("<form method=""post"" action=""BiaoQing_CaoZuo.Asp?l=j2"">")
  64. c.Writeln("表情名称:<input type=""text"" name=""MingChen"" />")
  65. c.Writeln("地址:<input type=""text"" name=""Url"" />")
  66. c.Writeln("快捷字符:<input type=""text"" name=""KuaiJie"" />")
  67. c.Write("<input type=""submit"" value=""增加"" /></form>")
  68. End Sub
  69. Private Sub j2()
  70. Dim J_ID,MingChen,Url,KuaiJie
  71. MingChen=s.Form_Str("MingChen",1,250)
  72. Url=s.Form_Str("Url",1,250)
  73. KuaiJie=s.Form_Str("KuaiJie",1,250)
  74. If MingChen="" Or Url="" Or KuaiJie="" Then
  75. Call xkon_Error("所有填写项不能为空")
  76. Else
  77. Dim Cn1,Cn2,SQL
  78. SQL="Select id From BiaoQing Order By Id Desc"
  79. Call OpenData()
  80. Set Cn1=Server.CreateObject("Adodb.Command")
  81. Cn1.ActiveConnection=Conn
  82. Cn1.CommandType=1
  83. Cn1.CommandText=SQL
  84. Set Cn2=Cn1.Execute
  85. If Cn2.Eof Then
  86. J_ID=1
  87. Else
  88. J_ID=Cn2("ID")+1
  89. End If
  90. Set Cn1=Nothing
  91. Set Cn2=Nothing
  92. SQL="Insert Into BiaoQing(ID,MingChen,Url,KuaiJie)Values('"&J_ID&"','"&MingChen&"','"&Url&"','"&KuaiJie&"')"
  93. Conn.Execute(SQL)
  94. Call JiLu("增加表情"&ID)
  95. Call CloseData()
  96. Response.Write("<script language=javascript>location.href=""BiaoQing.Asp"";</script>")
  97. Response.End()
  98. End If
  99. End Sub
  100. Call H_Title("表情管理")
  101. Dim l,ID
  102. l=s.QueryString("l")
  103. ID=s.QueryString_Long("ID")
  104. Select Case l
  105. Case "b"
  106. Call b()
  107. Case "b2"
  108. Call b2()
  109. Case "s"
  110. Call Delete()
  111. Case "j"
  112. Call j()
  113. Case "j2"
  114. Call j2()
  115. End Select
  116. c.Write("<a href=""BiaoQing.Asp"">返回表情管理</a>")
  117. Call H_End()
  118. Set c=Nothing
  119. Set s=Nothing
  120. %>