B;NeiRong.Asp
资源名称:4.rar [点击查看]
上传用户:zhbanny
上传日期:2020-11-04
资源大小:161k
文件大小:11k
源码类别:
手机WAP编程
开发平台:
ASP/ASPX
- <!--#Include File="Inc/xkon.Asp"--><%
- Private c,s
- Set c=New xkon_Response
- Set s=New xkon_Request
- Dim ID,TID,p,l,TP
- ID=s.QueryString_Long("ID")
- TID=s.QueryString_Long("TID")
- p=s.QueryString_Long("p")
- l=s.QueryString("l")
- TP=s.QueryString("TP")
- Call BanKuai_Du(ID)
- Dim Cn1,Cn2,MingChen,NeiRong,NiChen,HuiYuan,ShiJian,Qian,BanKuai,Dianji,HuiFu,IP,TongZhi,MiMing,Shan,KuaiJie_HuiFu,i,B_NeiRong
- Call OpenData()
- Set Cn1=Server.CreateObject("Adodb.Command")
- Cn1.ActiveConnection=Conn
- Cn1.CommandType=1
- Cn1.CommandText="Select * From TieZhi Where ID="&TID
- Set Cn2=Cn1.Execute
- If Cn2.Eof Then Call xkon_Error("该贴子不存在")
- MingChen=Cn2("MingChen")
- NeiRong=ReadTextFile(TID,Read_SZ("Folder_TieZhi"))
- B_NeiRong=NeiRong
- NiChen=Cn2("NiChen")
- HuiYuan=Cn2("HuiYuan")
- ShiJian=Cn2("ShiJian")
- Qian=Cn2("Qian")
- BanKuai=Cn2("BanKuai")
- DianJi=Cn2("DianJi")
- HuiFu=Cn2("HuiFu")
- IP=Cn2("IP")
- TongZhi=Cn2("TongZhi")
- MiMing=Cn2("MiMing")
- Shan=Cn2("Shan")
- KuaiJie_HuiFu=Cn2("KuaiJie_HuiFu")
- Set Cn2=Nothing
- Set Cn1=Nothing
- Conn.Execute("Update TieZhi Set DianJi=DianJi+1 Where ID="&TID)
- Call CloseData()
- If InStr(Qian,"[审]")>0 Then Call xkon_Error("该贴审核中")
- If Shan="1" Then Call xkon_Error("该贴已被删除")
- Private Function TieZhi()
- Dim NeiRong_Y,Len_NeiRong
- Len_NeiRong=Len(NeiRong)
- If Len_NeiRong Mod Const_Page_Zs = 0 Then
- NeiRong_Y=Len_NeiRongConst_Page_Zs
- Else
- NeiRong_Y=Len_NeiRongConst_Page_Zs+1
- End If
- If P<1 Or P>NeiRong_Y Then
- P=1
- End If
- If p=NeiRong_Y Then
- NeiRong=Mid(NeiRong,(p-1)*Const_Page_Zs+1)
- Else
- NeiRong=Mid(NeiRong,(p-1)*Const_Page_Zs+1,Const_Page_Zs)
- End If
- If Read_SZ("NeiRong_UBB")="1" Then NeiRong=Replace(NeiRong,"(","("):NeiRong=Replace(NeiRong,")",")")
- NeiRong=NeiRong&CPage(NeiRong_Y,P,"B;NeiRong.Asp?ID="&ID&"&TID="&TID&"&TP="&TP&"&l="&l&"{(xkon.cn)链接}&")
- Dim TieZhi_Str,ZhuoZhe_Str
- If MiMing="0" Then
- ZhuoZhe_Str="<a href=""ZiLiao.Asp?ZhangHao="&HuiYuan&"{(xkon.cn)链接}"">"&NiChen&"</a>"
- Else
- ZhuoZhe_Str=IP
- End If
- Dim KuaiJie_HuiFu1
- If KuaiJie_HuiFu<>"" Then
- KuaiJie_HuiFu1=Split(KuaiJie_HuiFu,",")
- KuaiJie_HuiFu="快捷回复<br/>"
- For i=0 To UBound(KuaiJie_HuiFu1)
- KuaiJie_HuiFu=KuaiJie_HuiFu&i+1&".<a href=""B;HuiFu.Asp?ID="&ID&"&TID="&TID&"&Hp="&p&"&l="&l&"&Tp="&TP&"{(xkon.cn)链接}&NeiRong="&Server.UrlEncode(KuaiJie_HuiFu1(i))&""">"&KuaiJie_HuiFu1(i)&"</a><br/>"
- Next
- End If
- TieZhi_Str=TieZhi_U(Read_Text("B;NeiRong"))
- TieZhi_Str=Replace(TieZhi_Str,xkon_S("作者"),ZhuoZhe_Str)
- TieZhi_Str=Replace(TieZhi_Str,xkon_S("时间"),ShiJian)
- TieZhi_Str=Replace(TieZhi_Str,xkon_S("编号"),ID)
- TieZhi_Str=Replace(TieZhi_Str,xkon_S("贴子编号"),TID)
- TieZhi_Str=Replace(TieZhi_Str,xkon_S("点击"),DianJi)
- TieZhi_Str=Replace(TieZhi_Str,xkon_S("回复"),HuiFu)
- TieZhi_Str=Replace(TieZhi_Str,xkon_S("快捷回复"),KuaiJie_HuiFu)
- TieZhi_Str=Replace(TieZhi_Str,xkon_S("内容"),NeiRong)
- TieZhi_Str=Replace(TieZhi_Str,xkon_S("回复列表"),HuiFu_3())
- TieZhi=TieZhi_Str
- End Function
- Private Function ZhuoZhe()
- If MiMing="1" Then Call xkon_Error("游客贴禁止操作")
- If Zi_ZhangHao<>HuiYuan Then Call xkon_Error("你还不是贴子的作者")
- ZhuoZhe=TieZhi_U(Read_Text("B;NeiRong;ZhuoZhe"))
- End Function
- Private Function BianJi()
- If MiMing="1" Then Call xkon_Error("游客贴禁止操作")
- If Zi_ZhangHao<>HuiYuan Then Call xkon_Error("你还不是贴子的作者")
- BianJi=TieZhi_U(Read_Text("B;NeiRong;BianJi"))
- BianJi=Replace(BianJi,xkon_S("标题"),MingChen)
- BianJi=Replace(BianJi,xkon_S("内容"),B_NeiRong)
- End Function
- Private Function ZhengJia()
- If MiMing="1" Then Call xkon_Error("游客贴禁止操作")
- If Zi_ZhangHao<>HuiYuan Then Call xkon_Error("你还不是贴子的作者")
- ZhengJia=TieZhi_U(Read_Text("B;NeiRong;ZhengJia"))
- End Function
- Private Sub ShanChu()
- If MiMing="1" Then Call xkon_Error("游客禁止操作")
- If Zi_ZhangHao<>HuiYuan Then Call xkon_Error("你还不是贴子作者")
- Call OpenData()
- Conn.Execute("Update TieZhi Set Shan='1' Where ID="&TID)
- Call CloseData()
- Response.Redirect(Replace(xkon_FenXi("B;LieBiao.Asp?ID="&ID&"&p="&TP&"&l="&l&"{(xkon.cn)链接}"),"&","&"))
- End Sub
- Private Sub BianJi2()
- If MiMing="1" Then Call xkon_Error("游客禁止操作")
- If Zi_ZhangHao<>HuiYuan Then Call xkon_Error("你还不是贴子作者")
- Dim MingChen,NeiRong
- MingChen=s.Form_Str("MingChen",1,250)
- NeiRong=s.Form_Str("NeiRong",1,10000)
- If MingChen="" Or NeiRong="" Then Call xkon_Error("名称和内容不能为空")
- Call OpenData()
- Conn.Execute("Update TieZhi Set MingChen='"&MingChen&"' Where ID="&TID)
- Call CloseData()
- Dim Bian_FSO,Bian_FS
- Set Bian_FSO=Server.CreateObject("Scripting.FileSystemObject")
- Set Bian_FS=Bian_FSO.OpenTextFile(Server.Mappath("File/"&Read_SZ("Folder_TieZhi")&"/"&TID&".txt"),2,True)
- Bian_FS.Write(NeiRong)&"本帖最后编辑:"&(now)
- Bian_FS.Close
- Set Bian_FS=Nothing
- Set Bian_FSO=Nothing
- Response.Redirect(Replace(xkon_FenXi("B;NeiRong.Asp?ID="&ID&"&TID="&TID&"&p="&p&"&l="&l&"&Tp="&TP&"{(xkon.cn)链接}"),"&","&"))
- End Sub
- Private Function TieZhi_U(TieZhi_U_Str)
- TieZhi_U=TieZhi_U_Str
- TieZhi_U=Replace(TieZhi_U,xkon_S("编号"),ID)
- TieZhi_U=Replace(TieZhi_U,xkon_S("贴子链接"),"ID="&ID&"&TID="&TID&"&p="&p&"&l="&l&"&Tp="&TP&"{(xkon.cn)链接}")
- TieZhi_U=Replace(TieZhi_U,xkon_S("回复链接"),"ID="&ID&"&TID="&TID&"&Hp="&p&"&l="&l&"&Tp="&TP&"{(xkon.cn)链接}")
- TieZhi_U=Replace(TieZhi_U,xkon_S("名称"),MingChen)
- TieZhi_U=Replace(TieZhi_U,xkon_S("返回"),"<a href=""B;LieBiao.Asp?ID="&ID&"&p="&TP&"&l="&l&"{(xkon.cn)链接}"">返回"&DuQu_BanKuai(ID,"BanKuai_MingChen")&"</a>")
- TieZhi_U=Replace(TieZhi_U,xkon_S("版块名称"),DuQu_BanKuai(ID,"BanKuai_MingChen"))
- End Function
- Private Function HuiFu_3()
- Dim HuiFu_3_Cn1,i
- Call OpenData()
- Set HuiFu_3_Cn1=Server.CreateObject("Adodb.RecordSet")
- HuiFu_3_Cn1.Open "Select IP,NiChen,ZhangHao,NeiRong From HuiFu Where TieZhi="&TID&" Order By ID Desc",Conn,1,1
- If HuiFu_3_Cn1.Eof Then HuiFu_3_Cn1.Close:Set HuiFu_3_Cn1=Nothing:Call CloseData():HuiFu_3="暂无回复<br/>":Exit Function
- For i=1 To 3
- If HuiFu_3_Cn1.Eof Then Exit For
- If HuiFu_3_Cn1("NiChen")="" Then
- HuiFu_3=HuiFu_3&HuiFu-i+1&"."&HuiFu_3_Cn1("IP")&":"&HuiFu_3_Cn1("NeiRong")&"<br/>"
- Else
- HuiFu_3=HuiFu_3&HuiFu-i+1&"."&HuiFu_3_Cn1("NiChen")&":"&HuiFu_3_Cn1("NeiRong")&"<br/>"
- End If
- HuiFu_3_Cn1.MoveNext
- Next
- HuiFu_3_Cn1.Close
- Set HuiFu_3_Cn1=Nothing
- Call CloseData()
- End Function
- Private Sub GuanLi_()
- If DuQu_BanKuai(ID,"BanKuai_MingChen")=Zi_ZhangHao Then Exit Sub
- Dim GuanLi_Cn1,GuanLi_Cn2
- Call OpenData()
- Set GuanLi_Cn1=Server.CreateObject("Adodb.Command")
- GuanLi_Cn1.ActiveConnection=Conn
- GuanLi_Cn1.CommandType=1
- GuanLi_Cn1.CommandText="Select ID From BanZhu Where HuiYuan='"&Zi_ZhangHao&"' And BanKuai="&ID
- Set GuanLi_Cn2=GuanLi_Cn1.Execute
- If GuanLi_Cn2.Eof Then Call xkon_Error("你不是管理员")
- Set GuanLi_Cn2=Nothing
- Set GuanLi_Cn1=Nothing
- Call CloseData()
- End Sub
- Private Sub GuanLiYuan()
- Call GuanLi_()
- c.Write(xkon_FenXi(TieZhi_U(Read_Text("B;NeiRong;GuanLiYuan"))))
- End Sub
- Private Sub ZhengJia2()
- If MiMing="1" Then Call xkon_Error("游客禁止操作")
- If Zi_ZhangHao<>HuiYuan Then Call xkon_Error("你还不是贴子作者")
- Dim NeiRong
- NeiRong=s.Form_Str("NeiRong",1,10000)
- If NeiRong="" Then Call xkon_Error("内容不能为空")
- Dim Bian_FSO,Bian_FS
- Set Bian_FSO=Server.CreateObject("Scripting.FileSystemObject")
- Set Bian_FS=Bian_FSO.OpenTextFile(Server.Mappath("File/"&Read_SZ("Folder_TieZhi")&"/"&TID&".txt"),8,True)
- Bian_FS.Write(NeiRong)&"本帖最后编辑:"&(now)
- Bian_FS.Close
- Set Bian_FS=Nothing
- Set Bian_FSO=Nothing
- Response.Redirect(Replace(xkon_FenXi("B;NeiRong.Asp?ID="&ID&"&TID="&TID&"&p="&p&"&l="&l&"&Tp="&TP&"{(xkon.cn)链接}"),"&","&"))
- End Sub
- Private Sub Jing()
- Call OpenData()
- Conn.Execute("Update TieZhi Set Qian='"&Qian&"[精]' Where ID="&TID)
- If HuiYuan<>"" Or InStr(HuiYuan,".")<=0 Then Call Jia_JingBi2("+"&CLng(Read_SZ("JiFen_Jing")),"+"&CLng(Read_SZ("JingYan_Jing")),HuiYuan)
- Call CloseData()
- Response.Redirect(Replace(xkon_FenXi("B;NeiRong.Asp?ID="&ID&"&TID="&TID&"&p="&p&"&l="&l&"&Tp="&TP&"{(xkon.cn)链接}"),"&","&"))
- End Sub
- Private Sub Ding()
- Call OpenData()
- Conn.Execute("Update TieZhi Set Qian='"&Qian&"[顶]',ZuiHouHuiFu='"&Dateadd("y",+5000,Now())&"' Where ID="&TID)
- If HuiYuan<>"" Or InStr(HuiYuan,".")<=0 Then Call Jia_JingBi2("+"&CLng(Read_SZ("JiFen_Ding")),"+"&CLng(Read_SZ("JingYan_Ding")),HuiYuan)
- Call CloseData()
- Response.Redirect(Replace(xkon_FenXi("B;NeiRong.Asp?ID="&ID&"&TID="&TID&"&p="&p&"&l="&l&"&Tp="&TP&"{(xkon.cn)链接}"),"&","&"))
- End Sub
- Private Sub Shan_s()
- Call OpenData()
- Conn.Execute("Update TieZhi Set Shan='1' Where ID="&TID)
- If HuiYuan<>"" Or InStr(HuiYuan,".")<=0 Then Call Jia_JingBi2("-"&CLng(Read_SZ("JiFen_Shan")),"-"&CLng(Read_SZ("JingYan_Shan")),HuiYuan)
- Call CloseData()
- Response.Redirect(Replace(xkon_FenXi("B;LieBiao.Asp?ID="&ID&"&l="&l&"&p="&TP&"{(xkon.cn)链接}"),"&","&"))
- End Sub
- Private Sub C_Jing()
- Call OpenData()
- Conn.Execute("Update TieZhi Set Qian='"&Replace(Qian,"[精]","")&"' Where ID="&TID)
- Call CloseData()
- Response.Redirect(Replace(xkon_FenXi("B;NeiRong.Asp?ID="&ID&"&TID="&TID&"&p="&p&"&l="&l&"&Tp="&TP&"{(xkon.cn)链接}"),"&","&"))
- End Sub
- Private Sub C_Ding()
- Call OpenData()
- Conn.Execute("Update TieZhi Set Qian='"&Replace(Qian,"[顶]","")&"',ZuiHouHuiFu='"&Now()&"' Where ID="&TID)
- Call CloseData()
- Response.Redirect(Replace(xkon_FenXi("B;NeiRong.Asp?ID="&ID&"&TID="&TID&"&p="&p&"&l="&l&"&Tp="&TP&"{(xkon.cn)链接}"),"&","&"))
- End Sub
- Private Sub Suo()
- Call OpenData()
- Conn.Execute("Update TieZhi Set Qian='"&Qian&"[锁]' Where ID="&TID)
- If HuiYuan<>"" Or InStr(HuiYuan,".")<=0 Then Call Jia_JingBi2("-"&CLng(Read_SZ("JiFen_Suo")),"-"&CLng(Read_SZ("JingYan_Suo")),HuiYuan)
- Call CloseData()
- Response.Redirect(Replace(xkon_FenXi("B;NeiRong.Asp?ID="&ID&"&TID="&TID&"&p="&p&"&l="&l&"&Tp="&TP&"{(xkon.cn)链接}"),"&","&"))
- End Sub
- Private Sub C_Suo()
- Call OpenData()
- Conn.Execute("Update TieZhi Set Qian='"&Replace(Qian,"[锁]","")&"' Where ID="&TID)
- Call CloseData()
- Response.Redirect(Replace(xkon_FenXi("B;NeiRong.Asp?ID="&ID&"&TID="&TID&"&p="&p&"&l="&l&"&Tp="&TP&"{(xkon.cn)链接}"),"&","&"))
- End Sub
- Call H_Title("查看贴子-"&MingChen)
- Dim Tl
- TL=s.QueryString("TL")
- Select Case Tl
- Case ""
- c.Write(xkon_FenXi(TieZhi()))
- Case "ZhuoZhe"
- c.Write(xkon_FenXi(ZhuoZhe()))
- Case "BianJi"
- c.Write(xkon_FenXi(BianJi()))
- Case "ZhengJia"
- c.Write(xkon_FenXi(ZhengJia()))
- Case "Shan"
- Call Shanchu()
- Case "BianJi2"
- Call BianJi2()
- Case "ZhengJia2"
- Call ZhengJia2()
- Case "GuanLiYuan"
- Call GuanLiYuan()
- Case "Jing"
- Call Jing()
- Case "Ding"
- Call Ding()
- Case "C_Jing"
- Call C_Jing()
- Case "C_Ding"
- Call C_Ding()
- Case "ShanChu"
- Call Shan_s()
- Case "Suo"
- Call Suo()
- Case "C_Suo"
- Call C_Suo()
- End Select
- Call H_End()
- Set c=Nothing
- Set s=Nothing
- %>