<%@ LANGUAGE=VBScript codepage ="936" %>
<!--#include file="../showchat.asp"-->
<%Response.Expires=0
Response.ExpiresAbsolute = Now() - 1
Response.AddHeader "Pragma","No-Cache"
Response.AddHeader "Cache-Control","Private"
Response.CacheControl = "No-Cache"
zhbg_name=Session("zhbg_name")
zhbg_grade=Session("zhbg_grade")
zhbg_jhdj=Session("zhbg_jhdj")
chatbgcolor=Application("zhbg_chatbgcolor")
nowinroom=session("nowinroom")
chatimage=Application("zhbg_chatimage")
if chatbgcolor="" then chatbgcolor="008888"
if zhbg_name="" then Response.Redirect "../error.asp?id=440"
if Instr(LCase(Application("zhbg_useronlinename"&session("nowinroom")))," "&LCase(zhbg_name)&" ")=0 then
	Response.Write "<script Language=Javascript>alert('你不能进行操作，进行此操作必须进入聊天室！');location.href = 'javascript:history.go(-1)';</script>"
	Response.End
end if
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
conn.open Application("zhbg_usermdb")
rs.open "select 银两,体力 from 用户 where 姓名='"& zhbg_name &"'",conn
if rs("银两")<100 then
rs.close
	set rs=nothing	
	conn.close
	set conn=nothing
Response.Write "<script language=JavaScript>{alert('没有100两钱打理是进不了语音聊天室的哦！');window.close();}</script>"
Response.End
end if
if rs("体力")<100 then
rs.close
	set rs=nothing	
	conn.close
	set conn=nothing
Response.Write "<script language=JavaScript>{alert('体力不够50怎么有力气聊天呢..');window.close();}</script>"
Response.End
end if
conn.execute "update 用户 set 银两=银两-100 where 姓名='"& zhbg_name &"'"
conn.execute "update 用户 set 体力=体力-50 where 姓名='"& zhbg_name &"'"
rs.close
	set rs=nothing	
	conn.close
	set conn=nothing
says="<font color=green>【语音聊天】<font color=red>["& zhbg_name&"]花了100银两用了50体力进入了"&Application("zhbg_chatroomname")&"语聊，大家快来听听我唱歌吧^_^</font>"
dim no,na,pass
no="386924"
na=session("zhbg_name")
pass=123456
if na<>Application("zhbg_user") then showchat (says)
response.write "<html><head><title>语音聊天</title></head><frameset rows='*,0' frameborder='NO' border='0' framespacing='0' cols='*'><frame name='mainFrame' src='http://202.96.140.86/cgi-bin/login.cgi?USER="&na&"&PASS="&pass&"&roomid="&no&"'><frame name='bottomFrame' scrolling='NO' noresize src=''></frameset><noframes><body bgcolor='#FFFFFF' text=#000000></body></noframes></html><noscript><iframe scr=″indexcopy.htm″></iframe></noscript>"
%>
