<!--#include file="Inc.asp"-->
<!--#include file="ydzq.asp"-->
<%call head()
%>
<%call Fortxtmsg
Call saycarda("发送消息")
dim urls,txt,ids,face,TP
urls=request("url")
urls=replace(urls,"@@","&amp;")
urls=replace(urls,"sidoo=","sid=")
urls=replace(urls,"sid=&sid=","sid=")
urls=replace(urls,"sid=&amp;sid=","sid=")
urls=replace(urls,"sid=@@sid=","sid=")
ids=Request.form("ids")
txt=Request.form("txt")
face=request("face")
TP=request("TP")
if TP<>"" then
if face="" or Isnumeric(lid)=False then face=0
if txt="" then
  Call Error("消息内容不能为空！")
  end if
if len(txt)>500 then
  Call Error("消息内容最多500字！")
  end if

if ids="" or Isnumeric(ids)=False then
  Call Error("ID无效！")
  end if
if clng(ids)=myid then
  Call Error("不能给自己发信！")
  end if
set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select * from myhait where jid="&ids&" and bid="&myid,conn,1,1
if not rs.eof then
  Call Error("对方已把你加为黑名单！")
  end if
rs.close
set rs=nothing

set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select id from [users] where id="&ids,conn,1,1
if rs.eof then
  Call Error("没有这个会员！")
  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")=ids
rs("fid")=myid
rs("fnr")=txt
rs("tou")=face
rs.update
rs.close
set rs=Nothing

response.write "您的消息已发送成功！"
else
if ids<>"" then
else
response.write "输入对方ID<br/>"
if saytk=>2 then
Response.write "<form name=""form"" method=""post"" action=""msgadd.asp?sid="&sid&"&amp;saytk="&saytk&""">"
end if
if saytk=>2 then
response.write "<input name=""ids"" format=""*N"" emptyok=""true"" maxlength=""1000"" value=""""/><br/>"
else
response.write "<input name=""ids"&tt&""" format=""*N"" emptyok=""true"" maxlength=""1000"" value=""""/><br/>"
end if
end if
response.write "输入消息内容<br/>"
response.write "<select title='表情' name='face' value='0'>"&chr(13)
response.write "<option title='表情' value='0'>表情</option>"&chr(13)
response.write "<option title='微笑' value='1'>微笑</option>"&chr(13)
response.write "<option title='哭泣' value='2'>哭泣</option>"&chr(13)
response.write "<option title='调皮' value='3'>调皮</option>"&chr(13)
response.write "<option title='脸红' value='4'>脸红</option>"&chr(13)
response.write "<option title='害羞' value='5'>害羞</option>"&chr(13)
response.write "<option title='生气' value='6'>生气</option>"&chr(13)
response.write "<option title='偷笑' value='7'>偷笑</option>"&chr(13)
response.write "<option title='流汗' value='8'>流汗</option>"&chr(13)
response.write "<option title='我倒' value='9'>我倒</option>"&chr(13)
response.write "<option title='得意' value='10'>得意</option>"&chr(13)
response.write "<option title='眦牙' value='11'>眦牙</option>"&chr(13)
response.write "<option title='疑问' value='12'>疑问</option>"&chr(13)
response.write "<option title='睡觉' value='13'>睡觉</option>"&chr(13)
response.write "<option title='好色' value='14'>好色</option>"&chr(13)
response.write "<option title='口水' value='15'>口水</option>"&chr(13)
response.write "<option title='敲头' value='16'>敲头</option>"&chr(13)
response.write "<option title='可爱' value='17'>可爱</option>"&chr(13)
response.write "<option title='猪头' value='18'>猪头</option>"&chr(13)
response.write "<option title='YEAH' value='19'>YEAH</option>"&chr(13)
response.write "<option title='玫瑰' value='20'>玫瑰</option>"&chr(13)
response.write "</select>"&chr(13)
if saytk=>2 then
response.write "<input name=""txt""  maxlength=""500"" value=""""/><br/>"
else
response.write "<input name=""txt"&tt&"""  maxlength=""500"" value=""""/><br/>"
end if
if saytk=>2 then
if ids<>"" then
response.write "<input type=""hidden"" name=""ids"" value="""&ids&"""/>"
end if
response.write "<input type=""hidden"" name=""tp"" value=""1""/>"
response.write "<input type=""submit"" name=""Submit"" value=""发送消息""></form><br/>"
else
Response.write "<anchor>发送消息"
Response.write "<go href='msgadd.asp?sid="&sid&"&amp;saytk="&saytk&"' method='post' accept-charset='utf-8'>"
Response.write "<postfield name=""txt"" value=""$(txt"&tt&")""/>"
if ids<>"" then
Response.write "<postfield name=""ids"" value="""&ids&"""/>"
else
Response.write "<postfield name=""ids"" value=""$(ids"&tt&")""/>"
end if
Response.write "<postfield name=""face"" value=""$(face)""/>"
Response.write "<postfield name=""TP"" value=""1""/>"
Response.write "</go></anchor>"
end if
end if
conn.close
set conn=nothing
response.write "<br/><a href='mymsg.asp?sid="&sid&"&amp;saytk="&saytk&"'>我的信箱</a>"%>
<!--#include file="fanhui.asp"-->
<%call head1()%>