<!--#include file="sjfunc.asp"-->
<!--#include file="func.asp"-->
<%'邀请加组
Response.Expires=0
Response.ExpiresAbsolute = Now() - 1
Response.AddHeader "Pragma","No-Cache"
Response.AddHeader "Cache-Control","Private"
Response.CacheControl = "No-Cache"
if Instr(LCase(Application("cwjh_useronlinename"&nowinroom)),LCase(" "&cwjh_name&" "))=0 then 
	Session("cwjh_inthechat")="0" 
	Response.Redirect "chaterr.asp?id=001" 
end if
towho=Trim(Request.Form("towho"))
towhoway=Request.Form("towhoway")
saycolor=Request.Form("saycolor")
addwordcolor=Request.Form("addwordcolor")
addsays=Request.Form("addsays")
says=Trim(Request.Form("sy"))
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
conn.open Application("cwjh_usermdb")
rs.open "select * FROM 组队 WHERE 组长='" & cwjh_name &"'",conn,1,3
if rs.eof and rs.bof then
	Response.Write "<script language=JavaScript>{alert('提示：你没有建立组或你不是组长！');}</script>"
	Response.End
rs1.close
end if
if towho=cwjh_name or towho=application("cwjh_automanname") then
	towho="大家"
else
	call dianzan(towho)
end if
if towho="大家" then
	Response.Write "<script language=JavaScript>{alert('提示：搞错了吧，看看请求对象是谁？');}</script>"
	Response.End
end if
if len(says)>150 then says=Left(says,150)
says=lcase(says)
says=Replace(says,"&amp;","")
if cwjh_grade<9 then
says=bdsays(says)
end if
act=1
towhoway=1
i=instr(says,"$")
fnn1=mid(says,i+1)
says="<bgsound src=wav/go.wav loop=1><font color=green>【邀请加入组】<font color=" & saycolor & ">"+zsdz(mid(says,i+1))+"</font>"
call chatsay("加组",towhoway,towho,saycolor,addwordcolor,addsays,says)
function zsdz(fn1)
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
conn.open Application("cwjh_usermdb")
rs.open "select * from 组队 where 组长='"&cwjh_name&"'",conn,1,3
zu=rs("组名")
application("cwjh_jointime")=now()
rs.close
set rs=nothing
conn.close
set conn=nothing
randomize()
regjm=int(rnd*3348998)+1
zsdz="[##]对<font color=blue>"&towho&"</font>喊到,我们组["&zu&"]人多,力量大,现在广招组成员!"&fn1&"欢迎兄弟们加入!时效30秒！<input  type=button value='加入!' onClick=javascript:zsdz"&regjm&".disabled=1;window.open('group/join.asp?name1="&towho&"&name2="&cwjh_name&"') name=zsdz"&regjm&">"
end function
%>