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

手机WAP编程

开发平台:

ASP/ASPX

  1. <!--#Include File="Inc/xkon.Asp"--><%
  2. Private c,s
  3. Set c=New xkon_Response
  4. Set s=New xkon_Request
  5. If Zi_FaTie=False Then Call xkon_Error("注册时间过短,不能发贴")
  6. Private Sub FaTie1()
  7. c.Write(xkon_FenXi(Replace(Read_Text("B;FaTie"),xkon_S("编号"),ID)))
  8. End Sub
  9. Private Sub FaTie2()
  10. If DuQu_BanKuai(ID,"FangWen_FaTie")="0" Then Call xkon_Error("禁止发贴")
  11. Dim MingChen,NeiRong,TongZhi,KuaiJie_HuiFu,SQL,J_ID,FaTie2_Cn1,FaTie2_Cn2,FaTie2_FSO,FaTie2_FS
  12. MingChen=s.Form_Str("MingChen",CLng(Read_SZ("BiaoTi_Length_D")),CLng(Read_SZ("BiaoTi_Length_C")))
  13. NeiRong=s.Form_Str("NeiRong",CLng(Read_SZ("NeiRong_Length_D")),CLng(Read_SZ("NeiRong_Length_C")))
  14. KuaiJie_HuiFu=Replace(Request.Form("KuaiJie_HuiFu"),"'","")
  15. TongZhi=s.Form("TongZhi")
  16. If MingChen="" Or NeiRong="" Then Call xkon_Error("名称和内容不能为空")
  17. Call OpenData()
  18. Set FaTie2_Cn1=Server.CreateObject("Adodb.Command")
  19. FaTie2_Cn1.ActiveConnection=Conn
  20. FaTie2_Cn1.CommandType=1
  21. FaTie2_Cn1.CommandText="Select ID From TieZhi Order By ID Desc"
  22. Set FaTie2_Cn2=FaTie2_Cn1.Execute
  23. If FaTie2_Cn2.Eof Then
  24. J_ID=1
  25. Else
  26. J_ID=FaTie2_Cn2("ID")+1
  27. End If
  28. Set FaTie2_Cn1=Nothing
  29. Set FaTie2_Cn2=Nothing
  30. If Zi_ZhangHao="" Then
  31. SQL="Insert Into TieZhi(ID,MingChen,NiChen,BanKuai,IP,TongZhi,MiMing,KuaiJie_HuiFu)Values('"&J_ID&"','"&MingChen&"','"&ReadUSIP()&"','"&ID&"','"&ReadUSIP()&"','"&TongZhi&"','1','"&KuaiJie_HuiFu&"')"
  32. Else
  33. SQL="Insert Into TieZhi(ID,MingChen,NiChen,HuiYuan,BanKuai,IP,TongZhi,MiMing,KuaiJie_HuiFu)Values('"&J_ID&"','"&MingChen&"','"&Zi_NiChen&"','"&Zi_ZhangHao&"','"&ID&"','"&ReadUSIP()&"','"&TongZhi&"','0','"&KuaiJie_HuiFu&"')"
  34. Call Jia_JingBi("+"&Clng(Read_SZ("JiFen_FaTie")),"+"&CLng(Read_SZ("JingYan_FaTie")))
  35. End If
  36. Conn.Execute(SQL)
  37. Conn.Execute("Update BanKuai Set ShuLiang_TieZhi=ShuLiang_TieZhi+1 Where ID="&ID)
  38. Call CloseData()
  39. Set FaTie2_FSO=Server.CreateObject("Scripting.FileSystemObject")
  40. Set FaTie2_FS=FaTie2_FSO.OpenTextFile(Server.Mappath("File/"&Read_SZ("Folder_TieZhi")&"/"&J_ID&".txt"),2,True)
  41. FaTie2_FS.Write(NeiRong)
  42. FaTie2_FS.Close
  43. Set FaTie2_FSO=Nothing
  44. Set FaTie2_FS=Nothing
  45. Response.Redirect(Replace(xkon_FenXi("B;NeiRong.Asp?ID="&ID&"&TID="&J_ID&"&p=1{(xkon.cn)链接}"),"&amp;","&"))
  46. End Sub
  47. Dim ID
  48. ID=s.QueryString("ID")
  49. Call BanKuai_Du(ID)
  50. Call H_Title("发表贴子")
  51. Dim l
  52. l=s.QueryString("l")
  53. Select Case l
  54. Case ""
  55. Call FaTie1()
  56. Case Else
  57. Call FaTie2()
  58. End Select
  59. Call H_End()
  60. Set c=Nothing
  61. Set s=Nothing
  62. %>