<!--#include file="Inc.asp"-->
<!--#include file="ydzq.asp"-->
<%call head()
%>
<!--#include file="forbbs.asp"-->
<%
call Fortxtmsg
dim urls,txt,lid,face
urlss1=request("urlss1122")
urls141=Request.Querystring("url")
If urlss1="" Then
urlss1=urls141
End if

txt=forbbs(request("txt"))
face=forbbs(request("face"))
lid=request("lid")
face=request("face")
if face="" or Isnumeric(lid)=False then face=0
if txt="" then
if saytk<>1 then
  Call Error("<title>发送消息</title></head><body><body bgcolor="""&yanse&"""><p>消息内容不能为空！")
else
  Call Error("<card title=""发送消息""><p>消息内容不能为空！")
  end if
end if
if len(txt)>1000 then
if saytk<>1 then
  Call Error("<title>发送消息</title></head><body><body bgcolor="""&yanse&"""><p>消息内容最多1000字！")
else
  Call Error("<card title=""发送消息""><p>消息内容最多1000字！")
  end if
end if
if lid="" or Isnumeric(lid)=False then
if saytk<>1 then
  Call Error("<title>发送消息</title></head><body><body bgcolor="""&yanse&"""><p>ID无效！")
else
  Call Error("<card title=""发送消息""><p>ID无效！")
  end if
end if
if clng(lid)=myid then
if saytk<>1 then
  Call Error("<title>发送消息</title></head><body><body bgcolor="""&yanse&"""><p>不能给自己发信!!")
else
  Call Error("<card title=""发送消息""><p>不能给自己发信！")
  end if
end if
set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select * from myhait where jid="&lid&" and bid="&myid,conn,1,1
if not rs.eof then
if saytk<>1 then
  Call Error("<title>发送消息</title></head><body><body bgcolor="""&yanse&"""><p>对方已把你加为黑名单！")
else
  Call Error("<card title=""发送消息""><p>对方已把你加为黑名单！")
  end if
end if
rs.close
set rs=nothing

set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select id from [users] where id="&lid,conn,1,1
if rs.eof then
if saytk<>1 then
  Call Error("<title>发送消息</title></head><body><body bgcolor="""&yanse&"""><p>没有这个会员！")
else
  Call Error("<card title=""发送消息""><p>没有这个会员！")
  end if
end if
rs.close
set rs=Nothing

set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select * from [guest]",conn,1,2
rs.addnew
rs("sid")=lid
rs("fid")=myid
rs("fnr")=txt
rs("tou")=face
rs.update
rs.close
set rs=Nothing
conn.close
set conn=Nothing
Call cardz3("发送消息",""&replace(replace(urlss1,"@@","&amp;"),"sidoo","sid")&"")

response.write "发送成功...<br/>正在返回查看信息前的页面...<br/>"
response.write "<a href='"&replace(replace(urlss1,"@@","&amp;"),"sidoo","sid")&"'>点击返回</a><br/>"

response.write "<a href='mymsg.asp?sid="&sid&"&amp;saytk="&saytk&"'>我的信箱</a>"%>
<!--#include file="fanhui.asp"-->
<%call head1()%>