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

手机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. Dim ID,TID,P,TP,HP,i
  6. ID=s.QueryString_Long("ID")
  7. TID=s.QueryString_Long("TID")
  8. P=s.QueryString_Long("p")
  9. TP=s.QueryString_Long("TP")
  10. HP=s.QueryString_Long("HP")
  11. Call BanKuai_Du(ID)
  12. Private Function HuiFu_LieBiao()
  13. Dim HuiFu_LieBiao_Cn1,Count_
  14. Call OpenData()
  15. Set HuiFu_LieBiao_Cn1=Server.CreateObject("Adodb.RecordSet")
  16. HuiFu_LieBiao_Cn1.Open "Select * From HuiFu Where TieZhi="&TID&" Order By ID Desc",Conn,1,1
  17. HuiFu_LieBiao_Cn1.PageSize=Const_Page_Ys
  18. If HuiFu_LieBiao_Cn1.Eof Then HuiFu_LieBiao_Cn1.Close:Set HuiFu_LieBiao_Cn1=Nothing:Call CloseData():Exit Function
  19. HuiFu_LieBiao_Cn1.AbsolutePage=p
  20. Count_=HuiFu_LieBiao_Cn1.RecordCount
  21. For i=1 To Const_Page_Ys
  22. If HuiFu_LieBiao_Cn1.Eof Then Exit For
  23. HuiFu_LieBiao=HuiFu_LieBiao&(Count_-(p-1)*Const_Page_Ys)-i+1&"."
  24. If HuiFu_LieBiao_Cn1("MiMing")="1" Then
  25. HuiFu_LieBiao=HuiFu_LieBiao&HuiFu_LieBiao_Cn1("IP")&":"
  26. Else
  27. HuiFu_LieBiao=HuiFu_LieBiao&"<a href=""ZiLiao.Asp?ZhangHao="&HuiFu_LieBiao_Cn1("ZhangHao")&"{(xkon.cn)链接}"">"&HuiFu_LieBiao_Cn1("NiChen")&"</a>:"
  28. End If
  29. HuiFu_LieBiao=HuiFu_LieBiao&HuiFu_LieBiao_Cn1("NeiRong")&"<br/>"
  30. HuiFu_LieBiao_Cn1.MoveNext
  31. Next
  32. HuiFu_LieBiao=HuiFu_LieBiao&CPage(HuiFu_LieBiao_Cn1.PageCount,p,"B;HuiFu.Asp?ID="&ID&"&amp;TID="&TID&"&amp;TP="&TP&"&amp;HP="&HP&"{(xkon.cn)链接}&amp;")
  33. HuiFu_LieBiao_Cn1.Close
  34. Set HuiFu_LieBiao_Cn1=Nothing
  35. Call CloseData()
  36. End Function
  37. Private Sub HuiFu_C()
  38. If DuQu_BanKuai(ID,"FangWen_HuiFu")="0" Then Call xkon_Error("禁止发表回复")
  39. Dim HuiFu_C_Cn1,HuiFu_C_Cn2,NeiRong,NiChen,J_ID,MiMing,HuiFu_C_Qian,HuiFu_C_HuiFu
  40. NeiRong=s.QueryString_Form("NeiRong")
  41. If NeiRong="" Then Call xkon_Error("内容不能为空")
  42. MiMing="0"
  43. If Zi_ZhangHao="" Then
  44. MiMing="1"
  45. End If
  46. Call OpenData()
  47. Set HuiFu_C_Cn1=Server.CreateObject("Adodb.Command")
  48. HuiFu_C_Cn1.ActiveConnection=Conn
  49. HuiFu_C_Cn1.CommandType=1
  50. HuiFu_C_Cn1.CommandText="Select ID From HuiFu Order By ID Desc"
  51. Set HuiFu_C_Cn2=HuiFu_C_Cn1.Execute
  52. If HuiFu_C_Cn2.Eof Then
  53. J_ID=1
  54. Else
  55. J_ID=HuiFu_C_Cn2("ID")+1
  56. End If
  57. Set HuiFu_C_Cn1=Nothing
  58. Set HuiFu_C_Cn2=Nothing
  59. Set HuiFu_C_Cn1=Server.CreateObject("Adodb.Command")
  60. HuiFu_C_Cn1.ActiveConnection=Conn
  61. HuiFu_C_Cn1.CommandType=1
  62. HuiFu_C_Cn1.CommandText="Select Qian,HuiFu From TieZhi Where ID="&TID
  63. Set HuiFu_C_Cn2=HuiFu_C_Cn1.Execute
  64. If HuiFu_C_Cn2.Eof Then Call xkon_Error("发生意外错误")
  65. HuiFu_C_Qian=HuiFu_C_Cn2("Qian")
  66. HuiFu_C_HuiFu=HuiFu_C_Cn2("HuiFu")
  67. Set HuiFu_C_Cn2=Nothing
  68. Set HuiFu_C_Cn1=Nothing
  69. If HuiFu_C_HuiFu>=CLng(Read_SZ("Re_HuiFu")) Then
  70. If InStr(HuiFu_C_Qian,"[热]")<=0 Then
  71. Conn.Execute("Update TieZhi Set Qian='"&HuiFu_C_Qian&"[热]' Where ID="&TID)
  72. End If
  73. End If
  74. If InStr(HuiFu_C_Qian,"[锁]")>0 Then Call xkon_Error("锁定贴无法回复")
  75. Conn.Execute("Insert Into HuiFu(ID,ZhangHao,NiChen,IP,TieZhi,NeiRong,ShiJian,MiMing,BanKuai)Values('"&J_ID&"','"&Zi_ZhangHao&"','"&Zi_NiChen&"','"&ReadUSIP()&"','"&TID&"','"&NeiRong&"','"&Now()&"','"&MiMing&"','"&ID&"')")
  76. Call Jia_JingBi("+"&CLng(Read_SZ("JiFen_HuiTie")),"+"&CLng(Read_SZ("JingYan_HuiTie")))
  77.         Conn.Execute("Update TieZhi Set ZuiHouHuiFu='"&Now()&"' Where ID="&TID)
  78. Conn.Execute("Update TieZhi Set HuiFu=HuiFu+1 Where ID="&TID)
  79. Conn.Execute("Update BanKuai Set ShuLiang_HuiFu=ShuLiang_HuiFu+1 Where ID="&ID)
  80. Call CloseData()
  81. End Sub
  82. Private Function TieZhi_U(TieZhi_U_Str)
  83. TieZhi_U=TieZhi_U_Str
  84. TieZhi_U=Replace(TieZhi_U,xkon_S("编号"),ID)
  85. TieZhi_U=Replace(TieZhi_U,xkon_S("贴子链接"),"ID="&ID&"&amp;TID="&TID&"&amp;p="&Hp&"&amp;l=&amp;Tp="&TP&"{(xkon.cn)链接}")
  86. TieZhi_U=Replace(TieZhi_U,xkon_S("返回"),"<a href=""B;LieBiao.Asp?ID="&ID&"&amp;p="&TP&"&amp;l={(xkon.cn)链接}"">返回"&DuQu_BanKuai(ID,"BanKuai_MingChen")&"</a>")
  87. TieZhi_U=Replace(TieZhi_U,xkon_S("版块名称"),DuQu_BanKuai(ID,"BanKuai_MingChen"))
  88. End Function
  89. Call H_Title("贴子回复")
  90. If s.QueryString_Form("NeiRong")<>"" Then Call HuiFu_C()
  91. c.Write(xkon_FenXi(TieZhi_U(Replace(Read_Text("B;HuiFu"),xkon_S("回复列表"),HuiFu_LieBiao()))))
  92. Call H_End()
  93. Set c=Nothing
  94. Set s=Nothing
  95. %>