XiaoXi_GuanLi_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.XiaoXi()
  6. Set FangWen=Nothing
  7. Private c,s
  8. Set c=New xkon_Response
  9. Set s=New xkon_Request
  10. Private Shou,Fa
  11. Shou=s.QueryString("Shou")
  12. Fa=s.QueryString("Fa")
  13. Private Sub x()
  14. Dim Cn1,Cn2,SQL
  15. SQL="Select * From XiaoXi Where ID="&ID
  16. Call OpenData()
  17. Set Cn1=Server.CreateObject("Adodb.Command")
  18. Cn1.ActiveConnection=Conn
  19. Cn1.CommandType=1
  20. Cn1.CommandText=SQL
  21. Set Cn2=Cn1.Execute
  22. If Cn2.Eof Then
  23. Call xkon_Error("找不到该内容")
  24. Else
  25. Dim Fa,Shou,ShiJian,ZhuangTai,NiChen,YanCi,NeiRong
  26. Fa=Cn2("Fa")
  27. Shou=Cn2("Shou")
  28. ShiJian=Cn2("ShiJian")
  29. ZhuangTai=Cn2("ZhuangTai")
  30. NiChen=Cn2("NiChen")
  31. YanCi=Cn2("YanCi")
  32. NeiRong=ReadTextFile(ID,Read_SZ("Folder_XiaoXi"))
  33. End If
  34. Set Cn2=Nothing
  35. Set Cn1=Nothing
  36. Call CloseData()
  37. c.Writeln("ID:"&ID)
  38. c.Writeln("发信人:"&Fa)
  39. c.Writeln("收信人:"&Shou)
  40. c.Writeln("发送时间:"&ShiJian)
  41. c.Writeln("已读:"&Zhuan(ZhuangTai))
  42. c.Writeln("发信人昵称:"&NiChen)
  43. c.Writeln("延迟发送时间:"&YanCi)
  44. c.Writeln("信息内容:"&NeiRong)
  45. End Sub
  46. Private Sub b()
  47. Dim Cn1,Cn2,SQL
  48. SQL="Select * From XiaoXi Where ID="&ID
  49. Call OpenData()
  50. Set Cn1=Server.CreateObject("Adodb.Command")
  51. Cn1.ActiveConnection=Conn
  52. Cn1.CommandType=1
  53. Cn1.CommandText=SQL
  54. Set Cn2=Cn1.Execute
  55. If Cn2.Eof Then
  56. Call xkon_Error("找不到该内容")
  57. Else
  58. Dim Fa,Shou,ShiJian,ZhuangTai,NiChen,YanCi,NeiRong
  59. Fa=Cn2("Fa")
  60. Shou=Cn2("Shou")
  61. ShiJian=Cn2("ShiJian")
  62. ZhuangTai=Cn2("ZhuangTai")
  63. NiChen=Cn2("NiChen")
  64. YanCi=Cn2("YanCi")
  65. NeiRong=ReadTextFile(ID,Read_SZ("Folder_XiaoXi"))
  66. End If
  67. Set Cn2=Nothing
  68. Set Cn1=Nothing
  69. Call CloseData()
  70. c.Writeln("<form method=""post"" action=""XiaoXi_GuanLi_CaoZuo.Asp?Shou="&Shou&"&amp;Fa="&Fa&"&amp;ZhuangTai="&ZhuangTai&"&amp;l=b2"">发信人:<input type=""text"" name=""Fa"" value="""&Fa&"""/>")
  71. c.Writeln("收信人:<input type=""text"" name=""Shou"" value="""&Shou&"""/>")
  72. c.Writeln("发送时间:"&ShiJian)
  73. c.Writeln("状态:<select name=""ZhuangTai""><option value=""1"" "&Selected("1",ZhuangTai)&">已读</option><option value=""0"" "&Selected("0",ZhuangTai)&">未读</option></select>")
  74. c.Writeln("发信人昵称:<input type=""text"" name=""NiChen"" value="""&NiChen&""" />")
  75. c.Writeln("延迟发送时间:<input type=""text"" name=""YanCi"" value="""&YanCi&""" />")
  76. c.Writeln("信息内容:<input type=""text"" name=""NeiRong"" value="""&NeiRong&""" />")
  77. c.Write("<input type=""submit"" value=""提交"" /></form>")
  78. End Sub
  79. Private Sub b2()
  80. Dim Fa,Shou,ShiJian,ZhuangTai,NiChen,YanCi,NeiRong
  81. Fa=s.Form("Fa")
  82. Shou=s.Form("Shou")
  83. ShiJian=s.Form("ShiJian")
  84. ZhuangTai=s.Form("ZhuangTai")
  85. NiChen=s.Form("NiChen")
  86. YanCi=s.Form("YanCi")
  87. NeiRong=s.Form("NeiRong")
  88. If Fa="" Or Shou="" Or ZhuangTai="" Or NiChen="" Or YanCi="" Or NeiRong="" Then
  89. Call xkon_Error("所有填写项不能为空")
  90. Else
  91. Call OpenData()
  92. Conn.Execute("Update XiaoXi Set Fa='"&Fa&"',Shou='"&Shou&"',ZhuangTai='"&ZhuangTai&"',NiChen='"&NiChen&"',YanCi='"&Clng(YanCi)&"' Where ID="&ID)
  93. Call JiLu("修改消息"&ID)
  94. Call CloseData()
  95. Dim FSO,FS
  96. Set FSO=Server.CreateObject("Scripting.FileSystemObject")
  97. Set FS=FSO.OpenTextFile(Server.Mappath("../File/"&Read_SZ("Folder_XiaoXi")&"/"&ID&".txt"),2,True)
  98. FS.Write(NeiRong)
  99. FS.Close
  100. Set FS=Nothing
  101. Set FSO=Nothing
  102. Response.Write("<script language=javascript>location.href=""XiaoXi_GuanLi.Asp"";</script>")
  103. Response.End()
  104. End If
  105. End Sub
  106. Private Sub Delete()
  107. Call OpenData()
  108. Conn.Execute("Delete From XiaoXi Where ID="&ID)
  109. Call JiLu("删除消息"&ID)
  110. Call CloseData()
  111. Response.Write("<script language=javascript>location.href=""XiaoXi_GuanLi.Asp"";</script>")
  112. Response.End()
  113. End Sub
  114. Call H_Title("消息管理")
  115. Dim l,ID
  116. ID=s.QueryString_Long("ID")
  117. l=s.QueryString("l")
  118. Select Case l
  119. Case "x"
  120. Call x()
  121. Case "b"
  122. Call b()
  123. Case "b2"
  124. Call b2()
  125. Case "s"
  126. Call Delete()
  127. End Select
  128. c.Write("<a href=""XiaoXi_GuanLi.Asp"">返回消息管理</a>")
  129. Call H_End()
  130. Set c=Nothing
  131. Set s=Nothing
  132. %>