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

手机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,l,TP
  6. ID=s.QueryString_Long("ID")
  7. TID=s.QueryString_Long("TID")
  8. p=s.QueryString_Long("p")
  9. l=s.QueryString("l")
  10. TP=s.QueryString("TP")
  11. Call BanKuai_Du(ID)
  12. Dim Cn1,Cn2,MingChen,NeiRong,NiChen,HuiYuan,ShiJian,Qian,BanKuai,Dianji,HuiFu,IP,TongZhi,MiMing,Shan,KuaiJie_HuiFu,i,B_NeiRong
  13. Call OpenData()
  14. Set Cn1=Server.CreateObject("Adodb.Command")
  15. Cn1.ActiveConnection=Conn
  16. Cn1.CommandType=1
  17. Cn1.CommandText="Select * From TieZhi Where ID="&TID
  18. Set Cn2=Cn1.Execute
  19. If Cn2.Eof Then Call xkon_Error("该贴子不存在")
  20. MingChen=Cn2("MingChen")
  21. NeiRong=ReadTextFile(TID,Read_SZ("Folder_TieZhi"))
  22. B_NeiRong=NeiRong
  23. NiChen=Cn2("NiChen")
  24. HuiYuan=Cn2("HuiYuan")
  25. ShiJian=Cn2("ShiJian")
  26. Qian=Cn2("Qian")
  27. BanKuai=Cn2("BanKuai")
  28. DianJi=Cn2("DianJi")
  29. HuiFu=Cn2("HuiFu")
  30. IP=Cn2("IP")
  31. TongZhi=Cn2("TongZhi")
  32. MiMing=Cn2("MiMing")
  33. Shan=Cn2("Shan")
  34. KuaiJie_HuiFu=Cn2("KuaiJie_HuiFu")
  35. Set Cn2=Nothing
  36. Set Cn1=Nothing
  37. Conn.Execute("Update TieZhi Set DianJi=DianJi+1 Where ID="&TID)
  38. Call CloseData()
  39. If InStr(Qian,"[审]")>0 Then Call xkon_Error("该贴审核中")
  40. If Shan="1" Then Call xkon_Error("该贴已被删除")
  41. Private Function TieZhi()
  42. Dim NeiRong_Y,Len_NeiRong
  43. Len_NeiRong=Len(NeiRong)
  44. If Len_NeiRong Mod Const_Page_Zs = 0 Then
  45. NeiRong_Y=Len_NeiRongConst_Page_Zs
  46. Else
  47. NeiRong_Y=Len_NeiRongConst_Page_Zs+1
  48. End If
  49. If P<1 Or P>NeiRong_Y Then
  50. P=1
  51. End If
  52. If p=NeiRong_Y Then
  53. NeiRong=Mid(NeiRong,(p-1)*Const_Page_Zs+1)
  54. Else
  55. NeiRong=Mid(NeiRong,(p-1)*Const_Page_Zs+1,Const_Page_Zs)
  56. End If
  57. If Read_SZ("NeiRong_UBB")="1" Then NeiRong=Replace(NeiRong,"(","("):NeiRong=Replace(NeiRong,")",")")
  58. NeiRong=NeiRong&CPage(NeiRong_Y,P,"B;NeiRong.Asp?ID="&ID&"&amp;TID="&TID&"&amp;TP="&TP&"&amp;l="&l&"{(xkon.cn)链接}&amp;")
  59. Dim TieZhi_Str,ZhuoZhe_Str
  60. If MiMing="0" Then
  61. ZhuoZhe_Str="<a href=""ZiLiao.Asp?ZhangHao="&HuiYuan&"{(xkon.cn)链接}"">"&NiChen&"</a>"
  62. Else
  63. ZhuoZhe_Str=IP
  64. End If
  65. Dim KuaiJie_HuiFu1
  66. If KuaiJie_HuiFu<>"" Then
  67. KuaiJie_HuiFu1=Split(KuaiJie_HuiFu,",")
  68. KuaiJie_HuiFu="快捷回复<br/>"
  69. For i=0 To UBound(KuaiJie_HuiFu1)
  70. KuaiJie_HuiFu=KuaiJie_HuiFu&i+1&".<a href=""B;HuiFu.Asp?ID="&ID&"&amp;TID="&TID&"&amp;Hp="&p&"&amp;l="&l&"&amp;Tp="&TP&"{(xkon.cn)链接}&amp;NeiRong="&Server.UrlEncode(KuaiJie_HuiFu1(i))&""">"&KuaiJie_HuiFu1(i)&"</a><br/>"
  71. Next
  72. End If
  73. TieZhi_Str=TieZhi_U(Read_Text("B;NeiRong"))
  74. TieZhi_Str=Replace(TieZhi_Str,xkon_S("作者"),ZhuoZhe_Str)
  75. TieZhi_Str=Replace(TieZhi_Str,xkon_S("时间"),ShiJian)
  76. TieZhi_Str=Replace(TieZhi_Str,xkon_S("编号"),ID)
  77. TieZhi_Str=Replace(TieZhi_Str,xkon_S("贴子编号"),TID)
  78. TieZhi_Str=Replace(TieZhi_Str,xkon_S("点击"),DianJi)
  79. TieZhi_Str=Replace(TieZhi_Str,xkon_S("回复"),HuiFu)
  80. TieZhi_Str=Replace(TieZhi_Str,xkon_S("快捷回复"),KuaiJie_HuiFu)
  81. TieZhi_Str=Replace(TieZhi_Str,xkon_S("内容"),NeiRong)
  82. TieZhi_Str=Replace(TieZhi_Str,xkon_S("回复列表"),HuiFu_3())
  83. TieZhi=TieZhi_Str
  84. End Function
  85. Private Function ZhuoZhe()
  86. If MiMing="1" Then Call xkon_Error("游客贴禁止操作")
  87. If Zi_ZhangHao<>HuiYuan Then Call xkon_Error("你还不是贴子的作者")
  88. ZhuoZhe=TieZhi_U(Read_Text("B;NeiRong;ZhuoZhe"))
  89. End Function
  90. Private Function BianJi()
  91. If MiMing="1" Then Call xkon_Error("游客贴禁止操作")
  92. If Zi_ZhangHao<>HuiYuan Then Call xkon_Error("你还不是贴子的作者")
  93. BianJi=TieZhi_U(Read_Text("B;NeiRong;BianJi"))
  94. BianJi=Replace(BianJi,xkon_S("标题"),MingChen)
  95. BianJi=Replace(BianJi,xkon_S("内容"),B_NeiRong)
  96. End Function
  97. Private Function ZhengJia()
  98. If MiMing="1" Then Call xkon_Error("游客贴禁止操作")
  99. If Zi_ZhangHao<>HuiYuan Then Call xkon_Error("你还不是贴子的作者")
  100. ZhengJia=TieZhi_U(Read_Text("B;NeiRong;ZhengJia"))
  101. End Function
  102. Private Sub ShanChu()
  103. If MiMing="1" Then Call xkon_Error("游客禁止操作")
  104. If Zi_ZhangHao<>HuiYuan Then Call xkon_Error("你还不是贴子作者")
  105. Call OpenData()
  106. Conn.Execute("Update TieZhi Set Shan='1' Where ID="&TID)
  107. Call CloseData()
  108. Response.Redirect(Replace(xkon_FenXi("B;LieBiao.Asp?ID="&ID&"&amp;p="&TP&"&amp;l="&l&"{(xkon.cn)链接}"),"&amp;","&"))
  109. End Sub
  110. Private Sub BianJi2()
  111. If MiMing="1" Then Call xkon_Error("游客禁止操作")
  112. If Zi_ZhangHao<>HuiYuan Then Call xkon_Error("你还不是贴子作者")
  113. Dim MingChen,NeiRong
  114. MingChen=s.Form_Str("MingChen",1,250)
  115. NeiRong=s.Form_Str("NeiRong",1,10000)
  116. If MingChen="" Or NeiRong="" Then Call xkon_Error("名称和内容不能为空")
  117. Call OpenData()
  118. Conn.Execute("Update TieZhi Set MingChen='"&MingChen&"' Where ID="&TID)
  119. Call CloseData()
  120. Dim Bian_FSO,Bian_FS
  121. Set Bian_FSO=Server.CreateObject("Scripting.FileSystemObject")
  122. Set Bian_FS=Bian_FSO.OpenTextFile(Server.Mappath("File/"&Read_SZ("Folder_TieZhi")&"/"&TID&".txt"),2,True)
  123. Bian_FS.Write(NeiRong)&"本帖最后编辑:"&(now)
  124. Bian_FS.Close
  125. Set Bian_FS=Nothing
  126. Set Bian_FSO=Nothing
  127. Response.Redirect(Replace(xkon_FenXi("B;NeiRong.Asp?ID="&ID&"&amp;TID="&TID&"&amp;p="&p&"&amp;l="&l&"&amp;Tp="&TP&"{(xkon.cn)链接}"),"&amp;","&"))
  128. End Sub
  129. Private Function TieZhi_U(TieZhi_U_Str)
  130. TieZhi_U=TieZhi_U_Str
  131. TieZhi_U=Replace(TieZhi_U,xkon_S("编号"),ID)
  132. TieZhi_U=Replace(TieZhi_U,xkon_S("贴子链接"),"ID="&ID&"&amp;TID="&TID&"&amp;p="&p&"&amp;l="&l&"&amp;Tp="&TP&"{(xkon.cn)链接}")
  133. TieZhi_U=Replace(TieZhi_U,xkon_S("回复链接"),"ID="&ID&"&amp;TID="&TID&"&amp;Hp="&p&"&amp;l="&l&"&amp;Tp="&TP&"{(xkon.cn)链接}")
  134. TieZhi_U=Replace(TieZhi_U,xkon_S("名称"),MingChen)
  135. TieZhi_U=Replace(TieZhi_U,xkon_S("返回"),"<a href=""B;LieBiao.Asp?ID="&ID&"&amp;p="&TP&"&amp;l="&l&"{(xkon.cn)链接}"">返回"&DuQu_BanKuai(ID,"BanKuai_MingChen")&"</a>")
  136. TieZhi_U=Replace(TieZhi_U,xkon_S("版块名称"),DuQu_BanKuai(ID,"BanKuai_MingChen"))
  137. End Function
  138. Private Function HuiFu_3()
  139. Dim HuiFu_3_Cn1,i
  140. Call OpenData()
  141. Set HuiFu_3_Cn1=Server.CreateObject("Adodb.RecordSet")
  142. HuiFu_3_Cn1.Open "Select IP,NiChen,ZhangHao,NeiRong From HuiFu Where TieZhi="&TID&" Order By ID Desc",Conn,1,1
  143. If HuiFu_3_Cn1.Eof Then HuiFu_3_Cn1.Close:Set HuiFu_3_Cn1=Nothing:Call CloseData():HuiFu_3="暂无回复<br/>":Exit Function
  144. For i=1 To 3
  145. If HuiFu_3_Cn1.Eof Then Exit For
  146. If HuiFu_3_Cn1("NiChen")="" Then
  147. HuiFu_3=HuiFu_3&HuiFu-i+1&"."&HuiFu_3_Cn1("IP")&":"&HuiFu_3_Cn1("NeiRong")&"<br/>"
  148. Else
  149. HuiFu_3=HuiFu_3&HuiFu-i+1&"."&HuiFu_3_Cn1("NiChen")&":"&HuiFu_3_Cn1("NeiRong")&"<br/>"
  150. End If
  151. HuiFu_3_Cn1.MoveNext
  152. Next
  153. HuiFu_3_Cn1.Close
  154. Set HuiFu_3_Cn1=Nothing
  155. Call CloseData()
  156. End Function
  157. Private Sub GuanLi_()
  158. If DuQu_BanKuai(ID,"BanKuai_MingChen")=Zi_ZhangHao Then Exit Sub
  159. Dim GuanLi_Cn1,GuanLi_Cn2
  160. Call OpenData()
  161. Set GuanLi_Cn1=Server.CreateObject("Adodb.Command")
  162. GuanLi_Cn1.ActiveConnection=Conn
  163. GuanLi_Cn1.CommandType=1
  164. GuanLi_Cn1.CommandText="Select ID From BanZhu Where HuiYuan='"&Zi_ZhangHao&"' And BanKuai="&ID
  165. Set GuanLi_Cn2=GuanLi_Cn1.Execute
  166. If GuanLi_Cn2.Eof Then Call xkon_Error("你不是管理员")
  167. Set GuanLi_Cn2=Nothing
  168. Set GuanLi_Cn1=Nothing
  169. Call CloseData()
  170. End Sub
  171. Private Sub GuanLiYuan()
  172. Call GuanLi_()
  173. c.Write(xkon_FenXi(TieZhi_U(Read_Text("B;NeiRong;GuanLiYuan"))))
  174. End Sub
  175. Private Sub ZhengJia2()
  176. If MiMing="1" Then Call xkon_Error("游客禁止操作")
  177. If Zi_ZhangHao<>HuiYuan Then Call xkon_Error("你还不是贴子作者")
  178. Dim NeiRong
  179. NeiRong=s.Form_Str("NeiRong",1,10000)
  180. If NeiRong="" Then Call xkon_Error("内容不能为空")
  181. Dim Bian_FSO,Bian_FS
  182. Set Bian_FSO=Server.CreateObject("Scripting.FileSystemObject")
  183. Set Bian_FS=Bian_FSO.OpenTextFile(Server.Mappath("File/"&Read_SZ("Folder_TieZhi")&"/"&TID&".txt"),8,True)
  184. Bian_FS.Write(NeiRong)&"本帖最后编辑:"&(now)
  185. Bian_FS.Close
  186. Set Bian_FS=Nothing
  187. Set Bian_FSO=Nothing
  188. Response.Redirect(Replace(xkon_FenXi("B;NeiRong.Asp?ID="&ID&"&amp;TID="&TID&"&amp;p="&p&"&amp;l="&l&"&amp;Tp="&TP&"{(xkon.cn)链接}"),"&amp;","&"))
  189. End Sub
  190. Private Sub Jing()
  191. Call OpenData()
  192. Conn.Execute("Update TieZhi Set Qian='"&Qian&"[精]' Where ID="&TID)
  193. If HuiYuan<>"" Or InStr(HuiYuan,".")<=0 Then Call Jia_JingBi2("+"&CLng(Read_SZ("JiFen_Jing")),"+"&CLng(Read_SZ("JingYan_Jing")),HuiYuan)
  194. Call CloseData()
  195. Response.Redirect(Replace(xkon_FenXi("B;NeiRong.Asp?ID="&ID&"&amp;TID="&TID&"&amp;p="&p&"&amp;l="&l&"&amp;Tp="&TP&"{(xkon.cn)链接}"),"&amp;","&"))
  196. End Sub
  197. Private Sub Ding()
  198. Call OpenData()
  199. Conn.Execute("Update TieZhi Set Qian='"&Qian&"[顶]',ZuiHouHuiFu='"&Dateadd("y",+5000,Now())&"' Where ID="&TID)
  200. If HuiYuan<>"" Or InStr(HuiYuan,".")<=0 Then Call Jia_JingBi2("+"&CLng(Read_SZ("JiFen_Ding")),"+"&CLng(Read_SZ("JingYan_Ding")),HuiYuan)
  201. Call CloseData()
  202. Response.Redirect(Replace(xkon_FenXi("B;NeiRong.Asp?ID="&ID&"&amp;TID="&TID&"&amp;p="&p&"&amp;l="&l&"&amp;Tp="&TP&"{(xkon.cn)链接}"),"&amp;","&"))
  203. End Sub
  204. Private Sub Shan_s()
  205. Call OpenData()
  206. Conn.Execute("Update TieZhi Set Shan='1' Where ID="&TID)
  207. If HuiYuan<>"" Or InStr(HuiYuan,".")<=0 Then Call Jia_JingBi2("-"&CLng(Read_SZ("JiFen_Shan")),"-"&CLng(Read_SZ("JingYan_Shan")),HuiYuan)
  208. Call CloseData()
  209. Response.Redirect(Replace(xkon_FenXi("B;LieBiao.Asp?ID="&ID&"&amp;l="&l&"&amp;p="&TP&"{(xkon.cn)链接}"),"&amp;","&"))
  210. End Sub
  211. Private Sub C_Jing()
  212. Call OpenData()
  213. Conn.Execute("Update TieZhi Set Qian='"&Replace(Qian,"[精]","")&"' Where ID="&TID)
  214. Call CloseData()
  215. Response.Redirect(Replace(xkon_FenXi("B;NeiRong.Asp?ID="&ID&"&amp;TID="&TID&"&amp;p="&p&"&amp;l="&l&"&amp;Tp="&TP&"{(xkon.cn)链接}"),"&amp;","&"))
  216. End Sub
  217. Private Sub C_Ding()
  218. Call OpenData()
  219. Conn.Execute("Update TieZhi Set Qian='"&Replace(Qian,"[顶]","")&"',ZuiHouHuiFu='"&Now()&"' Where ID="&TID)
  220. Call CloseData()
  221. Response.Redirect(Replace(xkon_FenXi("B;NeiRong.Asp?ID="&ID&"&amp;TID="&TID&"&amp;p="&p&"&amp;l="&l&"&amp;Tp="&TP&"{(xkon.cn)链接}"),"&amp;","&"))
  222. End Sub
  223. Private Sub Suo()
  224. Call OpenData()
  225. Conn.Execute("Update TieZhi Set Qian='"&Qian&"[锁]' Where ID="&TID)
  226. If HuiYuan<>"" Or InStr(HuiYuan,".")<=0 Then Call Jia_JingBi2("-"&CLng(Read_SZ("JiFen_Suo")),"-"&CLng(Read_SZ("JingYan_Suo")),HuiYuan)
  227. Call CloseData()
  228. Response.Redirect(Replace(xkon_FenXi("B;NeiRong.Asp?ID="&ID&"&amp;TID="&TID&"&amp;p="&p&"&amp;l="&l&"&amp;Tp="&TP&"{(xkon.cn)链接}"),"&amp;","&"))
  229. End Sub
  230. Private Sub C_Suo()
  231. Call OpenData()
  232. Conn.Execute("Update TieZhi Set Qian='"&Replace(Qian,"[锁]","")&"' Where ID="&TID)
  233. Call CloseData()
  234. Response.Redirect(Replace(xkon_FenXi("B;NeiRong.Asp?ID="&ID&"&amp;TID="&TID&"&amp;p="&p&"&amp;l="&l&"&amp;Tp="&TP&"{(xkon.cn)链接}"),"&amp;","&"))
  235. End Sub
  236. Call H_Title("查看贴子-"&MingChen)
  237. Dim Tl
  238. TL=s.QueryString("TL")
  239. Select Case Tl
  240. Case ""
  241. c.Write(xkon_FenXi(TieZhi()))
  242. Case "ZhuoZhe"
  243. c.Write(xkon_FenXi(ZhuoZhe()))
  244. Case "BianJi"
  245. c.Write(xkon_FenXi(BianJi()))
  246. Case "ZhengJia"
  247. c.Write(xkon_FenXi(ZhengJia()))
  248. Case "Shan"
  249. Call Shanchu()
  250. Case "BianJi2"
  251. Call BianJi2()
  252. Case "ZhengJia2"
  253. Call ZhengJia2()
  254. Case "GuanLiYuan"
  255. Call GuanLiYuan()
  256. Case "Jing"
  257. Call Jing()
  258. Case "Ding"
  259. Call Ding()
  260. Case "C_Jing"
  261. Call C_Jing()
  262. Case "C_Ding"
  263. Call C_Ding()
  264. Case "ShanChu"
  265. Call Shan_s()
  266. Case "Suo"
  267. Call Suo()
  268. Case "C_Suo"
  269. Call C_Suo()
  270. End Select
  271. Call H_End()
  272. Set c=Nothing
  273. Set s=Nothing
  274. %>