XiaoXi_GuanLi_CaoZuo.Asp
资源名称:4.rar [点击查看]
上传用户:zhbanny
上传日期:2020-11-04
资源大小:161k
文件大小:4k
源码类别:
手机WAP编程
开发平台:
ASP/ASPX
- <!--#Include File="../Inc/Head.Asp"--><%
- Private FangWen
- Set FangWen=New xkon_FangWen
- FangWen.FangWen()
- FangWen.XiaoXi()
- Set FangWen=Nothing
- Private c,s
- Set c=New xkon_Response
- Set s=New xkon_Request
- Private Shou,Fa
- Shou=s.QueryString("Shou")
- Fa=s.QueryString("Fa")
- Private Sub x()
- Dim Cn1,Cn2,SQL
- SQL="Select * From XiaoXi Where ID="&ID
- Call OpenData()
- Set Cn1=Server.CreateObject("Adodb.Command")
- Cn1.ActiveConnection=Conn
- Cn1.CommandType=1
- Cn1.CommandText=SQL
- Set Cn2=Cn1.Execute
- If Cn2.Eof Then
- Call xkon_Error("找不到该内容")
- Else
- Dim Fa,Shou,ShiJian,ZhuangTai,NiChen,YanCi,NeiRong
- Fa=Cn2("Fa")
- Shou=Cn2("Shou")
- ShiJian=Cn2("ShiJian")
- ZhuangTai=Cn2("ZhuangTai")
- NiChen=Cn2("NiChen")
- YanCi=Cn2("YanCi")
- NeiRong=ReadTextFile(ID,Read_SZ("Folder_XiaoXi"))
- End If
- Set Cn2=Nothing
- Set Cn1=Nothing
- Call CloseData()
- c.Writeln("ID:"&ID)
- c.Writeln("发信人:"&Fa)
- c.Writeln("收信人:"&Shou)
- c.Writeln("发送时间:"&ShiJian)
- c.Writeln("已读:"&Zhuan(ZhuangTai))
- c.Writeln("发信人昵称:"&NiChen)
- c.Writeln("延迟发送时间:"&YanCi)
- c.Writeln("信息内容:"&NeiRong)
- End Sub
- Private Sub b()
- Dim Cn1,Cn2,SQL
- SQL="Select * From XiaoXi Where ID="&ID
- Call OpenData()
- Set Cn1=Server.CreateObject("Adodb.Command")
- Cn1.ActiveConnection=Conn
- Cn1.CommandType=1
- Cn1.CommandText=SQL
- Set Cn2=Cn1.Execute
- If Cn2.Eof Then
- Call xkon_Error("找不到该内容")
- Else
- Dim Fa,Shou,ShiJian,ZhuangTai,NiChen,YanCi,NeiRong
- Fa=Cn2("Fa")
- Shou=Cn2("Shou")
- ShiJian=Cn2("ShiJian")
- ZhuangTai=Cn2("ZhuangTai")
- NiChen=Cn2("NiChen")
- YanCi=Cn2("YanCi")
- NeiRong=ReadTextFile(ID,Read_SZ("Folder_XiaoXi"))
- End If
- Set Cn2=Nothing
- Set Cn1=Nothing
- Call CloseData()
- c.Writeln("<form method=""post"" action=""XiaoXi_GuanLi_CaoZuo.Asp?Shou="&Shou&"&Fa="&Fa&"&ZhuangTai="&ZhuangTai&"&l=b2"">发信人:<input type=""text"" name=""Fa"" value="""&Fa&"""/>")
- c.Writeln("收信人:<input type=""text"" name=""Shou"" value="""&Shou&"""/>")
- c.Writeln("发送时间:"&ShiJian)
- c.Writeln("状态:<select name=""ZhuangTai""><option value=""1"" "&Selected("1",ZhuangTai)&">已读</option><option value=""0"" "&Selected("0",ZhuangTai)&">未读</option></select>")
- c.Writeln("发信人昵称:<input type=""text"" name=""NiChen"" value="""&NiChen&""" />")
- c.Writeln("延迟发送时间:<input type=""text"" name=""YanCi"" value="""&YanCi&""" />")
- c.Writeln("信息内容:<input type=""text"" name=""NeiRong"" value="""&NeiRong&""" />")
- c.Write("<input type=""submit"" value=""提交"" /></form>")
- End Sub
- Private Sub b2()
- Dim Fa,Shou,ShiJian,ZhuangTai,NiChen,YanCi,NeiRong
- Fa=s.Form("Fa")
- Shou=s.Form("Shou")
- ShiJian=s.Form("ShiJian")
- ZhuangTai=s.Form("ZhuangTai")
- NiChen=s.Form("NiChen")
- YanCi=s.Form("YanCi")
- NeiRong=s.Form("NeiRong")
- If Fa="" Or Shou="" Or ZhuangTai="" Or NiChen="" Or YanCi="" Or NeiRong="" Then
- Call xkon_Error("所有填写项不能为空")
- Else
- Call OpenData()
- Conn.Execute("Update XiaoXi Set Fa='"&Fa&"',Shou='"&Shou&"',ZhuangTai='"&ZhuangTai&"',NiChen='"&NiChen&"',YanCi='"&Clng(YanCi)&"' Where ID="&ID)
- Call JiLu("修改消息"&ID)
- Call CloseData()
- Dim FSO,FS
- Set FSO=Server.CreateObject("Scripting.FileSystemObject")
- Set FS=FSO.OpenTextFile(Server.Mappath("../File/"&Read_SZ("Folder_XiaoXi")&"/"&ID&".txt"),2,True)
- FS.Write(NeiRong)
- FS.Close
- Set FS=Nothing
- Set FSO=Nothing
- Response.Write("<script language=javascript>location.href=""XiaoXi_GuanLi.Asp"";</script>")
- Response.End()
- End If
- End Sub
- Private Sub Delete()
- Call OpenData()
- Conn.Execute("Delete From XiaoXi Where ID="&ID)
- Call JiLu("删除消息"&ID)
- Call CloseData()
- Response.Write("<script language=javascript>location.href=""XiaoXi_GuanLi.Asp"";</script>")
- Response.End()
- End Sub
- Call H_Title("消息管理")
- Dim l,ID
- ID=s.QueryString_Long("ID")
- l=s.QueryString("l")
- Select Case l
- Case "x"
- Call x()
- Case "b"
- Call b()
- Case "b2"
- Call b2()
- Case "s"
- Call Delete()
- End Select
- c.Write("<a href=""XiaoXi_GuanLi.Asp"">返回消息管理</a>")
- Call H_End()
- Set c=Nothing
- Set s=Nothing
- %>