<%Call FortxtChat dim reContent,friendid,face,ID reContent=forbbs(request("reContent")) friendid=request("friendid") id=request("id") set rs=server.createobject("adodb.recordset") rs.open "select roomname from Chat where ID="&ID,conn,1,1 if rs.eof then rs.close set rs=nothing Call Error("

错误的聊天室ID") end if chatname=rs("roomname") rs.close set rs=nothing face=request("face") if face="" or Isnumeric(lid)=False then face=0 if reContent="" then Call Error("

消息内容不能为空!") end if if len(reContent)>1000 then Call Error("

消息内容最多1000字!") end if if id="" or Isnumeric(id)=False then Call Error("

ID无效!") end if if friendid="" or Isnumeric(friendid)=False then Call Error("

ID无效!") end if if clng(friendid)=0 then Call Error("

请选择好友!") end if if clng(friendid)=myid then Call Error("

不能给自己发邀请!") end if set rs=Server.CreateObject("ADODB.Recordset") rs.open"select * from myhait where jid="&friendid&" 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="&friendid,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")=friendid rs("fid")=myid rs("fnr")="会员ID("&myid&")邀请您到(url=/bbs/chat/chatroom.asp?ID="&ID&"&sid=[sid])"&chatname&"(/url)聊天室聊天啦![br]"+reContent rs("tou")=face rs.update rs.close set rs=Nothing conn.close set conn=nothing Response.write "" Response.write "

" Response.write "发送邀请成功!"&chr(13) Response.write "
返回聊天"&chr(13) Response.write "

" %>