B;FaTie.Asp
资源名称:4.rar [点击查看]
上传用户:zhbanny
上传日期:2020-11-04
资源大小:161k
文件大小:3k
源码类别:
手机WAP编程
开发平台:
ASP/ASPX
- <!--#Include File="Inc/xkon.Asp"--><%
- Private c,s
- Set c=New xkon_Response
- Set s=New xkon_Request
- If Zi_FaTie=False Then Call xkon_Error("注册时间过短,不能发贴")
- Private Sub FaTie1()
- c.Write(xkon_FenXi(Replace(Read_Text("B;FaTie"),xkon_S("编号"),ID)))
- End Sub
- Private Sub FaTie2()
- If DuQu_BanKuai(ID,"FangWen_FaTie")="0" Then Call xkon_Error("禁止发贴")
- Dim MingChen,NeiRong,TongZhi,KuaiJie_HuiFu,SQL,J_ID,FaTie2_Cn1,FaTie2_Cn2,FaTie2_FSO,FaTie2_FS
- MingChen=s.Form_Str("MingChen",CLng(Read_SZ("BiaoTi_Length_D")),CLng(Read_SZ("BiaoTi_Length_C")))
- NeiRong=s.Form_Str("NeiRong",CLng(Read_SZ("NeiRong_Length_D")),CLng(Read_SZ("NeiRong_Length_C")))
- KuaiJie_HuiFu=Replace(Request.Form("KuaiJie_HuiFu"),"'","")
- TongZhi=s.Form("TongZhi")
- If MingChen="" Or NeiRong="" Then Call xkon_Error("名称和内容不能为空")
- Call OpenData()
- Set FaTie2_Cn1=Server.CreateObject("Adodb.Command")
- FaTie2_Cn1.ActiveConnection=Conn
- FaTie2_Cn1.CommandType=1
- FaTie2_Cn1.CommandText="Select ID From TieZhi Order By ID Desc"
- Set FaTie2_Cn2=FaTie2_Cn1.Execute
- If FaTie2_Cn2.Eof Then
- J_ID=1
- Else
- J_ID=FaTie2_Cn2("ID")+1
- End If
- Set FaTie2_Cn1=Nothing
- Set FaTie2_Cn2=Nothing
- If Zi_ZhangHao="" Then
- SQL="Insert Into TieZhi(ID,MingChen,NiChen,BanKuai,IP,TongZhi,MiMing,KuaiJie_HuiFu)Values('"&J_ID&"','"&MingChen&"','"&ReadUSIP()&"','"&ID&"','"&ReadUSIP()&"','"&TongZhi&"','1','"&KuaiJie_HuiFu&"')"
- Else
- 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&"')"
- Call Jia_JingBi("+"&Clng(Read_SZ("JiFen_FaTie")),"+"&CLng(Read_SZ("JingYan_FaTie")))
- End If
- Conn.Execute(SQL)
- Conn.Execute("Update BanKuai Set ShuLiang_TieZhi=ShuLiang_TieZhi+1 Where ID="&ID)
- Call CloseData()
- Set FaTie2_FSO=Server.CreateObject("Scripting.FileSystemObject")
- Set FaTie2_FS=FaTie2_FSO.OpenTextFile(Server.Mappath("File/"&Read_SZ("Folder_TieZhi")&"/"&J_ID&".txt"),2,True)
- FaTie2_FS.Write(NeiRong)
- FaTie2_FS.Close
- Set FaTie2_FSO=Nothing
- Set FaTie2_FS=Nothing
- Response.Redirect(Replace(xkon_FenXi("B;NeiRong.Asp?ID="&ID&"&TID="&J_ID&"&p=1{(xkon.cn)链接}"),"&","&"))
- End Sub
- Dim ID
- ID=s.QueryString("ID")
- Call BanKuai_Du(ID)
- Call H_Title("发表贴子")
- Dim l
- l=s.QueryString("l")
- Select Case l
- Case ""
- Call FaTie1()
- Case Else
- Call FaTie2()
- End Select
- Call H_End()
- Set c=Nothing
- Set s=Nothing
- %>