⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 save_msg.asp

📁 . 缓存处理技术
💻 ASP
字号:
<!-- #include file="Conn_And_Config.asp" -->
<!-- #include file="chksession.asp" -->
<!-- #include file="Cnbbr_SendMsg.asp" -->
<%
Call Cnbbr_CheckPost(0)
Dim OwnerID,AucID,WriterID,WriteDate,MSGTitle,Content,ReplyID
ownerid=Request.Form("ownerid")
aucid=Request.Form("aucid")
writerid=Request.Cookies(super_user)("uid")

if Not IsNum(writerid) then Call AlertInfo("你还未登陆或者登陆已经超时!","login.asp",1)
if not IsNum(aucid) then aucid=0
if ownerid="" then
   Call AlertInfo("请填写你的收件人名称!","",0)
else
   Dim RsUser
   sql="select regid from users where regusername='"& ownerid &"'"
   set rsuser=conn.execute(sql)
   CnbbrConnTimes
   if rsuser.Eof then
      Call AlertInfo("没有找到收件人用户帐号,请重新填写!","",0)
   else
        ownerid=rsuser("regid")
	if clng(ownerid)=clng(writerid) then
	   Call AlertInfo("对不起,你填写的收件人不能为自己!","",0)
	end if
   end if   
end if

writedate=now()
msgtitle=InterceptString(CheckStr(HTMLEncode(Trim(Request.Form("msgtitle")))),30)
if msgtitle="" or isNull(msgtitle) or len(MsgTitle)<4 then Call AlertInfo("留言标题不能为空!且长度大于4个字符","",0)
content=CheckStr(HTMLEncode(trim(Request.Form("ask_content"))))
content=InterCeptString(content,1000)

if lcase(Trim(Request.Form("Reply")))="cnbbrmsgreply" then
      Dim BBRReplyMsgID
      BBRReplyMsgID=Request.Form("ReplyMsgID")
      if Not IsNum(BBRReplyMsgID) then Call AlertInfo("没有找到你要回复的留言信息,请转发新的信息给对方!","CnbbrMSG_Send.asp",1)
end if

ReplyID=Cnbbr_SendMsg(AucID,MsgTitle,WriterID,OwnerID,Content)

if lcase(Trim(Request.Form("Reply")))="cnbbrmsgreply" then
      sql="update msg set msgStatus=2,reply="& ReplyID &" where aucid="& aucid &" and ownerid="& writerid &" and MsgID="&BBRReplyMsgID
      conn.execute(sql)
      CnbbrConnTimes
end if
Rs.close
Set Rs=nothing
Call AlertInfo("你的留言已经发送成功,正在返回发件箱!","CnbbrMSG_Send.asp",1)

%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -